[GH-ISSUE #24090] issue: RAG embedding fails silently when embedding model name has trailing whitespace #90917

Closed
opened 2026-05-15 16:12:13 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @oatmealm on GitHub (Apr 24, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24090

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

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

  1. Configure an external OpenAI-compatible embedding endpoint (RAG_OPENAI_API_BASE_URL)
  2. Set the embedding model name with a trailing space (e.g. qwen3-embedding-4b ) in Admin Panel → Settings → Documents
  3. Upload any file to a knowledge base
  4. Observe 404 error in container logs; file appears processed in UI but is not embedded

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.

Originally created by @oatmealm on GitHub (Apr 24, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24090 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### 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 1. Configure an external OpenAI-compatible embedding endpoint (RAG_OPENAI_API_BASE_URL) 2. Set the embedding model name with a trailing space (e.g. qwen3-embedding-4b ) in Admin Panel → Settings → Documents 3. Upload any file to a knowledge base 4. Observe 404 error in container logs; file appears processed in UI but is not embedded ### 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://<host>/v1/embeddings' open_webui.routers.files:_process_handler:157 - Error processing file: <file-id> ### 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.
GiteaMirror added the bug label 2026-05-15 16:12:13 -05:00
Author
Owner

@tjbck commented on GitHub (May 8, 2026):

Updated to strip model name on save in dev.

<!-- gh-comment-id:4409109039 --> @tjbck commented on GitHub (May 8, 2026): Updated to strip model name on save in dev.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#90917