From 7e302b8453a1d110677f1b8e77b4218daf515a15 Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Fri, 14 Nov 2025 14:48:45 -0800 Subject: [PATCH] Update default Anthropic model to claude-haiku-4-5-latest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- graphiti_core/llm_client/anthropic_client.py | 5 ++++- tests/llm_client/test_anthropic_client.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/graphiti_core/llm_client/anthropic_client.py b/graphiti_core/llm_client/anthropic_client.py index fc64c969..551c281a 100644 --- a/graphiti_core/llm_client/anthropic_client.py +++ b/graphiti_core/llm_client/anthropic_client.py @@ -47,6 +47,9 @@ else: logger = logging.getLogger(__name__) 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-20250219', 'claude-3-5-haiku-latest', @@ -62,7 +65,7 @@ AnthropicModel = Literal[ '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 # Based on official Anthropic documentation (as of 2025) diff --git a/tests/llm_client/test_anthropic_client.py b/tests/llm_client/test_anthropic_client.py index e8ba82cd..d219300b 100644 --- a/tests/llm_client/test_anthropic_client.py +++ b/tests/llm_client/test_anthropic_client.py @@ -81,7 +81,7 @@ class TestAnthropicClientInitialization: config = LLMConfig(api_key='test_api_key') 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'}) def test_init_without_config(self): @@ -89,7 +89,7 @@ class TestAnthropicClientInitialization: client = AnthropicClient(cache=False) 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): """Test initialization with a custom AsyncAnthropic client."""