From 7ab61057dfc8a9db5f893997201f945696041c6f Mon Sep 17 00:00:00 2001 From: ciregenz Date: Tue, 9 Jun 2026 14:55:07 -0700 Subject: [PATCH] [eric] backend: surface Fable 5 in the model picker on the api-key route + price it $10/$50 --- backend/apps/agents/agents.py | 5 +++++ backend/apps/agents/providers/registry.py | 1 + 2 files changed, 6 insertions(+) diff --git a/backend/apps/agents/agents.py b/backend/apps/agents/agents.py index 0ca29956..1374e4d0 100644 --- a/backend/apps/agents/agents.py +++ b/backend/apps/agents/agents.py @@ -618,6 +618,11 @@ async def list_models(): r["label"] += " (API key)" r["billing_kind"] = "api_key" r["is_free"] = False + # Models that only exist on the API-key route (Fable 5, whose sub route 404s + # on our pinned 9Router) have no adaptive twin to relabel, so add them or they vanish. + adaptive_ids = {m.get("model_id") for m in adaptive} + api_only = [m for m in api_variants if m.get("model_id") not in adaptive_ids] + rows = _serialize(api_only) + rows elif has_claude_sub: # Only a sub: the adaptive rows route through 9router's cc/ lane, so they're covered # by the subscription, not pay-per-use. diff --git a/backend/apps/agents/providers/registry.py b/backend/apps/agents/providers/registry.py index 0c2457e9..8e132deb 100644 --- a/backend/apps/agents/providers/registry.py +++ b/backend/apps/agents/providers/registry.py @@ -406,6 +406,7 @@ COST_PER_1M_TOKENS: dict[tuple[str, str], tuple[float, float]] = { ("Anthropic", "opus"): (5.0, 25.0), ("Anthropic", "opus-4-7"): (5.0, 25.0), ("Anthropic", "opus-4-8"): (5.0, 25.0), + ("Anthropic", "fable-5-api"): (10.0, 50.0), ("Anthropic", "haiku"): (1.0, 5.0), # OpenAI; Codex subscription path, user pays nothing per token ("OpenAI", "gpt-5.5"): (0.0, 0.0),