Skip to content

Remove allows_unlisted_models — always allow custom model entry #7103

@codefromthecrypt

Description

@codefromthecrypt

Please explain the motivation behind the feature request.

We keep merging one-liner PRs that flip allows_unlisted_models to true per provider:

The underlying problem is that our known_models lists don't match what the APIs actually return. I ran fetch_supported_models() against the real APIs:

  • OpenAI: Our known_models has 11 entries but the API returns 115 models. Many valid chat models (gpt-5, gpt-5-nano, gpt-5-pro, gpt-5.2-codex) aren't in our list, and each also has a dated variant (gpt-5-nano-2025-08-07). Without unlisted enabled, users can't select any of them.
  • Ollama: API returns names with tags (qwen3:latest, qwen3:4b) but known_models lists bare names (qwen3). Zero of our 4 known models match the fetched list due to the :tag mismatch.
  • Claude Code: fetch_supported_models() returns only ["sonnet", "opus"] — hardcoded, no API. You can't enter claude-sonnet-4-5-20250929 without unlisted enabled.

The lists serve two purposes: (a) recommending known-good text+tools models, and (b) blocking users from entering arbitrary names. But (b) doesn't hold up — GOOSE_MODEL env var bypasses the UI entirely, and the canonical registry already resolves aliases to real names.

Describe the solution you'd like

Remove the allows_unlisted_models field from ProviderMetadata and the with_unlisted_models() builder method entirely. The configure UI would always show "Enter a model not listed..." alongside the curated list. If a user enters a model name the provider doesn't support, they get an API error immediately — no need to gate this in the UI.

Describe alternatives you've considered

Default allows_unlisted_models to true instead of removing it. But if no provider has a reason to set it false, the flag is dead code. The simpler option is to delete it.

Additional context

#7065 attempted a broader fix ("use dynamic model listing for all providers") but was closed. #5520 and #4834 also tried to address the same root issue from different angles.

  • I have verified this does not duplicate an existing feature request

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions