mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[GH-ISSUE #23770] feat: recent dev changes for outlet_filter_handler do not completely handle the API caller use-case #58731
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 @pfn on GitHub (Apr 16, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23770
Check Existing Issues
Verify Feature Scope
Problem Description
Continuing the discussion from #23740 which is closed prematurely.
I have to apply the following diff to middleware.py in addition to running a fairly carefully crafted filter function in order for API calls to track outlet() correctly https://gist.github.com/pfn/cdf3631365e6bee59912016b7a953175
With this filter and the diff in place, both non-streaming and streaming API calls through openwebui work for me. Without the filter active and the diff, neither API call use-case works. The diff is primarily required for the streaming use-case. The filter is required for both streaming and non-streaming API calls.
Desired Solution you'd like
I'm relatively happy with how the linked gist solves the problem. If it could be made more elegant, I would like that.
Alternatives Considered
N/A
Additional Context
Discussed in discord.