Repository navigation
report the model kind as olla.type in the models api - #249
Merged
Merged
Conversation
… tighten the kind docs
|
Caution Review failedThe pull request is closed. WalkthroughThe models API now reports model kinds and filters by exact kind. Capability filtering remains separate, and provider names are no longer assigned as model kinds by the updated parsers. ChangesModel kind API
Priority: Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Client
participant unifiedModelsHandler
participant modelConverter
Client->>unifiedModelsHandler: Request models with type or capability filter
unifiedModelsHandler->>modelConverter: Convert models and apply filters
modelConverter-->>unifiedModelsHandler: Return matching models with kinds
unifiedModelsHandler-->>Client: Return model listing
Possibly related PRs
Merge Risk:
|
13 tasks done
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
There was no reliable way to ask what kind of model something is.
?type=matched a mix of provider names and capabilities, so an embedder named...instructlisted under bothembeddingsandllm./olla/modelsnow reports each model's kind (llm,vlm,embeddings,reranker,classifier) asolla.type, and/olla/models/{id}as a top-leveltype, viaModelKind()inconverter/base_converter.go.?type=matches that kind exactly. A model reportingvlmor carryingvisionisvlmonly.?capability=chatis unchanged and still returns every model that can chat, vision models included.The vLLM, SGLang, Lemonade, LMDeploy, llama.cpp, vLLM-MLX and Docker Model Runner parsers no longer write their provider name into
type, so/internal/status/modelsomits it unless the backend reported a kind. In the LM Studio-format listing, rerankers and classifiers recognised by name now get their owntypeinstead of falling back tollm; that value can bererankerorclassifier, outside LM Studio's own vocabulary.Type of change
How was this tested?
New and updated tests:
TestModelKind,TestModelInfoKind,TestUnifiedModels_ModelKindTestDefaultUnifier_ProviderNameIsNotModelType?type=and?capability=chatcases inhandler_unified_models_test.goandhandler_status_models_test.gotypeTested together with the other October follow-up branches on a local integration branch at
0c25e0a:make readyandmake test-racepass at0c25e0a/olla-validate --quick: 42 pass, 0 fail (warnings and skips are nightly-only items)tei-routingvalidation area: Section A 12/12, Section B B1 to B6 pass/test-sticky-sessions: no new failures (the 7 provider-route 404s are the known shared-mock-URL limitation)/claude-code-e2eagainst real Ollama: Tier A 16/0 on both the passthrough and translation legs, same as mainChecklist
make readypasses at5a9c361Summary by CodeRabbit
llm,vlm,embeddingsorreranker, when it can be determined.type; capability filters remain available for matching what models can do.