mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #22284] feat: Knowledge Base / RAG Integration in Channels #35217
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 @nrmjeremy on GitHub (Mar 6, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22284
Check Existing Issues
Verify Feature Scope
Problem Description
Summary
Enable Knowledge Base retrieval (RAG) and knowledge builtin tools when @mentioning models in Channels, consistent with how they work in standard Chat.
Current Behavior
When a model is @mentioned in a Channel, the message is routed through
/api/v1/channels/.../messages/post. At this point:web_searchandweb_fetchtools are injected into the tool list sent to the modelquery_knowledge_bases,list_knowledge_bases,query_knowledge_files) are not injectedThis is confirmed in Docker logs during a Channel @mention:
No knowledge tools appear. No
query_collectionorhybrid_searchcalls are made.By contrast, the same model used in a standard Chat correctly receives RAG-injected context from its attached Knowledge Base.
Steps to Reproduce
Desired Solution you'd like
When a model is @mentioned in a Channel:
query_knowledge_bases,list_knowledge_bases, etc.) should be available in the tool list, consistent with Native Function Calling behavior in standard ChatUse Case / Why This Matters
Channels are positioned as a collaborative workspace for teams and AI models working together. A core enterprise workflow this enables is:
This workflow is fully functional except for KB access in Channels. The Knowledge Base indexes correctly, model wrappers with KB attached work correctly in Chat, and the Channel threading/mention system works correctly. The only missing piece is the KB pipeline not being invoked on the Channel message path.
This is not a configuration issue — it is a gap in the Channel message routing pipeline. Adding KB tool injection and/or RAG context injection to the Channel path would complete an otherwise production-ready collaborative AI workflow.
Suggested Implementation
The Channel message handler should invoke the same RAG/tool injection pipeline that the standard chat completion handler uses, scoped to the model being @mentioned and its configured Knowledge Base attachments.
Alternatives Considered
No response
Additional Context
Environment
@i4j5 commented on GitHub (Mar 6, 2026):
the same problem
@nrmjeremy commented on GitHub (Mar 6, 2026):
@i4j5 Thanks for the quick confirmation — good to know others are hitting this too.
I'd like to contribute a fix if it would be welcome. Before spinning up on it, a couple of questions for the maintainers:
Is there an active branch or in-progress work toward this? I don't want to duplicate effort or submit a PR that conflicts with something already underway.
If a community PR would be welcome, any guidance on scope? From what I can tell the fix is in the Channel message routing pipeline — it needs to invoke the same RAG/tool injection that the standard chat completion path uses, scoped to the @mentioned model's configured Knowledge Base. Happy to be corrected if the right approach is different.
For context on my setup and diagnosis: I've traced this through Docker logs on a v0.8.8 instance. The Channel path only injects web_search and web_fetch tools — no knowledge tools appear, and no query_collection or hybrid_search calls are made. The same model wrapper with an attached Knowledge Base works correctly in standard Chat. So the gap appears to be isolated to the Channel message handler.
Happy to contribute this back to the community if it's a good use of effort. Let me know!
@tjbck commented on GitHub (Mar 7, 2026):
#8050