We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e4738b commit 7b707f6Copy full SHA for 7b707f6
tests/mock_server.py
@@ -366,6 +366,13 @@ async def generation(
366
except Exception as e:
367
raise HTTPException(status_code=400, detail=f"Invalid JSON: {e}")
368
369
+ # --- [Auto-enable stream mode based on header] ---
370
+ accept_header = request.headers.get("accept", "")
371
+ if "text/event-stream" in accept_header and body.parameters:
372
+ logger.info("SSE client detected, forcing incremental_output=True")
373
+ body.parameters.incremental_output = True
374
+
375
376
# --- [Mock Handling] ---
377
if SERVER_STATE.is_mock_mode:
378
if body:
0 commit comments