mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #12823] [CLOSED] **fix** - Bug in the /ollama/api/embed API with models lacking tags (and with prefixes). #23029
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/12823
Author: @gmammolo
Created: 4/13/2025
Status: ❌ Closed
Base:
dev← Head:dev📝 Commits (3)
eeb5a58fix /ollama/api/embed APIbc48a66Merge branch 'fix/ollama-api-embed' into dev4890377improve check📊 Changes
1 file changed (+16 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/ollama.py(+16 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
https://github.com/open-webui/open-webui/issues/12821
The ollama/api/embed API is failing because the model is considered invalid, as it cannot pass the currently imposed filters (even though it is functioning correctly in Ollama).
I’ve implemented a fix to support models with the server prefix (in my case, called “core”). This is because you can have multiple Ollama instances, and from what I understood during debugging, they could potentially all be used.
Therefore, it seemed correct that the model should be written as $PREFIX.$MODEL:$TAG, and that OpenWebUI should remove the $PREFIX (which is transparent to Ollama) before sending the request.
Fixed
Additional Information
old (No tested variation worked.):
After fix (as espected):
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.