From 87d9aacbb1388ee2b959cc333f435b87701a23f3 Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:02:03 -0800 Subject: [PATCH] Add Claude 4.5 models to max_tokens mapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add claude-sonnet-4-5-latest, claude-sonnet-4-5-20250929, and claude-haiku-4-5-latest to ANTHROPIC_MODEL_MAX_TOKENS - All Claude 4.5 models support 64K (65536) max output tokens - Based on official Anthropic documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- graphiti_core/llm_client/anthropic_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphiti_core/llm_client/anthropic_client.py b/graphiti_core/llm_client/anthropic_client.py index 551c281a..6c9c21d2 100644 --- a/graphiti_core/llm_client/anthropic_client.py +++ b/graphiti_core/llm_client/anthropic_client.py @@ -73,6 +73,10 @@ DEFAULT_MODEL: AnthropicModel = 'claude-haiku-4-5-latest' # Some models support higher limits with additional configuration (e.g., Claude 3.7 supports # 128K with 'anthropic-beta: output-128k-2025-02-19' header, but this is not currently implemented). ANTHROPIC_MODEL_MAX_TOKENS = { + # Claude 4.5 models - 64K tokens + 'claude-sonnet-4-5-latest': 65536, + 'claude-sonnet-4-5-20250929': 65536, + 'claude-haiku-4-5-latest': 65536, # Claude 3.7 models - standard 64K tokens 'claude-3-7-sonnet-latest': 65536, 'claude-3-7-sonnet-20250219': 65536,