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
@@ -185,8 +185,14 @@ impl McpHandler {
|
||||
)
|
||||
.await;
|
||||
// Use the executed call's binding; a later catalog refresh must not change eligibility.
|
||||
// Only the new metadata is internal; tool execution and call accounting are not.
|
||||
let result_metadata_capture_allowed = false;
|
||||
let result_metadata_capture_allowed = invocation
|
||||
.session
|
||||
.services
|
||||
.analytics_events_client
|
||||
.is_enabled()
|
||||
&& prepared_mcp_call
|
||||
.as_ref()
|
||||
.is_some_and(codex_mcp::PreparedMcpCall::is_host_owned_apps);
|
||||
let mcp_tool = prepared_mcp_call.as_ref().map(|call| {
|
||||
McpToolContext::from_prepared_call(
|
||||
call,
|
||||
|
||||
Reference in new issue
Block a user