Update default Anthropic model to claude-haiku-4-5-latest

- Add Claude 4.5 models to AnthropicModel type (claude-sonnet-4-5-latest, claude-sonnet-4-5-20250929, claude-haiku-4-5-latest)
- Change DEFAULT_MODEL from claude-3-7-sonnet-latest to claude-haiku-4-5-latest
- Update test assertions to reflect new default model

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Daniel Chalef 2025-11-14 14:48:45 -08:00
parent de9970f6f6
commit 7e302b8453
2 changed files with 6 additions and 3 deletions

View file

@ -47,6 +47,9 @@ else:
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
AnthropicModel = Literal[ AnthropicModel = Literal[
'claude-sonnet-4-5-latest',
'claude-sonnet-4-5-20250929',
'claude-haiku-4-5-latest',
'claude-3-7-sonnet-latest', 'claude-3-7-sonnet-latest',
'claude-3-7-sonnet-20250219', 'claude-3-7-sonnet-20250219',
'claude-3-5-haiku-latest', 'claude-3-5-haiku-latest',
@ -62,7 +65,7 @@ AnthropicModel = Literal[
'claude-2.0', 'claude-2.0',
] ]
DEFAULT_MODEL: AnthropicModel = 'claude-3-7-sonnet-latest' DEFAULT_MODEL: AnthropicModel = 'claude-haiku-4-5-latest'
# Maximum output tokens for different Anthropic models # Maximum output tokens for different Anthropic models
# Based on official Anthropic documentation (as of 2025) # Based on official Anthropic documentation (as of 2025)

View file

@ -81,7 +81,7 @@ class TestAnthropicClientInitialization:
config = LLMConfig(api_key='test_api_key') config = LLMConfig(api_key='test_api_key')
client = AnthropicClient(config=config, cache=False) client = AnthropicClient(config=config, cache=False)
assert client.model == 'claude-3-7-sonnet-latest' assert client.model == 'claude-haiku-4-5-latest'
@patch.dict(os.environ, {'ANTHROPIC_API_KEY': 'env_api_key'}) @patch.dict(os.environ, {'ANTHROPIC_API_KEY': 'env_api_key'})
def test_init_without_config(self): def test_init_without_config(self):
@ -89,7 +89,7 @@ class TestAnthropicClientInitialization:
client = AnthropicClient(cache=False) client = AnthropicClient(cache=False)
assert client.config.api_key == 'env_api_key' assert client.config.api_key == 'env_api_key'
assert client.model == 'claude-3-7-sonnet-latest' assert client.model == 'claude-haiku-4-5-latest'
def test_init_with_custom_client(self): def test_init_with_custom_client(self):
"""Test initialization with a custom AsyncAnthropic client.""" """Test initialization with a custom AsyncAnthropic client."""