Skip to content

fix(websockets) ignore metadata for incremental requests#30770

Merged
dylan-hurd-oai merged 3 commits into
mainfrom
dh--client--websocket-incremental-fix
Jul 2, 2026
Merged

fix(websockets) ignore metadata for incremental requests#30770
dylan-hurd-oai merged 3 commits into
mainfrom
dh--client--websocket-incremental-fix

Conversation

@dylan-hurd-oai

@dylan-hurd-oai dylan-hurd-oai commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Responses API may or may not send back metadata on response items. So when comparing request data to the last response, we should discard it and only consider the content. This change results in a higher success rate of incremental requests.

Notably, there is one subtle change to the behavior here - we are now ignoring metadata when comparing the previous request items to the new request items as well. This should be fine, since the metadata is explicitly out of scope for the comparison, regardless of whether the item is an item from the request or response.

Testing

  • Added unit test coverage for both cases of metadata existence and absence.

@dylan-hurd-oai dylan-hurd-oai changed the title bug(core) websockets metadata equivalence issue fix(websockets) ignore metadata for incremental requests Jul 2, 2026
@dylan-hurd-oai dylan-hurd-oai marked this pull request as ready for review July 2, 2026 07:13
@dylan-hurd-oai dylan-hurd-oai requested a review from a team as a code owner July 2, 2026 07:13
@dylan-hurd-oai dylan-hurd-oai force-pushed the dh--client--websocket-incremental-fix branch from dac4c6c to 1168d51 Compare July 2, 2026 19:40
@dylan-hurd-oai dylan-hurd-oai merged commit b35d4b6 into main Jul 2, 2026
35 checks passed
@dylan-hurd-oai dylan-hurd-oai deleted the dh--client--websocket-incremental-fix branch July 2, 2026 20:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants