mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-21 09:01:47 -05:00
[PR #24228] fix(retrieval): strip embedding model name to avoid silent 404 failures #50556
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/24228
Author: @PHclaw
Created: 4/29/2026
Status: 🔄 Open
Base:
main← Head:fix/embedding-model-strip-whitespace📝 Commits (1)
23eb403fix(retrieval): strip embedding model name to avoid silent 404 failures (closes #24090)📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
backend/open_webui/retrieval/utils.py(+2 -2)📄 Description
Summary
Fixes #24090
When an embedding model name has trailing/leading whitespace (e.g.,
qwen3-embedding-4b), Open WebUI sends the padded string verbatim to the embedding API, resulting in a silent 404 error. The UI shows the file as "processed" but no vectors are stored.Bug
If
model = "qwen3-embedding-4b ", the API call becomes:The API returns 404:
Model 'qwen3-embedding-4b ' not found, but this error is silently caught and the file appears processed in the UI.Fix
Strip whitespace from the model name in both
generate_openai_batch_embeddingsandagenerate_openai_batch_embeddings:This ensures that
"qwen3-embedding-4b "is correctly treated as"qwen3-embedding-4b".Testing
"qwen3-embedding-4b "(with trailing space) in Admin Panel🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.