core: rename metadata -> internal_chat_message_metadata_passthrough (#28968)

## Description
This PR cuts Codex over from generic `ResponseItem.metadata` (introduced
here: https://github.com/openai/codex/pull/28355) to
`ResponseItem.internal_chat_message_metadata_passthrough`, which is the
blessed path and has strongly-typed keys.

For now we have to drop this MAv2 usage of `metadata`:
https://github.com/openai/codex/pull/28561 until we figure out where
that should live.
This commit is contained in:
Owen Lin
2026-06-22 11:11:25 -07:00
committed by GitHub
parent 9f06cf1a09
commit 5b95745eae
77 changed files with 866 additions and 797 deletions
@@ -825,7 +825,7 @@ mod tests {
text: "hello".to_string(),
}],
phase: None,
metadata: None,
internal_chat_message_metadata_passthrough: None,
}],
tools: vec![json!({
"type": "function",
+1 -1
View File
@@ -162,7 +162,7 @@ mod tests {
},
],
phase: None,
metadata: None,
internal_chat_message_metadata_passthrough: None,
}])),
commands: Some(SearchCommands {
search_query: Some(vec![SearchQuery {
+2 -2
View File
@@ -313,7 +313,7 @@ async fn responses_client_stream_request_preserves_item_ids() -> Result<()> {
role: "user".into(),
content: vec![ContentItem::InputText { text: "hi".into() }],
phase: None,
metadata: None,
internal_chat_message_metadata_passthrough: None,
}],
tools: Vec::new(),
tool_choice: "auto".into(),
@@ -518,7 +518,7 @@ async fn azure_store_sends_ids_and_headers() -> Result<()> {
role: "user".into(),
content: vec![ContentItem::InputText { text: "hi".into() }],
phase: None,
metadata: None,
internal_chat_message_metadata_passthrough: None,
}],
tools: Vec::new(),
tool_choice: "auto".into(),