Repository navigation
Description
Summary
The model list should show only models that can actually serve
/chat/completions, filtered from the modalities the gateway already reports,
so the hand-maintained gateway.exclude_models default list can be dropped.
The mechanism already exists, it is just too narrow
internal/conversation/model.go:47 already asks the gateway for modalities:
resp, err := s.client.ListModels(ctx,
sdk.ListModelsParamsIncludeContextWindow,
sdk.ListModelsParamsIncludePricing,
sdk.ListModelsParamsIncludeModalities)and already filters on them at internal/conversation/model.go:60-64, but with a
single special case:
if models.IsImageGenModalities(*model.Modalities) {
continue
}IsImageGenModalities (internal/platform/models/context.go:50-53) is
output contains image && !output contains text - it drops image-generation
models specifically. Every other non-chat modality shape (speech-to-text,
text-to-speech, embeddings, video) still reaches the picker. Generalizing that
one predicate to "chat-capable" - text in input, text in output - covers all
of them with the data we are already fetching.
What that lets us delete
gateway.exclude_models defaults (config/config.go:937-945) are two different
things wearing one hat:
Mechanically detectable from modalities - a chat-capability filter subsumes these
outright:
groq/whisper-large-v3,groq/whisper-large-v3-turbo(speech-to-text: audio in, text out)groq/playai-tts,groq/playai-tts-arabic(text-to-speech: text in, audio out)
Not modality-related at all - these are chat models excluded for size and cost:
ollama_cloud/cogito-2.1:671b,ollama_cloud/kimi-k2:1t,
ollama_cloud/kimi-k2-thinking,ollama_cloud/deepseek-v3.1:671b
So the filter removes the need for the first four on correctness grounds. The
second four are a shipped opinion about which chat models are worth listing,
which is a per-user preference rather than a default - the proposal is to empty
the default list entirely and leave exclude_models as a user-configured knob,
not to reimplement the size/cost judgement in code.
Worth noting the two mechanisms are not even in the same place today:
exclude_models is applied gateway-side, joined into DISALLOWED_MODELS when
the container starts (internal/gateway/manager.go:451-453 and :863), while
the modality filter is client-side in the CLI. Collapsing the modality half into
the client-side filter leaves one place to reason about.
Care needed
Models whose modalities the gateway does not report currently fall through the
if model.Modalities != nil guard and are kept. That behaviour must not change:
a strict filter that drops unknown-modality models would silently empty the
picker for any provider that does not populate the field. Unknown stays visible.
Acceptance Criteria
- A chat-capability predicate lives alongside
IsImageGenModalitiesininternal/platform/models/context.goand is unit tested against the shapes that matter: text->text, image+text->text (vision), text->image, audio->text, text->audio, and empty/unknown. -
HTTPModelService.ListModelsfilters with it instead of the image-generation special case. - Models with absent or empty modalities remain listed, and there is a test pinning that.
- The
gateway.exclude_modelsdefault is an empty list; the key stays supported for user configuration. - Verified against a live gateway that the four
groqspeech models drop out of the picker on modalities alone, with the default list empty. - Docs mention that the picker shows chat-capable models and that
exclude_modelsis opt-in.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Aug 30, 2026
@infer Can you work on this? use /ponytail:ponytail /go /go-concurrency /cobra-viper
inference-gateway-maintainer commentedon Aug 30, 2026
Model:
ollama_cloud/glm-5.3-flash· View JobTodos
Pull Request
#1132
✅ Infer Result: Success
Done. Issue #1127 is implemented, tested, and shipped as PR #1132 (open, ready for review, board item moved In progress \u2192 QA).
What changed
Chat-capability filter (client-side, one place to reason about)
internal/platform/models/context.go: addedIsChatCapableModalitiesalongsideIsImageGenModalities- true only when the modality set has text ininputand text inoutput. Unit tested (table-driven,TestIsChatCapableModalities) against text\u2192text, image+text\u2192text (vision), text\u2192image, audio\u2192text, text\u2192audio, and empty/unknown shapes.internal/conversation/model.go:HTTPModelService.ListModelsfilters with the new predicate instead of the image-generation special case. AddedHasReportedModalitiesso models whose modalities are absent or empty (nothing reported) stay listed - the test run caught that a naive filter dropped empty reports, which the issue explicitly forbids;TestHTTPModelService_ListModelsKeepsUnknownModalitiesnow pins it.Default exclude list dropped
config/config.go:gateway.exclude_modelsdefault is now[]string{}. The four groq speech/TTS entries are subsumed by the filter on correctness grounds; the fourollama_cloudsize/cost exclusions become a per-user knob. The key remains fully supported (still joined intoDISALLOWED_MODELSat gateway start; no manager change needed).Tests -
TestIsChatCapableModalities(predicate shapes),TestHTTPModelService_ListModelsFiltersNonChatModels(returns a fake client with the exact groq whisper/TTS modality shapes; they drop out),TestHTTPModelService_ListModelsKeepsUnknownModalities(nil and empty modalities stay listed).go teston the three touched packages,go vet,task build, and the full pre-commit suite (golangci-lint 0 issues, markdownlint) all pass.Docs -
docs/configuration-reference.md: default config no longer shows a shipped exclude list, andgateway.exclude_modelsis documented as opt-in with the picker keeping only chat-capable models. Follow-up doc-hub ticket: inference-gateway/docs#606.Notes for review
ollama_cloudlarge chat models now appear in the picker (by design - size/cost exclusion is a user choice, re-addable viaexclude_models).PR: #1132 (commits
2e7ba4bfix +25c2f6adocs).Model:
ollama_cloud/glm-5.3-flash· Exit Code:0· Duration: 9m 44sTokens: 6,358,823 in · 29,970 out · 6,388,793 total (48 requests)
Tool calls: 79 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Aug 30, 2026
🎉 This issue has been resolved in version 0.185.1 🎉
The release is available on:
Your semantic-release bot 📦🚀