apps/desktop/src-tauri/src/database/services/ai/models.rs holds a hand-written curated model list and a classifier per provider, and usage.rs holds hand-written per-model pricing. Both go stale silently: a model gets renamed or retired upstream and the user only finds out when a request 404s, and a new model priced differently keeps reporting the old cost.
Recent evidence: stealth/ox-alpha was delisted from OpenRouter within a week of being added, and GLM-5.3-Flash launch pricing is discounted (so the recorded rate will be wrong once the discount ends).
Options, cheapest first:
- Prefer the live
/models endpoint everywhere it exists (most CompatSpec providers expose one) and treat the curated list purely as an offline fallback plus ordering hint. ai_list_provider_models already exists — make it live-first with a cached fallback.
- Surface a warning in
ai-provider-section.tsx when the configured model is not present in the live list, rather than failing at request time.
- For pricing, mark entries with a
verified_at date and show cost as approximate in ai-usage-section.tsx when the entry is older than some threshold, instead of presenting a stale number as fact.
Not proposing an automated scraper — the maintenance cost of that exceeds the drift it fixes.
apps/desktop/src-tauri/src/database/services/ai/models.rsholds a hand-written curated model list and a classifier per provider, andusage.rsholds hand-written per-model pricing. Both go stale silently: a model gets renamed or retired upstream and the user only finds out when a request 404s, and a new model priced differently keeps reporting the old cost.Recent evidence:
stealth/ox-alphawas delisted from OpenRouter within a week of being added, and GLM-5.3-Flash launch pricing is discounted (so the recorded rate will be wrong once the discount ends).Options, cheapest first:
/modelsendpoint everywhere it exists (mostCompatSpecproviders expose one) and treat the curated list purely as an offline fallback plus ordering hint.ai_list_provider_modelsalready exists — make it live-first with a cached fallback.ai-provider-section.tsxwhen the configured model is not present in the live list, rather than failing at request time.verified_atdate and show cost as approximate inai-usage-section.tsxwhen the entry is older than some threshold, instead of presenting a stale number as fact.Not proposing an automated scraper — the maintenance cost of that exceeds the drift it fixes.