Switch model display format from model__provider to provider__model#28
Merged
Conversation
…xy__ Display form changes: - Provider models: model__provider -> provider__model (e.g. qwen2.5vl:3b__ollama -> ollama__qwen2.5vl:3b) - Virtual models: llmproxy/* -> llmproxy__* (e.g. llmproxy/deep/free -> llmproxy__deep/free; inner / kept) Putting the namespace prefix on the left mirrors the canonical provider/model slash form, so display ids and configs read in the same order everywhere. Input compatibility widened: every endpoint resolves all four forms: provider/model (canonical slash form) provider__model (current display form) model__provider (PR #27 legacy form) model (provider) (pre-PR #27 legacy form) The legacy llmproxy/free, llmproxy/deep/free, etc. virtual ids stay in _VIRTUAL_MODELS so pinned client configs keep working; only the new llmproxy__* form is advertised in /v1/models. Tests, README, smoke client, and the test_tui helper updated to use the new forms while exercising legacy compatibility paths.
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.
Summary
This PR changes the model display format advertised by
GET /v1/modelsfrommodel__providertoprovider__model, making it consistent with the canonicalprovider/modelslash form used throughout the codebase. The change improves readability in logs, configs, and client menus by putting the provider name first in both formats.Key Changes
Display format change: Virtual and proxied models now advertise as
provider__modelinstead ofmodel__providerollama__qwen2.5vl:3binstead ofqwen2.5vl:3b__ollamallmproxy__free,llmproxy__standard/local, etc. instead ofllmproxy/free,llmproxy/standard/localBackward compatibility: All three legacy input formats continue to resolve:
provider/model— canonical slash form (unchanged)model__provider— PR Change model display format from "model (provider)" to "model__provider" #27 legacy display form (now cold-cache fallback)model (provider)— pre-PR Change model display format from "model (provider)" to "model__provider" #27 legacy display form (still supported)Virtual model handling: Split
_VIRTUAL_MODELSinto_NEW_VIRTUAL_MODELS(advertised) and_LEGACY_VIRTUAL_MODELS(accepted as input), with the combined set used for membership checksResolver logic: Updated
_resolve_provider()to try the newprovider__modelform first, then fall back to legacymodel__providerform when parsing double-underscore IDsHelper function: Added
_strip_virtual_prefix()to handle bothllmproxy__and legacyllmproxy/prefixes when dispatching virtual model requestsImplementation Details
/v1/modelswith the new format, so cache lookups work correctly without parsing__is the provider by checking against configured providers__separator as regular models for consistency and to ensure strict client validators accept themhttps://claude.ai/code/session_018vws2p6bhd3xESL3Jx4S3h