[GH-ISSUE #24896] bug: Channel model replies ignore uploaded document attachments #123733

Closed
opened 2026-05-21 03:12:48 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @rozgo on GitHub (May 19, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24896

Bug Report

Description

When a user uploads non-image documents, such as PDFs or DOCX files, to a channel and then tags a model in that channel thread, the model reply path does not forward those document attachments to the chat/RAG pipeline.

The UI saves and displays the uploaded channel files, but the backend builds a separate synthetic AI request for the channel model reply. That request currently includes text and image attachments only, so non-image documents are omitted.

Reproduction

  1. Create or open a channel.
  2. Upload two document files, for example PDF or DOCX files, to a channel message.
  3. In the same channel thread, tag a model and ask it to compare or summarize the uploaded documents.
  4. Observe that the model does not receive the documents and asks the user to provide them again.

Expected Behavior

Channel model replies should receive uploaded non-image documents through the same file/RAG context pipeline used by normal direct chat.

Actual Behavior

The channel model reply request only includes text and image attachments. Non-image files from thread_message.data.files are ignored when model_response_handler builds the synthetic chat completion request.

Root Cause

backend/open_webui/routers/channels.py collects image attachments from channel thread messages, but does not pass non-image file attachments into form_data["files"]. Since the downstream chat completion pipeline reads files from the request metadata, the RAG/file context handler never sees those channel documents.

Impact

Users can upload documents to channels and see them in the UI, but tagged model replies cannot use those documents. This makes document comparison and summarization workflows fail in channels even though they work in direct chat.

Originally created by @rozgo on GitHub (May 19, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24896 ## Bug Report ### Description When a user uploads non-image documents, such as PDFs or DOCX files, to a channel and then tags a model in that channel thread, the model reply path does not forward those document attachments to the chat/RAG pipeline. The UI saves and displays the uploaded channel files, but the backend builds a separate synthetic AI request for the channel model reply. That request currently includes text and image attachments only, so non-image documents are omitted. ### Reproduction 1. Create or open a channel. 2. Upload two document files, for example PDF or DOCX files, to a channel message. 3. In the same channel thread, tag a model and ask it to compare or summarize the uploaded documents. 4. Observe that the model does not receive the documents and asks the user to provide them again. ### Expected Behavior Channel model replies should receive uploaded non-image documents through the same file/RAG context pipeline used by normal direct chat. ### Actual Behavior The channel model reply request only includes text and image attachments. Non-image files from `thread_message.data.files` are ignored when `model_response_handler` builds the synthetic chat completion request. ### Root Cause `backend/open_webui/routers/channels.py` collects image attachments from channel thread messages, but does not pass non-image file attachments into `form_data["files"]`. Since the downstream chat completion pipeline reads files from the request metadata, the RAG/file context handler never sees those channel documents. ### Impact Users can upload documents to channels and see them in the UI, but tagged model replies cannot use those documents. This makes document comparison and summarization workflows fail in channels even though they work in direct chat.
Author
Owner

@owui-terminator[bot] commented on GitHub (May 19, 2026):

⚠️ Missing Issue Title Prefix

@rozgo, your issue title is missing a categorising prefix (e.g. bug:, feat:, docs:).

Please update the title to lead with one of:

  • bug: bug report or error
  • feat: feature request or enhancement
  • docs: documentation issue
  • question: usage question
  • help: support request

Example: bug: Login fails when the password contains special characters

<!-- gh-comment-id:4483716060 --> @owui-terminator[bot] commented on GitHub (May 19, 2026): # ⚠️ Missing Issue Title Prefix @rozgo, your issue title is missing a categorising prefix (e.g. `bug:`, `feat:`, `docs:`). Please update the title to lead with one of: - **bug**: bug report or error - **feat**: feature request or enhancement - **docs**: documentation issue - **question**: usage question - **help**: support request Example: `bug: Login fails when the password contains special characters`
Author
Owner

@owui-terminator[bot] commented on GitHub (May 19, 2026):

🔍 Related Issues Found

I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:

  1. 🟣 #23686 issue: Missing document context in channel messages
    This is the closest match: it explicitly reports missing document context in channel messages, and the body says channel model replies do not use uploaded PDF/document context, which aligns with the new bug.
    by carpemonf · bug

  2. 🟣 #21582 issue: File attachments show “No content” in UI and are not accessible to the model (0.8.3 / main/ dev)
    This issue covers file attachments being inaccessible to the model. While it is not channel-specific, it describes the broader backend/file-context failure for uploaded documents that the new issue is also about.
    by MacJedi42 · bug

  3. 🟣 #22880 issue: Models like Gemini and Claude fail when a message contains only file/image attachment without text
    This is related to attachment handling in model requests, especially when files are present without text. It is broader than the new issue, but it touches the same attachment-to-model pipeline that channel replies rely on.
    by ShirasawaSama · bug


💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.

This comment was generated automatically. React with 👍 if helpful, 👎 if not.

<!-- gh-comment-id:4483716644 --> @owui-terminator[bot] commented on GitHub (May 19, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟣 [#23686](https://github.com/open-webui/open-webui/issues/23686) **issue: Missing document context in channel messages** *This is the closest match: it explicitly reports missing document context in channel messages, and the body says channel model replies do not use uploaded PDF/document context, which aligns with the new bug.* *by carpemonf · `bug`* 2. 🟣 [#21582](https://github.com/open-webui/open-webui/issues/21582) **issue: File attachments show “No content” in UI and are not accessible to the model (0.8.3 / main/ dev)** *This issue covers file attachments being inaccessible to the model. While it is not channel-specific, it describes the broader backend/file-context failure for uploaded documents that the new issue is also about.* *by MacJedi42 · `bug`* 3. 🟣 [#22880](https://github.com/open-webui/open-webui/issues/22880) **issue: Models like Gemini and Claude fail when a message contains only file/image attachment without text** *This is related to attachment handling in model requests, especially when files are present without text. It is broader than the new issue, but it touches the same attachment-to-model pipeline that channel replies rely on.* *by ShirasawaSama · `bug`* --- 💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead. *This comment was generated automatically.* React with 👍 if helpful, 👎 if not.
Author
Owner

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

Addressed in dev!

<!-- gh-comment-id:4490040535 --> @tjbck commented on GitHub (May 19, 2026): Addressed 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#123733