mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Enable app tool result metadata with analytics controls (#46010)
## What changed Capture result metadata for host-owned app calls when analytics and executed tool call metadata recording are enabled. Respect both `analytics.enabled = false` and host-disabled analytics, using the prepared call's ownership to determine eligibility. Disable incremental WebSocket request reuse when raw result metadata or its call binding changes, so late results attached to an already-sent output are included in the next request. Continue allowing reuse when only other metadata changes or result metadata is filtered out for the endpoint. ## Testing Extend coverage for direct and code-mode calls, analytics settings and host overrides, runtime recording changes, and prepared call ownership. Add metadata comparison and WebSocket reuse tests, and verify that raw response item notifications continue to omit result metadata. GitOrigin-RevId: 411843fbff3749ee96fd6f0ebc591362942a4555
This commit is contained in:
1 parent
7f0ab95827
commit
3a589370a4
7 files changed
+276
-28
No files matched your search
@@ -314,7 +314,7 @@ struct WebsocketSession {
|
||||
}
|
||||
|
||||
// This is intentionally not a `PartialEq` implementation: request equality includes `input` and
|
||||
// `client_metadata`, while websocket reuse compares the input separately and ignores metadata.
|
||||
// `client_metadata`, while websocket reuse compares input and late tool-result metadata separately.
|
||||
// Access programs are authorized per response, including continuations, without replaying input.
|
||||
// Keep the destructuring exhaustive so new request fields require an explicit reuse decision.
|
||||
fn responses_request_properties_match(
|
||||
@@ -382,6 +382,11 @@ fn response_items_equal_ignoring_internal_metadata(
|
||||
return true;
|
||||
}
|
||||
|
||||
// Late results update an already-sent output. A delta cannot carry that update.
|
||||
if !previous.has_same_tool_result_metadata(current) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let mut previous = previous.clone();
|
||||
previous.clear_internal_chat_message_metadata_passthrough();
|
||||
let mut current = current.clone();
|
||||
|
||||
Reference in new issue
Block a user