Skip to content

fix(openai): ignore empty websocket frames#2350

Open
pandego wants to merge 1 commit intodocker:mainfrom
pandego:fix/2300-ovh-empty-ws-frame
Open

fix(openai): ignore empty websocket frames#2350
pandego wants to merge 1 commit intodocker:mainfrom
pandego:fix/2300-ovh-empty-ws-frame

Conversation

@pandego
Copy link
Copy Markdown

@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
@rumpl
Copy link
Copy Markdown
Member

rumpl commented Apr 8, 2026

@pandego please fix the failing lint

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

3 participants