mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-04 16:38:49 +00:00
fix(providers): update Anthropic default model to claude-sonnet-4-6
Update the Anthropic provider default model and matching docs/tests from claude-sonnet-4-20250514 to claude-sonnet-4-6. Fixes #4675
This commit is contained in:
parent
c9c69e4316
commit
b19a744110
@ -39,7 +39,7 @@ Without parameters, returns a key config overview:
|
|||||||
my(action="check")
|
my(action="check")
|
||||||
# → max_iterations: 40
|
# → max_iterations: 40
|
||||||
# context_window_tokens: 200000
|
# context_window_tokens: 200000
|
||||||
# model: 'anthropic/claude-sonnet-4-20250514'
|
# model: 'anthropic/claude-sonnet-4-6'
|
||||||
# workspace: PosixPath('/tmp/workspace')
|
# workspace: PosixPath('/tmp/workspace')
|
||||||
# provider_retry_mode: 'standard'
|
# provider_retry_mode: 'standard'
|
||||||
# max_tool_result_chars: 16000
|
# max_tool_result_chars: 16000
|
||||||
|
|||||||
@ -58,7 +58,7 @@ class AnthropicProvider(LLMProvider):
|
|||||||
self,
|
self,
|
||||||
api_key: str | None = None,
|
api_key: str | None = None,
|
||||||
api_base: str | None = None,
|
api_base: str | None = None,
|
||||||
default_model: str = "claude-sonnet-4-20250514",
|
default_model: str = "claude-sonnet-4-6",
|
||||||
extra_headers: dict[str, str] | None = None,
|
extra_headers: dict[str, str] | None = None,
|
||||||
):
|
):
|
||||||
super().__init__(api_key, api_base)
|
super().__init__(api_key, api_base)
|
||||||
|
|||||||
@ -23,7 +23,7 @@ Concrete scenarios showing when and how to use the my tool effectively.
|
|||||||
### "What model are you running?"
|
### "What model are you running?"
|
||||||
```
|
```
|
||||||
→ my(action="check", key="model")
|
→ my(action="check", key="model")
|
||||||
→ 'anthropic/claude-sonnet-4-20250514'
|
→ 'anthropic/claude-sonnet-4-6'
|
||||||
→ my(action="check", key="model_preset")
|
→ my(action="check", key="model_preset")
|
||||||
→ 'deep'
|
→ 'deep'
|
||||||
```
|
```
|
||||||
@ -49,7 +49,7 @@ Concrete scenarios showing when and how to use the my tool effectively.
|
|||||||
### Switching to a raw model when no preset exists
|
### Switching to a raw model when no preset exists
|
||||||
```
|
```
|
||||||
→ my(action="set", key="model", value="anthropic/claude-haiku-4-5-20251001")
|
→ my(action="set", key="model", value="anthropic/claude-haiku-4-5-20251001")
|
||||||
→ "Set model = 'anthropic/claude-haiku-4-5-20251001' (was 'anthropic/claude-sonnet-4-20250514')"
|
→ "Set model = 'anthropic/claude-haiku-4-5-20251001' (was 'anthropic/claude-sonnet-4-6')"
|
||||||
→ "Switched to a faster model for these batch tasks."
|
→ "Switched to a faster model for these batch tasks."
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ from nanobot.agent.tools.self import MyTool
|
|||||||
def _make_mock_loop(**overrides):
|
def _make_mock_loop(**overrides):
|
||||||
"""Build a lightweight mock AgentLoop with the attributes MyTool reads."""
|
"""Build a lightweight mock AgentLoop with the attributes MyTool reads."""
|
||||||
loop = MagicMock()
|
loop = MagicMock()
|
||||||
loop.model = "anthropic/claude-sonnet-4-20250514"
|
loop.model = "anthropic/claude-sonnet-4-6"
|
||||||
loop.max_iterations = 40
|
loop.max_iterations = 40
|
||||||
loop.context_window_tokens = 65_536
|
loop.context_window_tokens = 65_536
|
||||||
loop.workspace = Path("/tmp/workspace")
|
loop.workspace = Path("/tmp/workspace")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user