AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
feat(backend/copilot): default title + classifier models to Claude Haiku 5.5 (#15436)
Nicholas Tindle6f32f3870780
diff --git a/autogpt_platform/backend/backend/api/features/onboarding_dump/quality.py b/autogpt_platform/backend/backend/api/features/onboarding_dump/quality.pyindex 435e3c6ab2..99da1d3c21 100644--- a/autogpt_platform/backend/backend/api/features/onboarding_dump/quality.py+++ b/autogpt_platform/backend/backend/api/features/onboarding_dump/quality.py@@ -40,7 +40,7 @@ NO_USABLE_SPEECH = "no_usable_speech"INSUFFICIENT_CONTENT = "insufficient_content"QUALITY_ERROR_CODES = frozenset({NO_USABLE_SPEECH, INSUFFICIENT_CONTENT})-_MODEL = os.environ.get("BRAIN_DUMP_QUALITY_MODEL", "anthropic/claude-haiku-4-5")+_MODEL = os.environ.get("BRAIN_DUMP_QUALITY_MODEL", "anthropic/claude-haiku-5.5")# The gate runs inside the finalize request, after transcription already# spent part of the frontend proxy's 30s budget. A 100-token Haiku verdict# typically lands in a couple of seconds; a stalled provider must degradediff --git a/autogpt_platform/backend/backend/api/features/onboarding_dump/recommend.py b/autogpt_platform/backend/backend/api/features/onboarding_dump/recommend.pyindex 56a02f4a71..8577f42271 100644--- a/autogpt_platform/backend/backend/api/features/onboarding_dump/recommend.py+++ b/autogpt_platform/backend/backend/api/features/onboarding_dump/recommend.py@@ -24,7 +24,7 @@ logger = logging.getLogger(__name__)# Picking six ids off a list is a matching task, not a writing one, and# the onboarding loading screen holds the user until it answers — so this# runs on the fast model rather than the one that writes the greeting.-_MODEL = os.environ.get("BRAIN_DUMP_RECOMMEND_MODEL", "anthropic/claude-haiku-4-5")+_MODEL = os.environ.get("BRAIN_DUMP_RECOMMEND_MODEL", "anthropic/claude-haiku-5.5")_TIMEOUT_SECONDS = 30MAX_RECOMMENDATIONS = 6diff --git a/autogpt_platform/backend/backend/api/features/onboarding_dump/recommend_experts.py b/autogpt_platform/backend/backend/api/features/onboarding_dump/recommend_experts.pyindex 45d2d6c32c..0083f2c0d0 100644--- a/autogpt_platform/backend/backend/api/features/onboarding_dump/recommend_experts.py+++ b/autogpt_platform/backend/backend/api/features/onboarding_dump/recommend_experts.py@@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)# Same reasoning as the provider job: matching needs against a roster is# a matching task, and the onboarding loading screen waits on it.-_MODEL = os.environ.get("BRAIN_DUMP_RECOMMEND_MODEL", "anthropic/claude-haiku-4-5")+_MODEL = os.environ.get("BRAIN_DUMP_RECOMMEND_MODEL", "anthropic/claude-haiku-5.5")_TIMEOUT_SECONDS = 30MAX_EXPERTS = 16diff --git a/autogpt_platform/backend/backend/api/features/store/category_classifier.py b/autogpt_platform/backend/backend/api/features/store/category_classifier.pyindex 14eb2a23be..9c1be422be 100644--- a/autogpt_platform/backend/backend/api/features/store/category_classifier.py+++ b/autogpt_platform/backend/backend/api/features/store/category_classifier.py@@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)# Picking one label off a fixed list of eight is a matching task, not a writing# one, so it runs on the fast model — same choice as the brain-dump recommender.-_MODEL = os.environ.get("STORE_CATEGORY_MODEL", "anthropic/claude-haiku-4-5")+_MODEL = os.environ.get("STORE_CATEGORY_MODEL", "anthropic/claude-haiku-5.5")_TIMEOUT_SECONDS = 30_MAX_DESCRIPTION_CHARS = 2000diff --git a/autogpt_platform/backend/backend/copilot/anthropic_rate_card_test.py b/autogpt_platform/backend/backend/copilot/anthropic_rate_card_test.pyindex 1b96114c33..4ff06b2ac1 100644--- a/autogpt_platform/backend/backend/copilot/anthropic_rate_card_test.py+++ b/autogpt_platform/backend/backend/copilot/anthropic_rate_card_test.py@@ -245,3 +245,32 @@ class TestOpus5Rates:cache_ttl=cache_ttl,)assert cost == expected_cost+++class TestHaiku5_5Rates:+ """Haiku 5.5 is the default title/classifier model: a rate-card refresh that+ drops its key must fail here, not silently bill at the Opus 4.1 fallback."""++ def test_haiku_5_5_max_output_from_rate_card(self):+ assert get_max_output_tokens("claude-haiku-5-5") == 128000++ def test_haiku_5_5_billed_at_published_rates_without_fallback(self, caplog):+ cost = compute_anthropic_cost_usd(+ model="claude-haiku-5-5",+ prompt_tokens=1_000_000,+ completion_tokens=1_000_000,+ )+ assert cost == pytest.approx(0.6)+ assert "falling back" not in caplog.text++ @pytest.mark.parametrize("cache_ttl, expected_cost", [("5m", 0.135), ("1h", 0.21)])+ def test_haiku_5_5_cache_rates(self, cache_ttl, expected_cost):+ cost = compute_anthropic_cost_usd(+ model="claude-haiku-5-5",+ prompt_tokens=2_000_000,+ completion_tokens=0,+ cache_read_tokens=1_000_000,+ cache_creation_tokens=1_000_000,+ cache_ttl=cache_ttl,+ )+ assert cost == pytest.approx(expected_cost)diff --git a/autogpt_platform/backend/backend/copilot/anthropic_rates.json b/autogpt_platform/backend/backend/copilot/anthropic_rates.jsonindex 1aeb954698..f24f9df48d 100644--- a/autogpt_platform/backend/backend/copilot/anthropic_rates.json+++ b/autogpt_platform/backend/backend/copilot/anthropic_rates.json@@ -146,6 +146,45 @@"supports_tool_choice": true,"supports_vision": true},+ "claude-haiku-5-5": {+ "cache_creation_input_token_cost": 1.25e-07,+ "cache_creation_input_token_cost_above_1hr": 2e-07,+ "cache_creation_input_token_cost_batches": 6.25e-08,+ "cache_read_input_token_cost": 1e-08,+ "cache_read_input_token_cost_batches": 5e-09,+ "input_cost_per_token": 1e-07,+ "input_cost_per_token_batches": 5e-08,+ "litellm_provider": "anthropic",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 5e-07,+ "output_cost_per_token_batches": 2.5e-07,+ "prompt_cache_min_tokens": 512,+ "provider_specific_entry": {+ "us": 1.1+ },+ "source": "https://platform.claude.com/docs/en/models/haiku-5-5/overview",+ "supports_adaptive_thinking": true,+ "supports_anthropic_compaction": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_forced_tool_use": false,+ "supports_function_calling": true,+ "supports_max_reasoning_effort": true,+ "supports_mid_conversation_system": true,+ "supports_native_structured_output": true,+ "supports_output_config": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true+ },"claude-mythos-5": {"cache_creation_input_token_cost": 1.25e-05,"cache_creation_input_token_cost_above_1hr": 2e-05,diff --git a/autogpt_platform/backend/backend/copilot/config.py b/autogpt_platform/backend/backend/copilot/config.pyindex cc9f7c8d96..a205087970 100644--- a/autogpt_platform/backend/backend/copilot/config.py+++ b/autogpt_platform/backend/backend/copilot/config.py@@ -46,7 +46,7 @@ ANTHROPIC_OPENAI_COMPAT_BASE_URL = "https://api.anthropic.com/v1/"# auto-overrides them when left at default — see ``_apply_local_aux_models``# below. Kept as module constants so the validator and the field defaults# can't drift.-_DEFAULT_TITLE_MODEL = "anthropic/claude-haiku-4-5"+_DEFAULT_TITLE_MODEL = "anthropic/claude-haiku-5.5"_DEFAULT_SIMULATION_MODEL = "google/gemini-2.5-flash-lite"# Default for ``fast_advanced_model`` — kept in sync with the field default# below. ``_apply_local_aux_models`` reads this to detect "operator left itdiff --git a/autogpt_platform/backend/backend/copilot/config_test.py b/autogpt_platform/backend/backend/copilot/config_test.pyindex fab17f18f4..e27ddc7f88 100644--- a/autogpt_platform/backend/backend/copilot/config_test.py+++ b/autogpt_platform/backend/backend/copilot/config_test.py@@ -598,7 +598,7 @@ class TestLocalAuxModels:api_key="or-key",base_url="https://openrouter.ai/api/v1",)- assert cfg.title_model == "anthropic/claude-haiku-4-5"+ assert cfg.title_model == "anthropic/claude-haiku-5.5"assert cfg.simulation_model == "google/gemini-2.5-flash-lite"assert cfg.fast_advanced_model == "anthropic/claude-opus-5-5"