mirror of
https://github.com/openai/codex.git
synced 2026-10-21 18:51:31 +00:00
## Why Building a Responses WebSocket request copied the model, instructions, input history, tools, and other request settings into a second payload before serialization. ## What changed - Make `ResponseCreateWsRequest` borrow shared fields from `ResponsesApiRequest`. - Keep only WebSocket-specific fields owned, and allocate a separate input vector only for incremental continuations. - Restore response item IDs after preparing a full request so the request retained for continuation matching keeps its original state. ## Testing Update the serialization test to verify that the borrowed WebSocket request produces the same wire payload as the Responses API request plus its WebSocket-specific fields. GitOrigin-RevId: b63d746b7f5164b5204ab95b057c914a4aeb71e1