diff --git a/agent/model_metadata.py b/agent/model_metadata.py index 3dc3e9e13..758ca0520 100644 --- a/agent/model_metadata.py +++ b/agent/model_metadata.py @@ -69,15 +69,15 @@ CONTEXT_PROBE_TIERS = [ DEFAULT_CONTEXT_LENGTHS = { "anthropic/claude-opus-4": 200000, "anthropic/claude-opus-4.5": 200000, - "anthropic/claude-opus-4.6": 200000, + "anthropic/claude-opus-4.6": 1000000, "anthropic/claude-sonnet-4": 200000, "anthropic/claude-sonnet-4-20250514": 200000, "anthropic/claude-sonnet-4.5": 200000, - "anthropic/claude-sonnet-4.6": 200000, + "anthropic/claude-sonnet-4.6": 1000000, "anthropic/claude-haiku-4.5": 200000, # Bare Anthropic model IDs (for native API provider) - "claude-opus-4-6": 200000, - "claude-sonnet-4-6": 200000, + "claude-opus-4-6": 1000000, + "claude-sonnet-4-6": 1000000, "claude-opus-4-5-20251101": 200000, "claude-sonnet-4-5-20250929": 200000, "claude-opus-4-1-20250805": 200000, diff --git a/tests/agent/test_model_metadata.py b/tests/agent/test_model_metadata.py index 75770ce31..dba8f6e13 100644 --- a/tests/agent/test_model_metadata.py +++ b/tests/agent/test_model_metadata.py @@ -106,9 +106,14 @@ class TestEstimateMessagesTokensRough: # ========================================================================= class TestDefaultContextLengths: - def test_claude_models_200k(self): + def test_claude_models_context_lengths(self): for key, value in DEFAULT_CONTEXT_LENGTHS.items(): - if "claude" in key: + if "claude" not in key: + continue + # Claude 4.6 models have 1M context + if "4.6" in key or "4-6" in key: + assert value == 1000000, f"{key} should be 1000000" + else: assert value == 200000, f"{key} should be 200000" def test_gpt4_models_128k_or_1m(self):