Skip to content

AI: curated model lists and pricing tables drift out of date #242

Description

@remcostoeten

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:

  1. 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.
  2. 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.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreInternal cleanup, refactoring, dead codeeffort:SHalf a day

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions