mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-16 12:02:07 -05:00
[PR #12860] [CLOSED] FIX: Error on Ollama Connections Prefixing #9832
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12860
Author: @rgaricano
Created: 4/14/2025
Status: ❌ Closed
Base:
dev← Head:dev📝 Commits (2)
90ea9e2FIX: Error on Ollama Connections Prefixing628651cMerge pull request #8 from rgaricano/rgaricano-patch-1📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/ollama.py(+1 -1)📄 Description
After review address by PR https://github.com/open-webui/open-webui/pull/12823
I detected an error on prefixing code,
As it is, what is prefixed in function is modelID not model name, that cause an incorrect access to model and a incomplete model name showed on list.
AS i commented on referenced PR:
I was testing and I think that the problem is on:
aca37f592d/backend/open_webui/routers/ollama.py (L352)It add prefix to model ID, not to model name, causing that prefixed name isn't showed and a wrong sent if used this list.
The correct have to be:
...................................................
test It with 2 ollamas connections, one on server and second in other computer prefixed as "hp" with just one model ("qwen2:0.5b")
as it is, we have this output:
(2 ollama connections, idx=0 & idx=1, prefixed 1 as 'hp')
Remark:
after prefixed:
After fixing we have the correct output after prefixed:
and in screen, before:

now appear name and modelID correctly:
And successfull response throght /ollama/api/embed API call
cafba7286
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.