Persist Responses API IDs in rollouts

Write request IDs as soon as headers arrive, including error paths, and persist explicit null fields in rollout response metadata.

Add rollout coverage for both successful and error responses.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-05 21:03:08 -08:00
co-authored by Codex
parent 9950b5e265
commit bb05429f8d
11 changed files with 340 additions and 24 deletions
+10
View File
@@ -1176,6 +1176,8 @@ pub enum EventMsg {
/// Exited review mode with an optional final result to apply.
ExitedReviewMode(ExitedReviewModeEvent),
ResponseMetadata(ResponseMetadataEvent),
RawResponseItem(RawResponseItemEvent),
ItemStarted(ItemStartedEvent),
@@ -1356,6 +1358,14 @@ impl CodexErrorInfo {
}
}
#[derive(Debug, Clone, Deserialize, Serialize, TS, JsonSchema)]
pub struct ResponseMetadataEvent {
#[serde(default)]
pub request_id: Option<String>,
#[serde(default)]
pub response_id: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, TS, JsonSchema)]
pub struct RawResponseItemEvent {
pub item: ResponseItem,