From 70549c5c8a50315aa3bf909ebedea8cc3e602077 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 27 Jul 2026 02:59:07 -0400 Subject: [PATCH] refac --- backend/open_webui/routers/openai.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py index 73a5f7ecc3..a016115f9b 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -1346,6 +1346,9 @@ async def generate_chat_completion( ) is_streaming_request = bool(payload.get('stream', False)) + if not is_streaming_request: + payload.pop('stream_options', None) + payload = json.dumps(payload) r = None