mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-22 21:19:30 -05:00
[GH-ISSUE #24195] v0.9.2: MCP tool results wrapped in RAG citation template and displayed as raw <source> blocks
#123537
Reference in New Issue
Block a user
Originally created by @Jaypeg-dev on GitHub (Apr 28, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24195
Bug Report
Version
Open WebUI v0.9.2
Description
After upgrading from v0.9.1 to v0.9.2, MCP tool call results are being wrapped in a RAG citation template and displayed visibly in the chat as raw
<source>blocks, instead of being processed silently and used by the model to compose a natural response.The chat displays a block like:
This appears to be a side effect of the MCP asyncio cancellation fix introduced in v0.9.2.
Steps to Reproduce
toolIdsin the model config### Task: Respond to the user query...+<source>block in the chatExpected Behaviour
MCP tool results are processed silently in the background. The model uses the tool result data to compose a natural language response, with no raw JSON or citation blocks visible to the user.
Actual Behaviour
The full RAG citation template is rendered visibly in the chat, including raw
<source>XML blocks containing the tool result JSON. This makes MCP-enabled agents unusable as the chat is flooded with raw tool output.Environment
streamable-http,stateless_http=TrueWorkaround Attempted
Setting
RAG_TEMPLATEenv var to empty string does not persist —PersistentConfigreverts to the default template on every container restart, so this cannot be patched via environment variable.Additional Context
This regression was not present in v0.9.1 (though v0.9.1 had the separate CPU/spinning conversation bug that v0.9.2 fixed). The MCP asyncio cancellation fix in v0.9.2 appears to have changed how tool results are routed through the response pipeline, causing them to pass through the RAG citation renderer instead of the tool result handler.
All MCP tool calls fire correctly and return valid data — the issue is purely in how the results are presented in the UI.
@gorkemozlu commented on GitHub (Apr 29, 2026):
Actually, we found it very useful for debugging, even though it is a regression, maybe we can keep that behaviour under a debug parameter ?