mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 08:21:12 -05:00
[PR #24897] [CLOSED] fix: forward channel document files to model replies #131580
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/24897
Author: @rozgo
Created: 5/19/2026
Status: ❌ Closed
Base:
dev← Head:fix/channel-model-document-files📝 Commits (1)
a390ff9fix: forward channel document files to model replies📊 Changes
1 file changed (+33 additions, -6 deletions)
View changed files
📝
backend/open_webui/routers/channels.py(+33 -6)📄 Description
Pull Request Checklist
devbranch.form_data["files"]request shape consumed by the chat completion file/RAG handler. No new settings or architecture changes.dev, with no unrelated commits.fix:prefix.Summary
Channel model replies currently build a synthetic chat completion request from the channel thread. That request collected text and image attachments, but dropped non-image files such as PDFs and DOCX files.
This PR forwards non-image channel attachments as
form_data["files"], matching the request shape already used by normal direct chat. That lets the existing chat completion file/RAG pipeline process uploaded channel documents for tagged model replies.The existing image handling is preserved, and repeated file references are deduplicated before forwarding.
Root Cause
backend/open_webui/routers/channels.pyiterated overthread_message.data.filesinsidemodel_response_handler, but only appended image attachments to the model request. Non-image documents were neither added to the image content nor passed throughform_data["files"], so the downstreamchat_completion_files_handlernever received them.Direct chat worked because it already passes uploaded files through
form_data["files"]into request metadata.Testing
python -m py_compile backend/open_webui/routers/channels.py.uvx ruff format --check backend/open_webui/routers/channels.py.git diff --check HEAD~1..HEAD.model_response_handlerconfirming:form_data["files"].chat_id = "channel:<id>".Changelog Entry
Description
Added
Changed
form_data["files"].Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.