mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #24090] issue: RAG embedding fails silently when embedding model name has trailing whitespace #123489
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 @oatmealm on GitHub (Apr 24, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24090
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.9.2
Ollama Version (if applicable)
n/a
Operating System
Debian 12
Browser (if applicable)
n/a
Confirmation
README.md.Expected Behavior
When a model name is configured in Admin Panel → Settings → Documents → Embedding Model, whitespace should be trimmed and the correct model name sent to the embedding API. Alternatively, the input field should reject trailing/leading whitespace.
Actual Behavior
When the embedding model name has trailing whitespace (e.g. qwen3-embedding-4b ), open-webui sends the padded string verbatim to the embedding endpoint, resulting in a 404:
POST /v1/embeddings → 404: Model 'qwen3-embedding-4b ' not found.
Available models: qwen3-embedding-4b, ...
File processing silently fails. The UI shows the upload as accepted (HTTP 200) but no vectors are stored (in ChromaDB in my case).
Steps to Reproduce
Logs & Screenshots
omlx.server - WARNING - POST /v1/embeddings → 404: Model 'qwen3-embedding-4b ' not found.
open_webui.routers.retrieval:process_file:1749 - 404, message='Not Found', url='http:///v1/embeddings'
open_webui.routers.files:_process_handler:157 - Error processing file:
Additional Information
The fix should be .strip() on the model name before use in retrieval/utils.py agenerate_openai_batch_embeddings, and/or trimming the value on save in the admin settings form.
@tjbck commented on GitHub (May 8, 2026):
Updated to strip model name on save in dev.