mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-30 17:25:30 -05:00
[GH-ISSUE #24714] issue: Filter outlet-modified assistant content is persisted in chat_message.content but lost from chat.chat history after reload #123696
Reference in New Issue
Block a user
Originally created by @etiennegnome on GitHub (May 14, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24714
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.9.5
Ollama Version (if applicable)
v0.23.1
Operating System
LinuxMint 21.3
Browser (if applicable)
Firefox 150.0.1
Confirmation
README.md.Expected Behavior
When a Filter Function modifies the final assistant message in
outlet(), the final modified assistant content should be persisted consistently across all internal representations used by Open WebUI.In particular, after
outlet()modifies:the final assistant content should be synchronized to:
or Open WebUI should use a single canonical message source when reloading a chat.
After navigating away from the chat and coming back, the UI should display the same final assistant content that was visible immediately after generation.
Actual Behavior
Actual Behavior
The modified content appears immediately after generation, which confirms that the Filter Function outlet is executed.
However, after leaving the chat and reopening it:
chat_message.contentstill contains the outlet-modified content;chat.chat.history.messages[assistant_id].contentdoes not contain the same final content;chat.chat.messages[].contentalso appears not to contain the same final content.This suggests that Open WebUI persists or reloads different versions of the assistant message depending on the internal data structure being used.
Description
I am experiencing a synchronization/persistence issue with Open WebUI Filter Functions that modify the final assistant response in
outlet().The filter appends an AI transparency footer to the final assistant message after generation. The footer appears correctly in the current chat after a short delay, which suggests that the
outlet()post-processing is being executed correctly.However, when I switch to another chat, create a new chat, or reload/open the same conversation again, the footer disappears from the displayed assistant message.
After inspecting the SQLite database, I found that the outlet-modified content is correctly persisted in:
but is not consistently reflected in:
As a result, the UI appears to reload the conversation from a stale or non-synchronized representation of the assistant message, instead of using the final outlet-modified content stored in
chat_message.content.This makes Filter Functions that append, transform, watermark, label, redact, or otherwise modify final assistant outputs unreliable after chat reload/navigation.
Why this matters
According to the Open WebUI documentation, Filter Functions can modify model outputs through
outlet(). This is useful for post-processing assistant responses, including:In my case, the filter appends an AI transparency footer for compliance-oriented workflows.
The footer is not cosmetic only. It must remain part of the final assistant message when the conversation is reopened, exported, copied, or reviewed later.
Currently, the modified content is visible immediately after generation, but is lost from the UI after navigating away and returning to the chat.
Installation Method
Pinokio installation and Docker installation : Same effects.
From the user perspective, this behaves like a native Linux installation, not a Docker deployment.
Open WebUI Version
Operating System
Database
Default SQLite database.
I did not manually change the Open WebUI database backend.
Browser
The issue is not browser-cache related.
I tested:
The footer still disappears from the displayed chat after reload/navigation.
Function Type
Filter Function.
The filter is:
The filter uses
outlet()to append content to the last assistant message.Minimal Reproduction Filter
A simplified version of the behavior is:
SQLite Inspection Results
The database contains the following relevant tables:
The relevant columns are:
In recent test chats:
Example observation:
In another older conversation, some messages still had the marker in both places, suggesting that the behavior may have changed after recent updates or internal schema/message-handling changes.
Impact
This issue makes output-modifying Filter Functions unreliable for any workflow that requires the final assistant message to remain stable after generation.
It affects use cases such as:
For compliance-oriented deployments, this is a serious issue because a message shown to the user immediately after generation is not the same message shown after reopening the chat.
Technical Hypothesis
It looks like Open WebUI may now persist the outlet-modified assistant message into
chat_message.content, but does not update the denormalized or legacy chat JSON structures stored inchat.chat.When the chat is reopened, the frontend or backend may still rely on:
instead of the canonical content stored in:
This creates a mismatch between the message shown immediately after generation and the message shown after chat reload/navigation.
Suggested Fix
The best fix would be to define one canonical source of truth for final assistant message content after all filters have run.
Possible approaches:
outlet()calls are completed, synchronize the final assistant message content to all relevant storage representations:Or, preferably, make
chat_message.contentthe canonical source of truth and ensure the UI reload path uses it consistently.If
chat.chat.historyandchat.chat.messagesare retained for backward compatibility or performance reasons, ensure they are updated after outlet post-processing.Add a regression test verifying that content modified by a Filter Function outlet remains visible after:
Regression Test Proposal
A minimal automated test could be:
to the assistant response in
outlet().Create a chat and generate one assistant response.
Assert that the marker is present immediately after generation.
Reload the chat through the same API path used by the frontend.
Assert that the marker is still present.
Inspect persisted data and assert that the final content is consistent between:
chat_message.content;chat.chat.history.messages[assistant_id].content;chat.chat.messages[].content, if still used.Workaround Tried
I also tested a custom function intended to synchronize outlet-modified content back into chat history.
This created two major issues:
I had to disable that function and delete the affected test chat from the Open WebUI interface to return to normal behavior.
This suggests that external Functions should probably not be responsible for manually repairing internal message synchronization. The synchronization should happen inside Open WebUI after all filters have completed.
Final Note
This issue is not only about one AI transparency footer.
It seems to be a more general persistence/synchronization issue affecting any Filter Function that modifies final assistant output in
outlet().The displayed message after generation and the displayed message after reopening the chat should be identical.
@owui-terminator[bot] commented on GitHub (May 14, 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:
🟣 #14785 issue: Filter Functions losting system prompts and advanced parameters
This is the closest prior issue about Filter Functions interfering with message-related state. Although it focuses on system prompts/parameters rather than assistant content persistence, it supports that filter processing can desynchronize or drop parts of the request/representation.
by vibe-Chen ·
bug🟢 #24711 issue: Chat not accessible/loading in interface
Both issues involve chat reload/navigation problems in v0.9.5 where a conversation appears correct initially but is wrong or incomplete when reopened. It is not specifically about filter outlets, but it matches the same reload-path persistence class of bug.
by HenkieTenkie62 ·
bug🟣 #24310 issue: Chat-specific model/system prompt/settings are not persisted after switching chats in v0.9.2
This earlier bug shows chat-specific state not persisting after switching chats and returning. It is related because the new issue also describes data that exists in one representation but is lost when the chat is reopened.
by Bennowan ·
bug🟣 #24522 issue: When continuing a conversation in the new version using a chat created in an older version, the system fails to send the full context to the model
This issue reports stale/incorrect chat context when continuing older chats, which suggests problems in how Open WebUI reconstructs or reloads stored conversation state. It is adjacent to the same history-loading pipeline implicated here.
by CookSleep ·
bug🟣 #24142 Issue #24142
This is another reload/chat-switch persistence bug where selected context disappears after page reload or chat switch. While about knowledge selection rather than message content, it is the same symptom pattern of state being lost on navigation.
by unknown
💡 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.