fix: restore proper SSE frame delimiters
Emit real newline-delimited SSE frames for /v1/responses so clients can parse response.completed before the stream closes. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1156,7 +1156,7 @@ def _responses_non_stream_from_chat_payload(chat_payload: Any) -> dict[str, Any]
|
||||
|
||||
|
||||
def _sse_data(payload: dict[str, Any]) -> str:
|
||||
return f"data: {json.dumps(payload, ensure_ascii=False)}\\n\\n"
|
||||
return f"data: {json.dumps(payload, ensure_ascii=False)}\n\n"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user