Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

Add Claude Fable 5 model variants

Abi Raja71750413c040
diff --git a/backend/agent/providers/anthropic/provider.py b/backend/agent/providers/anthropic/provider.py
index a96dad89..39f46035 100644
--- a/backend/agent/providers/anthropic/provider.py
+++ b/backend/agent/providers/anthropic/provider.py
@@ -30,6 +30,11 @@ ADAPTIVE_THINKING_MODELS = {
Llm.CLAUDE_OPUS_4_8_HIGH.value,
Llm.CLAUDE_OPUS_4_8_XHIGH.value,
Llm.CLAUDE_OPUS_4_8_MAX.value,
+ Llm.CLAUDE_FABLE_5_LOW.value,
+ Llm.CLAUDE_FABLE_5_MEDIUM.value,
+ Llm.CLAUDE_FABLE_5_HIGH.value,
+ Llm.CLAUDE_FABLE_5_XHIGH.value,
+ Llm.CLAUDE_FABLE_5_MAX.value,
Llm.CLAUDE_SONNET_4_6.value,
}
@@ -39,6 +44,11 @@ ANTHROPIC_MODEL_CONFIG: dict[Llm, dict[str, str]] = {
Llm.CLAUDE_OPUS_4_8_HIGH: {"api_name": "claude-opus-4-8", "effort": "high"},
Llm.CLAUDE_OPUS_4_8_XHIGH: {"api_name": "claude-opus-4-8", "effort": "xhigh"},
Llm.CLAUDE_OPUS_4_8_MAX: {"api_name": "claude-opus-4-8", "effort": "max"},
+ Llm.CLAUDE_FABLE_5_LOW: {"api_name": "claude-fable-5", "effort": "low"},
+ Llm.CLAUDE_FABLE_5_MEDIUM: {"api_name": "claude-fable-5", "effort": "medium"},
+ Llm.CLAUDE_FABLE_5_HIGH: {"api_name": "claude-fable-5", "effort": "high"},
+ Llm.CLAUDE_FABLE_5_XHIGH: {"api_name": "claude-fable-5", "effort": "xhigh"},
+ Llm.CLAUDE_FABLE_5_MAX: {"api_name": "claude-fable-5", "effort": "max"},
}
diff --git a/backend/agent/providers/pricing.py b/backend/agent/providers/pricing.py
index e33ba226..5aaf5802 100644
--- a/backend/agent/providers/pricing.py
+++ b/backend/agent/providers/pricing.py
@@ -37,6 +37,9 @@ MODEL_PRICING: Dict[str, ModelPricing] = {
"claude-opus-4-8": ModelPricing(
input=5.00, output=25.00, cache_read=0.50, cache_write=6.25
),
+ "claude-fable-5": ModelPricing(
+ input=10.00, output=50.00, cache_read=1.00, cache_write=12.50
+ ),
# --- Gemini ---
"gemini-3-flash-preview": ModelPricing(
input=0.50, output=3.00, cache_read=0.05
diff --git a/backend/llm.py b/backend/llm.py
index 318e50b5..edb5639a 100644
--- a/backend/llm.py
+++ b/backend/llm.py
@@ -28,6 +28,11 @@ class Llm(Enum):
CLAUDE_OPUS_4_8_HIGH = "claude-opus-4-8 (high effort)"
CLAUDE_OPUS_4_8_XHIGH = "claude-opus-4-8 (xhigh effort)"
CLAUDE_OPUS_4_8_MAX = "claude-opus-4-8 (max effort)"
+ CLAUDE_FABLE_5_LOW = "claude-fable-5 (low effort)"
+ CLAUDE_FABLE_5_MEDIUM = "claude-fable-5 (medium effort)"
+ CLAUDE_FABLE_5_HIGH = "claude-fable-5 (high effort)"
+ CLAUDE_FABLE_5_XHIGH = "claude-fable-5 (xhigh effort)"
+ CLAUDE_FABLE_5_MAX = "claude-fable-5 (max effort)"
# Gemini
GEMINI_3_FLASH_PREVIEW_HIGH = "gemini-3-flash-preview (high thinking)"
GEMINI_3_FLASH_PREVIEW_MINIMAL = "gemini-3-flash-preview (minimal thinking)"
@@ -73,6 +78,11 @@ MODEL_PROVIDER: dict[Llm, str] = {
Llm.CLAUDE_OPUS_4_8_HIGH: "anthropic",
Llm.CLAUDE_OPUS_4_8_XHIGH: "anthropic",
Llm.CLAUDE_OPUS_4_8_MAX: "anthropic",
+ Llm.CLAUDE_FABLE_5_LOW: "anthropic",
+ Llm.CLAUDE_FABLE_5_MEDIUM: "anthropic",
+ Llm.CLAUDE_FABLE_5_HIGH: "anthropic",
+ Llm.CLAUDE_FABLE_5_XHIGH: "anthropic",
+ Llm.CLAUDE_FABLE_5_MAX: "anthropic",
# Gemini models
Llm.GEMINI_3_FLASH_PREVIEW_HIGH: "gemini",
Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL: "gemini",
diff --git a/backend/tests/test_anthropic_provider_config.py b/backend/tests/test_anthropic_provider_config.py
index 729c30a9..250756d8 100644
--- a/backend/tests/test_anthropic_provider_config.py
+++ b/backend/tests/test_anthropic_provider_config.py
@@ -1,4 +1,5 @@
from agent.providers.anthropic.provider import (
+ ADAPTIVE_THINKING_MODELS,
_get_anthropic_api_model_name,
_get_anthropic_effort,
)
@@ -17,3 +18,18 @@ def test_claude_opus_4_8_effort_variants_map_to_same_api_model() -> None:
for model, effort in expected_efforts.items():
assert _get_anthropic_api_model_name(model) == "claude-opus-4-8"
assert _get_anthropic_effort(model) == effort
+
+
+def test_claude_fable_5_effort_variants_map_to_same_api_model() -> None:
+ expected_efforts = {
+ Llm.CLAUDE_FABLE_5_LOW: "low",
+ Llm.CLAUDE_FABLE_5_MEDIUM: "medium",
+ Llm.CLAUDE_FABLE_5_HIGH: "high",
+ Llm.CLAUDE_FABLE_5_XHIGH: "xhigh",
+ Llm.CLAUDE_FABLE_5_MAX: "max",
+ }
+
+ for model, effort in expected_efforts.items():
+ assert _get_anthropic_api_model_name(model) == "claude-fable-5"
+ assert _get_anthropic_effort(model) == effort
+ assert model.value in ADAPTIVE_THINKING_MODELS