Skip to content

Add regression tests for SSE comment lines from OpenRouter#2359

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/fix-for-docker-agent-issue-2349-a172981b
Apr 10, 2026
Merged

Add regression tests for SSE comment lines from OpenRouter#2359
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/fix-for-docker-agent-issue-2349-a172981b

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Apr 9, 2026

Summary

Add regression tests confirming that SSE comment lines (e.g. : OPENROUTER PROCESSING) from providers like OpenRouter do not cause streaming errors.

Details

The OpenAI Go SDK (v3.30.0) already handles SSE comment lines correctly per the SSE specification, so no code fix is needed. The tests cover both the ChatCompletions and Responses API paths with a fake HTTP server that sends comment lines before data events.

Closes #2349

@dgageot dgageot requested a review from a team as a code owner April 9, 2026 13:50
@dgageot dgageot force-pushed the board/fix-for-docker-agent-issue-2349-a172981b branch from 143663f to 3030384 Compare April 9, 2026 13:57
The OpenAI Go SDK (v3.30.0) already handles SSE comment lines correctly,
so no code fix is needed. Add regression tests for both ChatCompletions
and Responses API paths to ensure SSE comments (e.g. ': OPENROUTER
PROCESSING') don't cause 'unexpected end of JSON input' errors.

Closes docker#2349

Assisted-By: docker-agent
@dgageot dgageot force-pushed the board/fix-for-docker-agent-issue-2349-a172981b branch from 3030384 to 9915e4e Compare April 9, 2026 14:04
@dgageot dgageot merged commit d89fc58 into docker:main Apr 10, 2026
4 checks passed
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.

SSE comment lines from OpenRouter cause "unexpected end of JSON input" stream error

2 participants