Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions e2e-tests/test_include_partial_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def test_include_partial_messages_stream_events():

options = ClaudeAgentOptions(
include_partial_messages=True,
model="claude-sonnet-4-20250514",
model="claude-sonnet-4-5",
max_turns=2,
env={
"MAX_THINKING_TOKENS": "8000",
Expand Down Expand Up @@ -94,7 +94,7 @@ async def test_include_partial_messages_thinking_deltas():

options = ClaudeAgentOptions(
include_partial_messages=True,
model="claude-sonnet-4-20250514",
model="claude-sonnet-4-5",
max_turns=2,
env={
"MAX_THINKING_TOKENS": "8000",
Expand Down Expand Up @@ -132,7 +132,7 @@ async def test_partial_messages_disabled_by_default():

options = ClaudeAgentOptions(
# include_partial_messages not set (defaults to False)
model="claude-sonnet-4-20250514",
model="claude-sonnet-4-5",
max_turns=2,
)

Expand Down
2 changes: 1 addition & 1 deletion examples/include_partial_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def main():
# Enable partial message streaming
options = ClaudeAgentOptions(
include_partial_messages=True,
model="claude-sonnet-4-20250514",
model="claude-sonnet-4-5",
max_turns=2,
env={
"MAX_THINKING_TOKENS": "8000",
Expand Down
2 changes: 1 addition & 1 deletion examples/streaming_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ async def example_with_options():
allowed_tools=["Read", "Write"], # Allow file operations
system_prompt="You are a helpful coding assistant.",
env={
"ANTHROPIC_MODEL": "claude-sonnet-4-20250514",
"ANTHROPIC_MODEL": "claude-sonnet-4-5",
},
)

Expand Down
2 changes: 1 addition & 1 deletion examples/streaming_mode_trio.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def display_message(msg):
async def multi_turn_conversation():
"""Example of a multi-turn conversation using trio."""
async with ClaudeSDKClient(
options=ClaudeAgentOptions(model="claude-3-5-sonnet-20241022")
options=ClaudeAgentOptions(model="claude-sonnet-4-5")
) as client:
print("=== Multi-turn Conversation with Trio ===\n")

Expand Down
4 changes: 2 additions & 2 deletions src/claude_agent_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ async def set_model(self, model: str | None = None) -> None:

Args:
model: The model to use, or None to use default. Examples:
- 'claude-sonnet-4-20250514'
- 'claude-sonnet-4-5'
- 'claude-opus-4-1-20250805'
- 'claude-opus-4-20250514'

Expand All @@ -243,7 +243,7 @@ async def set_model(self, model: str | None = None) -> None:
await client.query("Help me understand this problem")

# Switch to a different model for implementation
await client.set_model('claude-3-5-sonnet-20241022')
await client.set_model('claude-sonnet-4-5')
await client.query("Now implement the solution")
```
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_build_command_with_options(self):
options=ClaudeAgentOptions(
allowed_tools=["Read", "Write"],
disallowed_tools=["Bash"],
model="claude-3-5-sonnet",
model="claude-sonnet-4-5",
permission_mode="acceptEdits",
max_turns=5,
),
Expand All @@ -119,7 +119,7 @@ def test_build_command_with_options(self):
assert "--disallowedTools" in cmd
assert "Bash" in cmd
assert "--model" in cmd
assert "claude-3-5-sonnet" in cmd
assert "claude-sonnet-4-5" in cmd
assert "--permission-mode" in cmd
assert "acceptEdits" in cmd
assert "--max-turns" in cmd
Expand Down
4 changes: 2 additions & 2 deletions tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_claude_code_options_with_session_continuation(self):
def test_claude_code_options_with_model_specification(self):
"""Test Options with model specification."""
options = ClaudeAgentOptions(
model="claude-3-5-sonnet-20241022", permission_prompt_tool_name="CustomTool"
model="claude-sonnet-4-5", permission_prompt_tool_name="CustomTool"
)
assert options.model == "claude-3-5-sonnet-20241022"
assert options.model == "claude-sonnet-4-5"
assert options.permission_prompt_tool_name == "CustomTool"