mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-10 23:55:15 -05:00
[GH-ISSUE #18752] issue: Ollama api inconsistencies leading to an incompatibility with zed #105688
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Maximilian-Staab on GitHub (Oct 31, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/18752
Check Existing Issues
Installation Method
Other
Open WebUI Version
v0.6.34
Ollama Version (if applicable)
0.12.6
Operating System
NixOS unstable
Browser (if applicable)
Firefox 144.0
Confirmation
README.md.Expected Behavior
Open WebUi implements an Ollama compatible API in a way that is consistent with Ollamas reference implementation.
This API should gracefully handle multiple Ollama backends.
Querying
${OLLAMA_API_BASE_URL}/api/tagsshould returnnamein such a way that consequent calls to${OLLAMA_API_BASE_URL}/api/showwith{model: $name}will succeed, even if multiple Ollama endpoints are registered with Open WebUi.Actual Behavior
Querying
${OLLAMA_API_BASE_URL}/api/tagsreturns a json that looks like this:
The official Ollama-Endpoint returns
name, but notmodel. Software depending on Ollama will use$namein their request to${OLLAMA_API_BASE_URL}/api/show, which will fail if the model is only available in theremote-ollamainstance.It's currently possible to insead query
${OLLAMA_API_BASE_URL}/api/show/<id>, but this is non-standard as well and not supported by software developed against the regular Ollama API.Suggestion
I see two possibilities to fix this:
<id>at the end of all requests to Open-WebUi, use e.g.${OLLAMA_API_BASE_URL}/<id>/...as a way to specify the different Ollama backends. Default to0if the parameter is missing as to not break existing setups. It's a bit of a bigger change, because all endpoints would need to be updated. Requires more code changes to untangle implicit searches in over all endpoints.modelasname, then parse the prefix and map to the correct backend. This currently fails due to this line:7a83e7dfa3/backend/open_webui/routers/ollama.py (L993)which doesn't strip theprefixand instead forwards the original request json. The prefixed ollama endpoint doesn't know of its prefix, so it fails to find the model.Steps to Reproduce
settings.json:"language_models": { "ollama": { "api_url": "https://webui.<redacted>/ollama" }, },Take a look at the curl examples I added throughout the issue.
Logs & Screenshots
Logs after Zed tries to fetch models:
Browser: n/a
Logs after a manual call with
prefix_idadded toname:Additional Information
I'm open to creating the PR myself if you agree with any of the solutions, or have a better suggestion.
@martin-huber commented on GitHub (Jan 22, 2026):
We are using open-webui version 0.7.2 - and this issue still is an issue.
The main point is:
most of the endpoint implementions in ollama.py are doing:
before making the downstream request - but this stripping off of the prefix_id is missing in
@martin-huber commented on GitHub (Jan 22, 2026):
@tjbck - can you re-open this issue - any maybe change the title to "ollama proxy does not remove model prefix id when executing /api/show" ?
@martin-huber commented on GitHub (Jan 22, 2026):
ok, no, I didn't read the initial post thoroughly enough.
Wouldn't it be better, to introduce the prefixes in the "name" properties in the models of the /api/tags response instead of introducing the additional "model" there ? And use "name" then as the unique key for model + connection ?