From 31b272d3c93b87636c920f2aa68d6caaa07ae79a Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 8 Sep 2026 22:20:33 -0400 Subject: [PATCH] refac --- backend/open_webui/utils/middleware.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index 7add70949b..8ab00a9185 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -597,7 +597,11 @@ def handle_responses_streaming_event( idx for idx, existing in enumerate(new_output) if (item.get('id') and existing.get('id') == item.get('id')) - or (item.get('call_id') and existing.get('call_id') == item.get('call_id')) + or ( + item.get('call_id') + and existing.get('type') == item.get('type') + and existing.get('call_id') == item.get('call_id') + ) ), None, )