[GH-ISSUE #17293] feat: Add option for custom RAG handling: send uploaded files and query directly to backend #105226

Closed
opened 2026-05-18 03:09:01 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @NaumanHSA on GitHub (Sep 9, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17293

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Background / Current Behavior

When files are uploaded to Open WebUI, they are processed internally:

  • Text is extracted
  • Embedded and stored in Open WebUI’s vector store
  • The chat/completions request sent to the backend only references file identifiers — not file contents or binaries.

This forces users to rely on Open WebUI’s RAG pipeline and prevents them from handling chunking or retrieval augmentation themselves.

Desired Solution you'd like

Request

Add an option (via config or API toggle) to bypass internal RAG processing, so that uploaded files and the user query are sent directly — unaltered — to the backend (e.g., in a /v1/files call or inline within the chat/completions payload).

This would allow users to manage RAG workflows externally, enabling full control of chunking, embedding, vector store, retrieval, etc.

Benefits

  • Full control: Users can implement custom RAG engines, chunking, embedding, and retrieval in their own backend.
  • Reduced duplication: Avoids unnecessary embedding or vector store overhead in OWUI when users already handle RAG.
  • Extensibility: Supports advanced pipelines (on-premise vector stores, fine-tuned retrievers, hybrid pipelines).
  • Clear separation of concerns: UI for uploads vs backend for RAG logic.

Suggested Implementation

  • Add a new config or environment variable, e.g.:
    • CUSTOM_RAG_HANDLING=true
  • Or provide a toggle in Admin Settings → Documents (e.g., “Passthrough Files to Backend”).
  • When enabled:
    • Files are sent to the backend’s /v1/files endpoint in extracted (or raw) form, instead of embedded locally.
    • Optionally support raw binary upload.
    • The chat/completions call references file contents or includes them inline, not just file IDs.

Additional Notes

This feature would complement existing “Bypass Embedding & Retrieval” modes.
A truly custom RAG setup requires the ability to handle files/data fully on the backend, rather than partially via OWUI.

Endpoint parity (e.g., following OpenAI’s /v1/files semantics) could ease adoption.


Would love your feedback!

Alternatives Considered

No response

Additional Context

No response

Originally created by @NaumanHSA on GitHub (Sep 9, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17293 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description ## Background / Current Behavior When files are uploaded to Open WebUI, they are processed internally: - Text is extracted - Embedded and stored in Open WebUI’s vector store - The `chat/completions` request sent to the backend only references file identifiers — **not** file contents or binaries. This forces users to rely on Open WebUI’s RAG pipeline and prevents them from handling chunking or retrieval augmentation themselves. ### Desired Solution you'd like ## Request Add an option (via config or API toggle) to **bypass internal RAG processing**, so that uploaded files and the user query are sent directly — unaltered — to the backend (e.g., in a `/v1/files` call or inline within the `chat/completions` payload). This would allow users to manage RAG workflows externally, enabling full control of chunking, embedding, vector store, retrieval, etc. ## Benefits - **Full control**: Users can implement custom RAG engines, chunking, embedding, and retrieval in their own backend. - **Reduced duplication**: Avoids unnecessary embedding or vector store overhead in OWUI when users already handle RAG. - **Extensibility**: Supports advanced pipelines (on-premise vector stores, fine-tuned retrievers, hybrid pipelines). - **Clear separation of concerns**: UI for uploads vs backend for RAG logic. ## Suggested Implementation - Add a new config or environment variable, e.g.: - `CUSTOM_RAG_HANDLING=true` - Or provide a toggle in **Admin Settings → Documents** (e.g., “Passthrough Files to Backend”). - When enabled: - Files are sent to the backend’s `/v1/files` endpoint in extracted (or raw) form, **instead of embedded locally**. - Optionally support raw binary upload. - The `chat/completions` call references file contents or includes them inline, not just file IDs. ## Additional Notes This feature would complement existing “Bypass Embedding & Retrieval” modes. A truly custom RAG setup requires the ability to handle files/data fully on the backend, rather than partially via OWUI. Endpoint parity (e.g., following OpenAI’s `/v1/files` semantics) could ease adoption. --- Would love your feedback! ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#105226