Skip to content

fix(openai): stabilize websocket bridge continuations#2974

Open
xlx0852 wants to merge 2 commits into
Wei-Shaw:mainfrom
xlx0852:codex/ws-http-bridge-followup
Open

fix(openai): stabilize websocket bridge continuations#2974
xlx0852 wants to merge 2 commits into
Wei-Shaw:mainfrom
xlx0852:codex/ws-http-bridge-followup

Conversation

@xlx0852
Copy link
Copy Markdown
Contributor

@xlx0852 xlx0852 commented Jun 2, 2026

Summary

Follow-up to #2936. This tightens two websocket bridge edge cases observed in production:

  • hand off an existing downstream websocket session to the HTTP/SSE bridge when a later response.create frame crosses the bridge threshold, so oversized continuation turns do not reach the upstream websocket and trigger StatusMessageTooBig;
  • prune pending tool-call context items that are not answered by the current replay input before sending HTTP bridge requests, avoiding upstream No tool output found for function call ... errors while preserving matched tool-call / tool-output pairs.

The downstream client connection still receives websocket messages; only the upstream transport switches to HTTP/SSE for the bridge path.

Tests

  • go test ./internal/service -run 'Test(OpenAIWSHTTPBridge|PruneOpenAIWSUnanswered)'
  • go test ./...

mvn compile was requested by the local AGENTS instructions, but this repository has no pom.xml and is not a Maven project.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Thank you for your contribution! Before we can merge this PR, we need you all to sign our Contributor License Agreement (CLA).

To sign, please reply with the following comment:

I have read the CLA Document and I hereby sign the CLA

You only need to sign once — it will be valid for all your future contributions to this project.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
✅ (xlx0852)[https://github.com/xlx0852]
❌ @徐
seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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