Serialize SDK responses using API field aliases and omit unset optional
fields before persisting native replay state. Repair legacy async_ fields
on a copy at replay time without altering stored history or argument JSON.
Cover streaming and non-streaming SDK continuations, alias precedence,
and legacy SQLite replay.
Co-Authored-By: GPT-6.1 Sol High
The SDK dump of a reasoning item carries "status": None, and the
Responses API rejects that null on input ("Unknown parameter:
'input[N].status'"). A tool-calling continuation replays the stored
output items, so the turn failed once the tool had returned.
Leave an unset status out when persisted output items are converted back
to input items. A status the provider did send is kept. The existing
retry only strips status from message items, so it never covered this.
test_copilot_normalization_does_not_change_openai_requests expected the
null to reach the OpenAI request; it now expects it to be dropped and
everything else to be sent as stored.
Fixes#2373