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): add Claude Fable 5.1 support (#14402)
Nicholas Tindle8a90938aac48
diff --git a/autogpt_platform/backend/backend/data/llm_registry/catalog.py b/autogpt_platform/backend/backend/data/llm_registry/catalog.pyindex bedabe6c98..18f1e82b88 100644--- a/autogpt_platform/backend/backend/data/llm_registry/catalog.py+++ b/autogpt_platform/backend/backend/data/llm_registry/catalog.py@@ -236,6 +236,36 @@ def _build_catalog() -> CatalogPayload:provider_output_usd_per_1m=15.00,),),+ CatalogModel(+ slug="claude-fable-5-1",+ display_name="Claude Fable 5.1",+ provider="anthropic",+ creator="anthropic",+ # Same compaction-cap convention as the rest of the Claude+ # 5 family: native window is 1M, capped at 200K here.+ context_window=200000,+ max_output_tokens=128000,+ price_tier=3,+ supports_tools=True,+ supports_json_output=True,+ supports_reasoning=True,+ # $10/1M in, $50/1M out (Anthropic list price, unchanged+ # from Fable 5) at the catalog's standard usd_per_1m x 150+ # factor -> 1500/7500 credits, matching gpt-6-astra which+ # ships the same $10/$50 rate. Cache reads are Fable 5.1's+ # headline price cut: $0.25/1M (75% below Fable 5) rather+ # than the family's usual 0.1x-of-input ratio. Cache writes+ # keep the standard 1.25x-of-input convention ($12.50/1M).+ cost=CatalogModelCost(+ run_credits=20,+ input_credits_per_1m=1500.0,+ output_credits_per_1m=7500.0,+ cache_read_credits_per_1m=37.5,+ cache_creation_credits_per_1m=1875.0,+ provider_input_usd_per_1m=10.00,+ provider_output_usd_per_1m=50.00,+ ),+ ),# ----- Groq -----CatalogModel(slug="llama-3.1-8b-instant",diff --git a/autogpt_platform/backend/backend/data/llm_registry/catalog_test.py b/autogpt_platform/backend/backend/data/llm_registry/catalog_test.pyindex 9ab24922b2..a371f8e06e 100644--- a/autogpt_platform/backend/backend/data/llm_registry/catalog_test.py+++ b/autogpt_platform/backend/backend/data/llm_registry/catalog_test.py@@ -180,6 +180,24 @@ def test_gpt6_astra_bills_at_authored_rates():assert astra_entry.context_window == 1050000+def test_claude_fable_5_1_bills_at_authored_rates():+ """Claude Fable 5.1 (Anthropic list price $10/$50 per 1M, cache reads cut+ 75% to $0.25/1M) — flat tier and per-1M projections must match the+ authored catalog entry."""+ fable = LLMModel("claude-fable-5-1")+ assert MODEL_COST[fable] == 20+ assert TOKEN_COST[fable].model_dump() == {+ "input": 1500.0,+ "output": 7500.0,+ "cache_read": 37.5,+ "cache_creation": 1875.0,+ }+ assert MODEL_METADATA[fable].max_output_tokens == 128000+ fable_entry = next(m for m in CATALOG.models if m.slug == "claude-fable-5-1")+ assert fable_entry.price_tier == 3+ assert fable_entry.context_window == 200000++def test_provider_usd_prices_are_all_or_nothing():"""A half-authored provider USD price must refuse to construct — itwould silently underprice against the transport family default."""diff --git a/autogpt_platform/backend/backend/data/llm_registry/llm_models.py b/autogpt_platform/backend/backend/data/llm_registry/llm_models.pyindex b3d3a5d383..08c88a0e0e 100644--- a/autogpt_platform/backend/backend/data/llm_registry/llm_models.py+++ b/autogpt_platform/backend/backend/data/llm_registry/llm_models.py@@ -178,6 +178,7 @@ class LLMModel(str, Enum, metaclass=LLMModelMeta):CLAUDE_5_OPUS = "claude-opus-5"CLAUDE_4_6_SONNET = "claude-sonnet-4-6"CLAUDE_5_SONNET = "claude-sonnet-5"+ CLAUDE_5_1_FABLE = "claude-fable-5-1"# AI/ML API modelsAIML_API_LLAMA3_3_70B = "meta-llama/Llama-3.3-70B-Instruct-Turbo"# Groq models