Repository navigation
fix(openai): retry correlated transient WebSocket failures - #33
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Retry correlated transient WebSocket
response.failedevents on a fresh socket instead of terminating the turn after the first attempt. Reuse the existing retry budget, backoff, cancellation, and response-attempt supersession paths. Bumpagentkit-provider-openaito 0.10.13 so the fix can be published without a separate version-bump PR.Motivation
A ChatGPT server failure such as
server_errorwith status 503 is classified as transient, but the WebSocket acceptance gate currently stops it before retries are scheduled. An explicit terminal failure should be recoverable under the same replay safeguards used for a lost connection.Technical details
Authorize replay only for the active response
Require a validated terminal event with an explicit response ID matching the active response,
store: false, and either no visible output or an opted-in supersession consumer. Malformed sequence numbers are rejected as protocol errors rather than silently ignored. Permanent failures and uncorrelated wrapped errors retain the existing no-replay restrictions.Reopen without failed continuation state
Discard the failed socket and its checkpoint before replaying the authoritative full request, without
previous_response_id. Update the documented retry policy and regression coverage for recovery, supersession, continuation replay, and retry exhaustion.