fix: load claude models directly from provider

Claude's model catalog changes quickly enough that a shared three-day cache can
leave users selecting stale defaults or missing newly available model aliases.
Route Claude model lookups through the provider every time so the UI and slash
commands reflect the current provider result instead of an old disk snapshot.

Keep the static fallback catalog aligned with the latest Claude defaults so the
provider still has a sensible response when live discovery is unavailable.
This commit is contained in:
Haileyesus
2026-06-05 15:14:32 +03:00
parent 94785bfa57
commit cdcac182d4
4 changed files with 82 additions and 6 deletions

View File

@@ -11,7 +11,13 @@ export const CLAUDE_MODELS = {
{
value: "default",
label: "Default (recommended)",
description: "Use the default model (currently Sonnet 4.6) · $3/$15 per Mtok",
description:
"Use the default model (currently Opus 4.8 (1M context)) · $5/$25 per Mtok",
},
{
value: "sonnet",
label: "Sonnet",
description: "Sonnet 4.6 · Best for everyday tasks · $3/$15 per Mtok",
},
{
value: "sonnet[1m]",
@@ -20,8 +26,9 @@ export const CLAUDE_MODELS = {
},
{
value: "opus[1m]",
label: "Opus 4.7 (1M context)",
description: "Opus 4.7 with 1M context · Most capable for complex work · $5/$25 per Mtok",
label: "Opus 4.8 (1M context)",
description:
"Opus 4.8 with 1M context · Most capable for complex work · $5/$25 per Mtok",
},
{
value: "haiku",