Merge pull request #18884 from ShirasawaSama/feature/handle-large-stream-chunks

feat: handle large stream chunks responses to support Nano Banana [Test Needed]
This commit is contained in:
Tim Baek
2025-11-09 21:08:49 -05:00
committed by GitHub
3 changed files with 82 additions and 2 deletions
+2 -1
View File
@@ -45,6 +45,7 @@ from open_webui.utils.payload import (
)
from open_webui.utils.misc import (
convert_logit_bias_input_to_json,
handle_large_stream_chunks,
)
from open_webui.utils.auth import get_admin_user, get_verified_user
@@ -952,7 +953,7 @@ async def generate_chat_completion(
if "text/event-stream" in r.headers.get("Content-Type", ""):
streaming = True
return StreamingResponse(
r.content,
handle_large_stream_chunks(r.content),
status_code=r.status,
headers=dict(r.headers),
background=BackgroundTask(