Skip to content

feat(tui): add capability filter tabs and view-only rows to the model selector - #1166

Merged
edenreich merged 1 commit into
mainfrom
feat/model-selector-capability-filters
Sep 3, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/model-selector-capability-filters

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Problem

The /model selector only filtered by pricing (All/Free/Pay-as-you-go/Subscription), the Subscription tab was nearly empty for Ollama Cloud, and non-chat models were invisible.

  • The gateway reports a pricing.subscription flag per model, but the CLI dropped it at ingest and fell back to a 2-entry hardcoded knownProModels map, so subscription-gated models landed under Free. (The remaining gap — most ollama_cloud/* models having no pricing entry at all — is a gateway data issue: [BUG] Ollama Cloud models missing subscription pricing metadata inference-gateway#583.)
  • Models that can't serve /chat/completions (STT, TTS, image-gen, video) were filtered out of the list entirely, so there was no way to see what the gateway offers.

Changes

  • Capability tab row (keys 5-8: Any / Vision / Audio / Video) under the pricing tabs, ANDed with them. Vision = image input; audio/video match either side, so STT and TTS models land under Audio. Digits typed in search mode still go to the query.
  • View-only rows: non-chat models are now listed with a (…, view-only) suffix; pressing Enter on one shows a notice ("does not support chat and cannot be selected") instead of selecting. The chat-selectable set (ListModels, validation, autocomplete) is unchanged.
  • Subscription flag: parseGatewayPricing now carries pricing.subscription through, RequiresPro reads it (custom prices still win), and knownProModels is deleted.
  • Modality suffixes: rows now also show audio / video tokens (e.g. glm-5.3-flash (1M, vision, video)).
  • Chrome restyle with lipgloss v2: bold/underlined accent on the active tab of each row, styled title, dim full-width separators, tightened help line.

Tests

  • parseGatewayPricing subscription parsing; RequiresPro via gateway flag with custom-price override precedence.
  • SupportsAudio/SupportsVideo/ModalitiesLabel/IsNonChatModel/NonChatModels table-driven cases.
  • Selector: capability filter switching (keys 5-8), capability AND pricing composition, view-only suffix, Enter on a view-only row emits no selection event and shows the notice, both tab rows rendered.

task precommit:run and go test ./... pass.

Docs follow-up

A [DOCS] ticket for inference-gateway/docs is drafted (cli.md model selector section: capability tabs 5-8, view-only rows, subscription flag source) — to be filed alongside this PR.

… selector

- Second tab row (keys 5-8: Any/Vision/Audio/Video), ANDed with the
  pricing tabs; vision matches image input, audio/video match either side
- Non-chat models (STT/TTS/image-gen/video) are now listed as view-only
  rows instead of being hidden; selecting one shows a notice
- Subscription tab now follows the gateway-reported pricing.subscription
  flag; the hardcoded knownProModels set is deleted
- Restyle the selector chrome with lipgloss v2 (highlighted active tabs,
  styled title, full-width separators)
@edenreich
edenreich requested a review from a team as a code owner September 3, 2026 01:26
@edenreich
edenreich merged commit 04488ad into main Sep 3, 2026
1 check passed
@edenreich
edenreich deleted the feat/model-selector-capability-filters branch September 3, 2026 11:42
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.189.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant