mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-22 16:44:06 -05:00
[GH-ISSUE #12821] issue: Bug in the /ollama/api/embed API with models lacking tags (and with prefixes). #71328
Reference in New Issue
Block a user
Originally created by @gmammolo on GitHub (Apr 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12821
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
0.6.4
Ollama Version (if applicable)
0.6.5
Operating System
Ubuntu 22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
The POST $HOSTNAME/ollama/api/embed should succeed and respond as if the request were made directly to Ollama.
Actual Behavior
The tests were conducted with the nomic-embed-text:latest model in Ollama.
Ollama is connected to OpenWebUI with the prefix “core”.
Currently, it’s not possible to specify a valid model without encountering this error.
Steps to Reproduce
Logs & Screenshots
Additional Information
I’ve already implemented a fix and will submit it as a pull request as soon as possible.
The issue is in the file
./backend/open_webui/routers/ollama.py.On line 354, valid models are filtered, automatically excluding those without an explicit tag (or with the 'latest' tag).
Furthermore, the API currently only works if Ollama doesn't have a prefix.
If the Ollama server has a prefix, the model must be entered as core.nomic-embed-tex, but this is sent to Ollama as-is, resulting in an error.
Therefore, I’ve also added a fix that allows entering
$PREFIX_ID.nomic-embed-tex(to also specify which Ollama server to use for the request), but removes the prefix before making the request.@tjbck commented on GitHub (Apr 14, 2025):
https://github.com/open-webui/open-webui/issues/8719