mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 19:38:46 -05:00
[PR #18652] [CLOSED] fix: Function/Pipeline valves not triggered for async chat completition #63725
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18652
Author: @YetheSamartaka
Created: 10/27/2025
Status: ❌ Closed
Base:
dev← Head:main📝 Commits (2)
0b45fc9Function/Pipeline valves not triggered for async chat completitionfbb1cf7resolved merge conflicts with dev branch📊 Changes
2 files changed (+141 additions, -56 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+136 -12)📝
src/lib/components/chat/Chat.svelte(+5 -44)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch may lead to immediate closure of the PR.Changelog Entry
Description
When multiple chats were opened simultaneously, their completions finished asynchronously in the background without triggering Filters or Pipelines events. This caused missed post-processing steps (source enrichment, analytics, or message updates) because the chatCompleted handler was only called client-side - and only for the currently active chat.
How I fixed it:
Moved the chatCompleted call from the frontend (Chat.svelte) to the backend middleware. This was inherent flaw in the whole design which this PR is fixing.
Now, chat_completed() is invoked automatically after every chat finishes, regardless of whether it completes in the background or while another chat is active.
Fixed
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.