mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-24 11:58:31 -05:00
[GH-ISSUE #24852] Filter outlet replace/status events do not update first assistant message with Native tools + streaming #123722
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 @gerpervaz on GitHub (May 17, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24852
Check Existing Issues
Installation Method
Docker
Open WebUI Version
latest main/stable as of 2026-05-17
Ollama Version (if applicable)
N/A - using vLLM OpenAI-compatible backend
Operating System
Ubuntu Linux with Open WebUI running in Docker
Browser (if applicable)
Chromium and Chrome
Confirmation
README.md.Expected Behavior
When a Filter modifies the assistant message in outlet, or emits frontend events such as replace, status, notification, or execute, the currently visible assistant message should update immediately, including on the first assistant response of a new chat.
This is especially important for safety/validation filters that block invalid tool or code-interpreter results. The user should not keep seeing a streamed answer that the filter has already invalidated.
Actual Behavior
On the first assistant response of a new chat, the Filter runs and the message content is replaced in the persisted chat state, but the visible UI keeps showing the original streamed assistant response.
The replacement becomes visible after leaving and re-entering the chat. It also works correctly when pressing Regenerate, and in subsequent conversation turns.
Events emitted from outlet such as replace, status, notification, and execute do not appear to update the first rendered assistant message. The same filter behavior is visible on regenerate / later turns.
Steps to Reproduce
Minimal filter logic:
The same issue is reproducible with a more realistic filter that only blocks failed execute_code / code_interpreter results.
Logs & Screenshots
Observed structured assistant output includes Native function calls and function_call_output messages. In the failing case, Open WebUI receives a tool/code result with stderr, e.g. NameError or SyntaxError, and the filter replaces the final assistant message.
The persisted chat content is changed correctly. After reload / leaving and re-entering the chat, the replacement is visible.
Browser console showed no actionable client-side error related to this issue during the reproduction. Docker/container logs do not show a backend crash; the issue appears to be frontend state/render lifecycle behavior for the first streamed assistant message.
Screenshots available for attachment:
Screenshot first response.png— first assistant response keeps showing the original streamed response despite failed execution / guard replacement.Screenshot succeded response after regeneration.png— after regeneration, the guard replacement and notification are visible.I attempted to attach these screenshots through the GitHub issue form. If they are not visible as attachments below, I can attach them manually after submitting or in a follow-up comment.
Additional Information
This appears specific to the first assistant message lifecycle under Native tool calling + streaming. The same Filter behavior works on Regenerate and later turns.
This may be related to streamed chat completion snapshots overwriting frontend events emitted from outlet, or to the first assistant message component not yet being subscribed to outlet-emitted events.
Relevant backend/model configuration:
--enable-auto-tool-choice--tool-call-parser qwen3_coder--reasoning-parser qwen3The issue does not appear to be that tool calling fails. Native tool calls and
function_call_outputmessages are produced correctly. The issue is that a Filteroutletreplacement/event emitted after the first streamed assistant message is not reflected in the visible UI until reload/regenerate/subsequent turns.Use case: a safety filter validates Code Interpreter / execute_code results. If execution fails or returns no verifiable stdout/result, the filter replaces the final answer to prevent the model from presenting fabricated results. When the first visible streamed answer is not updated, users may trust an invalid response until they reload the chat.
@owui-terminator[bot] commented on GitHub (May 17, 2026):
⚠️ Missing Issue Title Prefix
@gerpervaz, your issue title is missing a categorising prefix (e.g.
bug:,feat:,docs:).Please update the title to lead with one of:
Example:
bug: Login fails when the password contains special characters@owui-terminator[bot] commented on GitHub (May 17, 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:
🟢 #24714 issue: Filter outlet-modified assistant content is persisted in chat_message.content but lost from chat.chat history after reload
This is the closest match: it reports that outlet-modified assistant content is persisted but not reflected consistently in the chat UI/history after reload. Your issue differs in that the problem shows up immediately on the first streamed assistant message, but both point to outlet changes not being properly reflected in the visible chat state.
by etiennegnome ·
bug🟣 #14221 issue: Streaming breaks (disables) with native tool calling
This earlier native-tool-calling bug shows that streaming behaves incorrectly when native tools are enabled. While it is not about outlet events specifically, it is related to the same tool-calling + streaming path that your issue says triggers the stale first assistant render.
by rvkwi ·
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.
@gerpervaz commented on GitHub (May 21, 2026):
Thanks, I checked the related issues.
#24714 is very close and may share the same underlying synchronization problem between Filter
outlet()changes and the chat state used by the UI/history.The main difference is the timing and visible surface:
So I think this is not a pure duplicate unless maintainers want to track all Filter outlet synchronization issues in #24714. It may be the same family of bug, but this report specifically covers the first-message visible render path with Native tools + streaming.
#14221 seems more general and older: streaming behavior with native tool calling. It is related context, but it does not cover Filter outlet replacement/status events or the stale first assistant render.