Responses reasoning replay

The shared Responses converter reuses stored reasoning signatures for same-model history. SDK output objects can serialize absent optional fields as null. A compatible endpoint rejects reasoning content:null with HTTP 422 when that output is reused as input.

Contract

At the outgoing message conversion boundary, omit null optional content, encrypted_content and status fields from reasoning items. Preserve non-null values, summary arrays and opaque encrypted content. Retain the existing removal of server-assigned IDs and existing cross-model signature handling. Do not rewrite stored history, decrypt payloads, change permissions, or retry a failed external action.

Reference and scope

The installed OpenAI SDK ResponseReasoningItem declares optional content, encrypted_content and status. Its output serialization is distinct from input requirements. All Responses adapters share convert_responses_messages; normalization belongs there rather than in an individual relay adapter. No new queue, provider fallback or retry policy is introduced.

Acceptance

Convert an SDK-shaped stored reasoning signature through the shared public message converter. Null optional values are absent in input; valid content and encrypted payload survive; source history remains byte-for-byte unchanged. Existing cross-provider tool-call and streaming reasoning tests pass.

Implementation status

Implemented in convert_responses_messages. Four regression cases verify null omission, non-null preservation and unchanged stored signatures. Independent specification and quality reviews pass; packaging requires the combined verification gates.