Browse Source

Updated middleware.py to add OpenRouter compatibility

binxn 1 month ago
parent
commit
efd86e2cb4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/open_webui/utils/middleware.py

+ 1 - 1
backend/open_webui/utils/middleware.py

@@ -1560,7 +1560,7 @@ async def process_chat_response(
 
 
                                     value = delta.get("content")
                                     value = delta.get("content")
 
 
-                                    reasoning_content = delta.get("reasoning_content")
+                                    reasoning_content = delta.get("reasoning_content") or delta.get("reasoning")
                                     if reasoning_content:
                                     if reasoning_content:
                                         if (
                                         if (
                                             not content_blocks
                                             not content_blocks