mirror of
https://github.com/open-webui/docs.git
synced 2026-11-05 01:38:13 +00:00
[PR #1456] [MERGED] docs: check that a system message contains a filter's text, not that one equals it #1418
Labels
No labels
bug
documentation
documentation
duplicate
enhancement
enhancement
good first issue
good first issue
good first issue
help wanted
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/docs#1418
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/docs/pull/1456
Author: @silentoplayz
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @silentoplayz
Base:
main← Head:docs/filter-request-system-message-check📝 Commits (1)
942ada6docs: check that a system message contains a filter's text, not that one equals it📊 Changes
1 file changed (+6 additions, -1 deletions)
View changed files
📝
docs/features/extensibility/plugin/functions/filter.mdx(+6 -1)📄 Description
Summary
The Filter Function page's example of a
requestfilter that is safe to run more than once still adds its line again on every hop of a tool loop when the chat has another system message, such as a system prompt from the chat controls.Before each call to the model, Open WebUI merges all system messages into one. On the next hop, the example's
"Be concise."is part of that longer merged message, so its check that a message's content equals the text never matches, and the filter inserts it again. Anyone who copies the example gets the duplication it was written to prevent.This changes the example to check whether a system message contains the text, and adds a short paragraph explaining why an equality check is not enough.
Related issue or discussion
None.
Checklist
Notes for reviewers
I first saw the duplication on a test instance while building a filter that adds a system message with this kind of check.
The merge is
merge_system_messages, called throughnormalize_messages_for_modelafter therequestfilters run, both for the first call and for every hop of the tool loop, and each hop starts from the already merged messages. It is the same on v0.11.4 and ondev.I ran both versions of the example through four hops, using Open WebUI's own
merge_system_messagesbetween hops and adding a tool result each time:npm run buildpasses.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.