Forward turn metadata in standalone web search (#32835)

## What changed

- Add optional serialized Codex turn metadata to extension tool calls.
- Populate it from the current turn context and send it as the
  `x-codex-turn-metadata` header on standalone web search requests.

## Testing

- Extend the app-server web search integration test to verify that client
  metadata, including the model ID, reaches the standalone search request.

GitOrigin-RevId: c0950108d89a1d317ac94ccd23efcee72fffc6f0
This commit is contained in:
XMLIU-oai authored and copyberry committed 2026-07-13 16:52:18 +00:00
1 parent 2e156cbe31
commit 19a000259d
7 files changed
+80 -8

No files matched your search

+5
View File
@@ -92,6 +92,7 @@ pub struct ToolCall {
pub call_id: String,
pub tool_name: ToolName,
pub model: String,
pub codex_turn_metadata: Option<String>,
pub truncation_policy: TruncationPolicy,
pub conversation_history: ConversationHistory,
pub turn_item_emitter: Arc<dyn TurnItemEmitter>,
@@ -106,6 +107,10 @@ impl std::fmt::Debug for ToolCall {
.field("call_id", &self.call_id)
.field("tool_name", &self.tool_name)
.field("model", &self.model)
.field(
"has_codex_turn_metadata",
&self.codex_turn_metadata.is_some(),
)
.field("truncation_policy", &self.truncation_policy)
.field("conversation_history", &self.conversation_history)
.field("turn_item_emitter", &"<host turn item emitter>")