Repository navigation
feat(addons): add the Ollama search add-on - #13383
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>
Ollama has no public search API, so the add-on reads the HTML of two pages of ollama.com: the search page and the tags page of one model. It never requests a path under /api or /v1, which the robots.txt of the site disallows. It sends a fixed user agent, waits 20 seconds at most and reads 4 MiB at most. Each row has the model name, the ollama:// URI, the library page, the download count, the update date and the capability and size tags. The source declares the downloads, updated and latest sorts and three bool filters (tools, vision, thinking). It always asks for local models, so models that run only in the cloud are left out. The tags of a model are read only when the variants argument of the tool is set, never for a search. A page with an unexpected layout gives an error that names the page, not an empty list. The tests run on recorded pages and on a local server. The source does not claim variants (hasVariants is false) because the host does not call the variants argument yet. Models install by the ollama:// name or by ollama://name:tag. Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Add the add-on to the package workflow matrix, the library template and index, the package suites, the checks that list the first-party add-ons (it ships no UI, like the Pirate Face add-on), the catalogue and the model search documentation. Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Some tags of the Ollama library (mlx, nvfp4, mxfp8, for example 27b-mlx or 27b-nvfp4) hold per-tensor safetensors layers, not a GGUF model, so llama.cpp cannot run them and the importer refuses them. The tags list now skips every tag whose name contains mlx, nvfp4 or mxfp8, and keeps bf16, fp16 and quantized tags such as q4_K_M. The search page has no marker for these builds (no badge, and the names do not say it), so the search rows are not filtered. 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
mudler
force-pushed
the
feat/ollama-search-addon
branch
from
November 21, 2026 23:41
7c0e8ac to
f576425
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.
Stacked on #13381; retarget to master after it merges.
What
A new add-on,
ollama-search, that adds the public Ollama model library as a source of the model search (source IDollama). Results carry the model name, anollama://<name>URI, the library page, the download count, the update date and the capability and size tags (tools,vision,thinking,8b, ...).tools,vision,thinking.Why
Ollama models were not reachable from the model search. #13381 lets the host accept
ollama://results; this add-on is the source that produces them.How
Ollama has no public search API, so the add-on reads the HTML of ollama.com/search. It never requests a path under
/apior/v1, which the site's robots.txt disallows. It sends a fixed user agent, waits at most 20 seconds, reads at most 4 MiB, cuts the search text at 200 bytes and returns at most 50 rows. A page with an unexpected layout (no result count, or a count with no rows) gives an error that names the page, so a markup change is visible and never looks like an empty result. A non-200 answer gives an error with the status.The add-on registration follows the Pirate Face search add-on: package workflow matrix, platforms file, library template and index, package suites, first-party lists in tests, catalogue and model search docs.
Limits
hasVariants: false. The add-on can read the tags page of a model: itssearchtool takes avariantsargument and returns one entry per tag with size and context window. The host does not call that argument yet, so tag choice from the model list needs a follow-up host change that calls it. Until then a user can import a size by enteringollama://<name>:<tag>. The UI does not list tags.mlx,nvfp4ormxfp8), because llama.cpp cannot run them. The search page has no marker for such builds, so search rows are not filtered by it.Tests
Recorded pages of the search and tags pages (fetched 2026-11-21) are kept under
testdata/; the tests never call the live site.go test -tags nosqlite,purego_utp ./addons/ollama-search/...: 36 specs pass (parsers, runtime against a local server, limits, filters, sort mapping, variants, error paths, manifest, host search)../pkg/modelsearch/,./pkg/addons/packaging/,./pkg/addons/contract/pass../core/application/ -ginkgo.focus "Ollama search add-on|model search backend": 5 specs pass. The full package was not run to the end: it times out under load../core/services/addons/catalog/passes with a local temp dir. With a network-mounted temp dir 3 tests fail on file permissions, unrelated to this change.sh scripts/addons/catalog.sh --channel development --checkpasses;golangci-linton the add-on reports no issues.Not verified
scripts/addons/package_test.shneeds the UInode_modules, so it did not run.🤖 Generated with Claude Code