Skip to content

Commit 2d018ae

Browse files
fix: add default for adapter_name in ThreadImpl.from_json
Consistency with ChannelImpl: use empty string default when neither camelCase nor snake_case key is present. Addresses Codex review comment. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 81dcf4c commit 2d018ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/chat_sdk/thread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def from_json(
724724
thread = cls(
725725
_ThreadImplConfig(
726726
id=data["id"],
727-
adapter_name=data.get("adapterName") or data.get("adapter_name"),
727+
adapter_name=data.get("adapterName") or data.get("adapter_name", ""),
728728
channel_id=data.get("channelId") or data.get("channel_id", ""),
729729
channel_visibility=data.get("channelVisibility") or data.get("channel_visibility", "unknown"),
730730
current_message=current_msg,

0 commit comments

Comments
 (0)