mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
issue: Chat is saved on every token, even with ENABLE_REALTIME_CHAT_SAVE set to FALSE #6183
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 @aleprj on GitHub (Aug 22, 2025).
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
0.6.25
Ollama Version (if applicable)
No response
Operating System
Windows 11
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When using a streming model, the chat should be saved in the database only after the full message is received, unless ENABLE_REALTIME_CHAT_SAVE is set to TRUE.
Actual Behavior
In multiple scenarios (for instance when using a custom pipe) the chat is saved to the database on every token received, even with ENABLE_REALTIME_CHAT_SAVE set to false.
It doesn't seem to be something bad, but I'm dealing with "large" files (actually a 3MB Excel file, I wouldn't call it large) and It makes the pipe unusable unless we turn off streaming.
Steps to Reproduce
1 - Make sure ENABLE_REALTIME_CHAT_SAVE is set to false
2 - Make a custom Function that uses streaming
3 - Start a chat in your custom modem
4 - Add a very large prompt (or a file)
5- Enjoy the slow motion streaming of the answer. Also, the whole system becomes slow for all users as a very large json is being updated in the database multiple times in a row.
Logs & Screenshots
No logs
Additional Information
I will be adding a PR to fix this. In my test it reduced the answer from ~300s to ~5s.
@tjbck commented on GitHub (Aug 26, 2025):
You can techinically use
chat:message:deltaevent instead ofmessage, keep us updated.