[eric] backend: surface Fable 5 in the model picker on the api-key route + price it $10/$50

This commit is contained in:
ciregenz
2026-06-09 14:55:07 -07:00
parent b8a0c0814c
commit 7ab61057df
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -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.
@@ -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),