mirror of
https://github.com/openai/codex.git
synced 2026-11-01 19:33:35 +00:00
codex: rename rollout request id field
Rename the response stream field that carries an early request ID for rollout persistence so its purpose is explicit. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
24eebd7d5c
commit
5d846acf72
@@ -249,7 +249,7 @@ pub fn create_text_param_for_request(
|
||||
|
||||
pub struct ResponseStream {
|
||||
pub rx_event: mpsc::Receiver<Result<ResponseEvent, ApiError>>,
|
||||
pub initial_request_id: Option<String>,
|
||||
pub rollout_request_id: Option<String>,
|
||||
}
|
||||
|
||||
impl Stream for ResponseStream {
|
||||
|
||||
@@ -271,7 +271,7 @@ impl ResponsesWebsocketConnection {
|
||||
// Websocket upgrade response headers are scoped to the connection, not
|
||||
// individual `stream_request` calls, so they cannot be used as per-turn
|
||||
// request IDs in rollout metadata.
|
||||
initial_request_id: None,
|
||||
rollout_request_id: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ pub fn stream_from_fixture(
|
||||
tokio::spawn(process_sse(Box::pin(stream), tx_event, idle_timeout, None));
|
||||
Ok(ResponseStream {
|
||||
rx_event,
|
||||
initial_request_id: None,
|
||||
rollout_request_id: None,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ pub fn spawn_response_stream(
|
||||
|
||||
ResponseStream {
|
||||
rx_event,
|
||||
initial_request_id: request_id,
|
||||
rollout_request_id: request_id,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -895,7 +895,7 @@ mod tests {
|
||||
};
|
||||
|
||||
let stream = spawn_response_stream(stream_response, idle_timeout(), None, None);
|
||||
assert_eq!(stream.initial_request_id.as_deref(), Some("req_123"));
|
||||
assert_eq!(stream.rollout_request_id.as_deref(), Some("req_123"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user