Skip to content

Fallback model lists still offer deprecated models for six providers #3355

Closed

Description

@Astro-Han

fallbackModels entries are offered to users as usable choices: discovery keeps only the fallback set (model-fetcher.ts), and the catalog marks what survives available and canUseAsChatDefault: true. Deprecated snapshot models in that list are therefore presented as selectable defaults.

toolCallingModelIds (packages/core/src/provider-registry.ts) filters on tool-calling capability only. Seven providers exclude deprecated ids by filtering at the call site; the rest do not, and openai writes its list by hand without going through the helper at all.

Measured on #3324's head, which fixes ZenMux — 28 deprecated models still ship in fallback lists:

provider count examples
togetherai 11 deepseek-ai/DeepSeek-V3, essentialai/Rnj-1-Instruct
mistral 8 devstral-2512, devstral-latest
xiaomi 3 mimo-v2-flash, mimo-v2-pro
deepinfra 3 MiniMaxAI/MiniMax-M2.5
nvidia 2 moonshotai/kimi-k2.6
openai 1 gpt-4-turbo

Why this is not just a missing filter

Converging every list onto toolCallingModelIds would not cover openai, whose list is hand-written. The decision worth making explicitly is whether deprecated should exclude a model from being offered at all — it is an upstream lifecycle marker, not a statement that the endpoint rejects the call — and answering yes changes which models six providers present.

Current boundary

packages/core/src/__tests__/provider-catalog-contract.test.ts records these six as PROVIDERS_WITH_DEPRECATED_FALLBACKS. It fails when another provider regresses into the set, and also when a listed provider is cleaned up but left in the list, so the list shrinks as this work lands rather than going stale.

Split out of the #3324 review by @hqhq1025.

Activity

  1. added
    bug
    help wanted
    on Aug 20, 2026
  2. carter-smalls commented on Aug 20, 2026

    @carter-smalls

    Looks like deprecated models in fallback list.

    Use AI Badgr gateway to check retries, rate limits, auth, fallback, and provider errors.

    That should help confirm whether the issue is local config or upstream API behaviour.

  3. yihanzhu commented on Aug 22, 2026

    @yihanzhu
    Contributor

    I can do it :D

  4. yihanzhu commented on Aug 22, 2026

    @yihanzhu
    Contributor

    Answering the question the issue poses, since it decides the shape: yes, but scoped to offering only. Deprecated ids leave fallbackModels; an id a user already chose still sends — authorizeConnectionModel never reads this list — and all six of these do kind: 'protocol' discovery, so the endpoint's own catalog comes back on the first /models fetch. Nothing becomes unreachable, which is what makes the answer cheap.

    Implemented locally as the call-site filter #3324 established for ZenMux, applied to xiaomi, nvidia, mistral, togetherai and deepinfra, plus dropping gpt-4-turbo from openai's hand-written list. That empties PROVIDERS_WITH_DEPRECATED_FALLBACKS so the boundary goes away with it, as its comment intends, and the first contract test becomes the unconditional invariant — it fails before the fix naming all six providers and all 28 ids. Every list head is unchanged, so no connection default or connection-test probe moves.

    Two corrections to the issue body I'd rather flag now than have a reviewer find. The 28 is right as a registry count, but only 27 are user-visible: CURATED_CATALOG_FALLBACK_MODELS.openai shadows the registry list at model-catalog.ts:239, so gpt-4-turbo is not in any picker today — removing it is hygiene for the non-catalog consumers and for the contract test, which reads the registry directly. And "discovery keeps only the fallback set" is the kind: 'fallback' branch; none of these six is on it.

    One fork I'd rather ask than assume: this leaves the same clause at 13 call sites, so a new provider is wrong by default. Folding it into toolCallingModelIds would be a no-op today — of all 46 snapshots, the only ones carrying a tool-capable deprecated id are the nine now filtered at their call site plus openai, google and the three xiaomi-token-plan entries, which all use hand-written lists that never reach the helper. The wrinkle is placement: ollama-cloud pre-filters, and that is what makes a deprecated recommended id throw at module load instead of silently vanishing, so a helper-internal filter would need to sit before the presence check. Happy to keep this PR to the six and offer the fold as a follow-up, or roll it in — your call.

    I am treating the offer-policy question as implementation-level given the bug/help-wanted labels; say the word if you would rather it started on dev@.

    Disclosure: the implementation and this analysis were done with Claude Code (Opus 5) assistance; I reviewed and verified both.

  5. added a commit that references this issue on Aug 22, 2026
    8b60ddf
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

    buggood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions