Skip to content

fix(openai): ignore empty websocket frames#2350

Merged
dgageot merged 2 commits intodocker:mainfrom
pandego:fix/2300-ovh-empty-ws-frame
Apr 9, 2026
Merged

fix(openai): ignore empty websocket frames#2350
dgageot merged 2 commits intodocker:mainfrom
pandego:fix/2300-ovh-empty-ws-frame

Conversation

@pandego
Copy link
Copy Markdown
Contributor

@pandego pandego commented Apr 8, 2026

Summary

  • ignore whitespace-only websocket frames before JSON decoding
  • keep streaming until a real event arrives instead of surfacing unexpected end of JSON input
  • add a websocket regression test covering an empty frame before a normal completion

Testing

  • docker run --rm -v "$PWD":/src -w /src golang:1.26 go test ./pkg/model/provider/openai -run 'TestWSStream_(TextDelta|IgnoresEmptyFrames|ToolCall|EndToEnd_WithClient)' -count=1

Closes #2300

Signed-off-by: pandego <7780875+pandego@users.noreply.github.com>
@pandego pandego requested a review from a team as a code owner April 8, 2026 16:26
dgageot
dgageot previously approved these changes Apr 8, 2026
@rumpl
Copy link
Copy Markdown
Member

rumpl commented Apr 8, 2026

@pandego please fix the failing lint

Replace require.NoError with assert.NoError in HTTP handler and fix import formatting.

Assisted-By: docker-agent
@dgageot dgageot merged commit b640ee9 into docker:main Apr 9, 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.

Non-retryable error from model with OVH AI endpoints

4 participants