From 2f349b597976f732f7f80fa244a3acfaa009de44 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 6 Aug 2025 15:06:43 +0400 Subject: [PATCH] refac --- backend/open_webui/utils/middleware.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index 97233737dd..3ccef067c0 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -2095,11 +2095,7 @@ async def process_chat_response( } ) - if ( - content_blocks[-1]["type"] == "reasoning" - and content_blocks[-1].get("attributes", {}).get("type") - == "reasoning_content" - ): + if content_blocks[-1]["type"] == "reasoning": reasoning_block = content_blocks[-1] if reasoning_block.get("ended_at") is None: reasoning_block["ended_at"] = time.time()