Repository navigation
feat(modelsearch): accept ollama:// search results and list their layers - #13381
Merged
Merged
Conversation
A search add-on can now return rows whose uri is ollama://name[:tag]. The host used to drop them, and the repository routes could not read them. ollama://name[:tag] and ollama://user/name[:tag] are parsed to a canonical namespace/name:tag id: a bare name is in the library namespace and the default tag is latest. The file listing and the memory estimate read the registry manifest. The model layer is the one gguf file and the only variant, a projector layer is listed as mmproj, and the template, parameter, licence and system layers are skipped. Installed models are matched by the row uri, since the row id is free text for such a source. Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
mudler
force-pushed
the
feat/ollama-host-uri
branch
from
November 21, 2026 23:41
df50afb to
a632661
Compare
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.
What
A model search add-on can return rows with an
ollama://name[:tag]uri. This change lets the host keep those rows and read them.ollama://is an accepted scheme for search results.ParseRepoURIandRepoOfURIunderstandollama://name[:tag]andollama://user/name[:tag]. A bare name islibrary/name. The default tag islatest. Empty names, spaces,.., extra colons and extra path segments are rejected./api/models/remote/filesand/api/models/remote/estimateread the Ollama registry manifest. The model layer is the onegguffile and the only variant. A projector layer is listed asmmprojand is not part of the variant. Template, parameter, licence and system layers are not listed. The response shape is the same as for Hugging Face and Pirate Face. The estimate reads the GGUF header from the blob address and falls back to the file size when that fails.The registry is read with the same HTTP client, size cap, cache, concurrency budget and error mapping as the other providers. The importer and blob download are not changed here.
Why
Without this, rows with an
ollama://uri are dropped, and the file list and estimate routes answer "bad repository" for them.How tested
Package tests with
-tags nosqlite,purego_utpforpkg/modelsearch,pkg/downloader,core/gallery/remotemodelandcore/http/endpoints/localai: URI parsing table (good and bad forms), the row cleaner, the file list and estimate against a local test registry (a text model and a vision model with a projector), and the two routes. Each new test was shown to fail when the code it covers is broken.golangci-lintis clean on the touched packages. No network is used.🤖 Generated with Claude Code