Repository navigation
feat(openai): send incremental Responses WebSocket input - #27
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
Send
previous_response_idwith only new input on compatible Responses WebSocket turns instead of resending the full transcript. Add an optional environment-credential live continuation suite and bumpagentkit-provider-openaifrom 0.10.10 to 0.10.11.Impact
Existing WebSocket sessions automatically use incremental requests for compatible tool-result and subsequent-user turns. The application still supplies its complete transcript; edited history, changed settings, and fresh connections use full input without a predecessor ID.
Technical details
Connection-local continuation
Retain a bounded, memory-only checkpoint of the completed response, encoded request, and raw and canonical replay output. Prefix checks use the existing credential-bound encoder, including tool arguments, encrypted reasoning, and generated images. Streamed
response.output_item.doneitems remain authoritative when terminal completion contains an empty output array. Protected checkpoint buffers are zeroized on drop.Recovery and cancellation
Invalidate checkpoints on cancellation, failures, reconnects, and authentication changes. A narrowly correlated missing-predecessor rejection can reconnect once with full input within the existing retry budget. Accepted responses, visible output, ambiguous failures, and uncorrelated errors cannot authorize replay.
Optional live suite
The ignored public-API integration suite accepts credentials only through environment variables and uses a loopback forwarding proxy to assert actual outbound predecessor IDs and exact input suffixes while requiring real server completion. It covers a tool round, a later user turn, and optional full replay on a fresh session. Strict mode rejects missing credentials, request counts are bounded, and credentials and payloads are not logged.