mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 21:09:41 -05:00
[GH-ISSUE #17757] issue: Native tool-calling overwrites tool-emitted chat message updates #18387
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 @brandco on GitHub (Sep 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17757
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.30
Ollama Version (if applicable)
No response
Operating System
ghcr.io/open-webui/open-webui:main
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Tool-emitted message updates persist in the visible assistant message during generation, regardless of function-calling mode.
Actual Behavior
In native function-calling, subsequent "chat:completion" events with a full content snapshot replace the message content, effectively overwriting prior tool updates, causing flicker/disappearance.
Steps to Reproduce
In ghcr.io/open-webui/open-webui:main with a model that can support native tool calling:
Logs & Screenshots
With native tool calling:

With default tool calling:

Additional Information
This issue is related to issue 12214 which was closed prematurely.
In native function-calling, the server constructs content_blocks from the streaming model output and repeatedly emits "chat:completion" events with a full serialized content snapshot (mid-stream and at completion). The UI treats these snapshots as authoritative and sets message.content = content.
Client – Snapshots overwrite prior tool updates
@rgaricano commented on GitHub (Sep 25, 2025):
It not a bug.
In Native mode, the event emitter approach doesn't work because Native function calling bypasses Open WebUI's custom tool processing pipeline. When function_calling is set to "native", tools are added directly to the form data for the model to handle natively, rather than going through Open WebUI's chat_completion_tools_handler.
@tjbck commented on GitHub (Sep 25, 2025):
@rgaricano is correct here, you generally should not use
messageevent types in your tool in conjunction with a native function calling.