Repository navigation
fix(models): list only chat-capable models in the picker and empty the exclude default - #1132
Merged
Merged
Conversation
Generalize the image-generation special case into a chat-capability predicate: a model is selectable when the gateway-reported modalities say it accepts text input and produces text output. This drops speech-to-text, text-to-speech, image-generation, and video models from the picker, not just image generators. Models whose modalities are absent or empty (nothing reported) stay listed - an unreported capability never filters a model out. The gateway.exclude_models default becomes an empty, opt-in list; the four groq speech/TTS entries are subsumed by the filter and the ollama_cloud size exclusions become a per-user choice.
…de list Drop the eight-model default exclude list from the documented default configuration and describe gateway.exclude_models as an empty, opt-in knob, noting that the picker itself filters to chat-capable models via the gateway-reported modalities.
3 tasks
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
August 30, 2026 20:51
edenreich
reviewed
Aug 30, 2026
Co-authored-by: Eden Reich <[email protected]>
The chat-capability filter failed open on missing data: models with `"modalities": null` were kept on the theory that filtering on an unreported capability would empty the picker. In practice the gateway reports null for 156 of 270 models, because its only source is the embedded models.dev table and that table has no entry for openai/tts-*, openai/whisper-1, openai/omni-moderation-* or groq/playai-tts*. The filter dropped 2 models and the TTS models stayed in the picker. Treat an unreported capability as "cannot chat" instead. A model is listed only when the gateway reports modalities for it and those modalities are text in, text out. IsChatCapableModalities already rejects the empty set, so HasReportedModalities goes away with its only caller.
Contributor
|
🎉 This PR is included in version 0.185.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1127
Summary
The model picker now lists only chat-capable models, filtered from the modalities the gateway already reports (
include=modalities), instead of special-casing image generation. That makes the hand-maintainedgateway.exclude_modelsdefault list unnecessary, so the default is now an empty, opt-in blocklist.Changes
IsChatCapableModalitiesininternal/platform/models/context.goalongsideIsImageGenModalities: true only when the modality set includes text ininputand text inoutput(unit tested against text->text, image+text->text vision chat, text->image, audio->text, text->audio, and empty/unknown shapes).HTTPModelService.ListModelsnow filters with the chat-capability predicate instead of the image-generation-only special case. Models whose modalities are absent or empty (nothing reported) remain listed - an unreported capability never filters a model out. Pinned byTestHTTPModelService_ListModelsKeepsUnknownModalities(andHasReportedModalitiesguards the empty-report case).config.DefaultConfig()now shipsgateway.exclude_models: []. The four groq speech/TTS entries are subsumed by the chat-capability filter on correctness grounds; the fourollama_cloudlarge-chat entries were a size/cost opinion and become a per-user exclusion knob instead of a shipped default. The key remains fully supported (userspace/project config, joined into the gateway'sDISALLOWED_MODELSas before).docs/configuration-reference.mdno longer shows a default exclude list and describes the picker as chat-capable-only withexclude_modelsas an opt-in knob.Verification
go testoninternal/platform/models,internal/conversation, andconfig(new/renamed tests:TestIsChatCapableModalities,TestHTTPModelService_ListModelsFiltersNonChatModelswith the four groq speech/TTS modality shapes,TestHTTPModelService_ListModelsKeepsUnknownModalities),go vet, and the pre-commit suite (golangci-lint0 issues, markdownlint) all pass.exclude_modelsif wanted.Notes
exclude_modelsremains a supported user knob.docs/configuration-reference.mddirectly.