diff --git a/backend/crates/gateway-api/src/data_plane/codex/request.rs b/backend/crates/gateway-api/src/data_plane/codex/request.rs index 205e005b0..775d7fa03 100644 --- a/backend/crates/gateway-api/src/data_plane/codex/request.rs +++ b/backend/crates/gateway-api/src/data_plane/codex/request.rs @@ -20,7 +20,6 @@ pub(crate) struct CodexRequestHeaders { version: Option, codex_window_id: Option, parent_thread_id: Option, - turn_id: Option, responses_lite: Option, memgen_request: Option, subagent: Option, @@ -45,7 +44,6 @@ impl CodexRequestHeaders { version: header_string(headers, "version"), codex_window_id: header_string(headers, "x-codex-window-id"), parent_thread_id: header_string(headers, "x-codex-parent-thread-id"), - turn_id: header_string(headers, "x-codex-turn-id"), responses_lite: header_string(headers, X_OPENAI_INTERNAL_CODEX_RESPONSES_LITE_HEADER), memgen_request: header_string(headers, X_OPENAI_MEMGEN_REQUEST_HEADER), subagent: header_string(headers, OPENAI_SUBAGENT_KEY), @@ -60,7 +58,6 @@ impl CodexRequestHeaders { ("version", self.version.as_ref()), ("codex_window_id", self.codex_window_id.as_ref()), ("parent_thread_id", self.parent_thread_id.as_ref()), - ("turn_id", self.turn_id.as_ref()), ("responses_lite", self.responses_lite.as_ref()), ("memgen_request", self.memgen_request.as_ref()), ] { diff --git a/backend/crates/providers/openai/src/transport/client/live.rs b/backend/crates/providers/openai/src/transport/client/live.rs index 2ca0f9787..36b6acf93 100644 --- a/backend/crates/providers/openai/src/transport/client/live.rs +++ b/backend/crates/providers/openai/src/transport/client/live.rs @@ -45,7 +45,7 @@ impl CodexBackendClient { || is_transport_managed_request_header(name.as_str()) || is_non_codex_request_header(name.as_str()) // Live 不继承 Responses 的路由或连接续接状态 - || matches!(name.as_str(), "x-codex-routing-hint" | "x-codex-turn-state" | "x-codex-turn-id") + || matches!(name.as_str(), "x-codex-routing-hint" | "x-codex-turn-state") { continue; } diff --git a/backend/crates/providers/openai/src/transport/headers.rs b/backend/crates/providers/openai/src/transport/headers.rs index 6ded0b9f3..1f62fdee1 100644 --- a/backend/crates/providers/openai/src/transport/headers.rs +++ b/backend/crates/providers/openai/src/transport/headers.rs @@ -283,7 +283,6 @@ pub(super) fn append_passthrough_headers(headers: &mut HeaderMap, passthrough: & | "content-type" | "content-encoding" | "x-codex-routing-hint" - | "x-codex-turn-id" | X_OPENAI_INTERNAL_CODEX_RESPONSES_LITE_HEADER ) { diff --git a/backend/crates/providers/openai/tests/transport/headers.rs b/backend/crates/providers/openai/tests/transport/headers.rs index e4c2f62fa..26bae8707 100644 --- a/backend/crates/providers/openai/tests/transport/headers.rs +++ b/backend/crates/providers/openai/tests/transport/headers.rs @@ -247,7 +247,6 @@ async fn backend_websocket_should_forward_context_headers_and_preserve_payload_f for forbidden in [ "x-codex-turn-state", "x-codex-installation-id", - "x-codex-turn-id", "x-openai-internal-codex-residency", "accept", "content-type", @@ -383,7 +382,6 @@ async fn backend_http_should_send_codex_context_without_browser_headers() { assert_eq!(header_names, expected_names); for forbidden in [ "x-codex-installation-id", - "x-codex-turn-id", "x-openai-internal-codex-residency", "sec-ch-ua", "sec-ch-ua-mobile", @@ -459,7 +457,6 @@ async fn backend_http_should_ignore_unrepresentable_protocol_headers_without_blo for omitted in [ "session-id", "thread-id", - "x-codex-turn-id", "x-codex-window-id", "x-codex-turn-state", "x-codex-turn-metadata", diff --git a/backend/crates/providers/openai/tests/transport/profile_contract.rs b/backend/crates/providers/openai/tests/transport/profile_contract.rs index 05e23c845..3a2d74dcd 100644 --- a/backend/crates/providers/openai/tests/transport/profile_contract.rs +++ b/backend/crates/providers/openai/tests/transport/profile_contract.rs @@ -69,7 +69,6 @@ async fn each_core_endpoint_uses_the_current_bundled_release() { assert_eq!(headers["chatgpt-account-id"], "audit-account"); for forbidden in [ "x-codex-installation-id", - "x-codex-turn-id", "x-openai-internal-codex-residency", "oai-language", "openai-beta", diff --git a/backend/crates/providers/openai/tests/transport/usage.rs b/backend/crates/providers/openai/tests/transport/usage.rs index 9f721ba59..c05777798 100644 --- a/backend/crates/providers/openai/tests/transport/usage.rs +++ b/backend/crates/providers/openai/tests/transport/usage.rs @@ -122,7 +122,6 @@ async fn fetch_should_use_wham_usage_headers_only() { "session_id", "session-id", "thread-id", - "x-codex-turn-id", "x-codex-window-id", "x-codex-turn-state", "x-codex-turn-metadata",