From 3b5a5412bbd7952a443a11f37d6422e1a4c3a7fd Mon Sep 17 00:00:00 2001 From: pakrym-oai Date: Thu, 11 Sep 2025 17:42:44 -0700 Subject: [PATCH] Log cf-ray header in client traces (#3488) ## Summary - log the `cf-ray` header when tracing HTTP responses in the Codex client - keep existing response status logging unchanged ## Testing - just fmt - just fix -p codex-core - cargo test -p codex-core *(fails: suite::client::azure_overrides_assign_properties_used_for_responses_url, suite::client::env_var_overrides_loaded_auth)* ------ https://chatgpt.com/codex/tasks/task_i_68c31640dacc83209be131baf91611cd --- codex-rs/core/src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/client.rs b/codex-rs/core/src/client.rs index 8c194518..e6e21df3 100644 --- a/codex-rs/core/src/client.rs +++ b/codex-rs/core/src/client.rs @@ -240,10 +240,10 @@ impl ModelClient { let res = req_builder.send().await; if let Ok(resp) = &res { trace!( - "Response status: {}, request-id: {}", + "Response status: {}, cf-ray: {}", resp.status(), resp.headers() - .get("x-request-id") + .get("cf-ray") .map(|v| v.to_str().unwrap_or_default()) .unwrap_or_default() );