Skip to content

Fix SSE streaming by preserving event: lines in proxy#32

Open
torarnv wants to merge 2 commits intoseifghazi:mainfrom
torarnv:fix-sse-streaming
Open

Fix SSE streaming by preserving event: lines in proxy#32
torarnv wants to merge 2 commits intoseifghazi:mainfrom
torarnv:fix-sse-streaming

Conversation

@torarnv
Copy link
Copy Markdown

@torarnv torarnv commented Mar 31, 2026

The proxy was stripping SSE event: lines and only forwarding data: lines. This caused Claude Code to log "Stream completed without receiving message_start event" and fall back to non-streaming mode, resulting in a duplicate request for every streamed request.

Forward the complete SSE protocol (event: lines, data: lines, and blank separators) and add event: prefixes to the OpenAI-to-Anthropic stream transformer.

torarnv added 2 commits April 1, 2026 01:09
The proxy was stripping SSE event: lines and only forwarding data: lines.
This caused Claude Code to log "Stream completed without receiving
message_start event" and fall back to non-streaming mode, resulting in
a duplicate request for every streamed request.

Forward the complete SSE protocol (event: lines, data: lines, and blank
separators) and add event: prefixes to the OpenAI-to-Anthropic stream
transformer.
Store all SSE lines (not just data: lines) in streamingChunks and join
them with newlines in the UI so the raw streaming display shows the
actual SSE protocol structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant