From 37d45fdee3b1fc2a7e20146ac8f75039a87953aa Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 29 Jun 2026 13:14:13 -0500 Subject: [PATCH] refac --- backend/open_webui/utils/middleware.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index 0d2b0860d4..e17b42485b 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -4413,6 +4413,7 @@ async def streaming_chat_response_handler(response, ctx): data = { 'content': serialize_output(full_output() + pending_fc_items), + 'output': full_output() + pending_fc_items, } delta_type = 'tool_call' @@ -4472,7 +4473,10 @@ async def streaming_chat_response_handler(response, ctx): } ] - data = {'content': serialize_output(full_output())} + data = { + 'content': serialize_output(full_output()), + 'output': full_output(), + } delta_type = 'content' if reasoning_details: @@ -4637,9 +4641,15 @@ async def streaming_chat_response_handler(response, ctx): 'output': full_output(), }, ) + data = { + 'content': serialize_output(full_output()), + 'output': full_output(), + } + delta_type = 'content' else: data = { 'content': serialize_output(full_output()), + 'output': full_output(), } delta_type = 'content'