mirror of
https://github.com/openai/codex.git
synced 2026-11-25 15:24:26 +00:00
Track built-in control tool calls in analytics (#39510)
## What changed - Emit `codex_control_tool_call_event` for built-in control tools such as `request_user_input`, `update_plan`, `view_image`, and goal tools. - Record correlation and timing metadata plus completed, failed, rejected, or interrupted outcomes, and include these calls in turn-level tool counts. - Keep tool arguments out of control-tool analytics events. ## Testing - Extend the app-server turn profile test to cover successful and failed control tools, event correlation, turn counts, and argument exclusion. GitOrigin-RevId: c20f73dfb79654e31b4b5040eddb0e0d91cae10d
This commit is contained in:
1 parent
6972c57c78
commit
992f5c681f
13 files changed
+343
-9
No files matched your search
@@ -82,6 +82,7 @@ pub(crate) enum TrackEventRequest {
|
||||
FileChange(CodexFileChangeEventRequest),
|
||||
McpToolCall(CodexMcpToolCallEventRequest),
|
||||
DynamicToolCall(CodexDynamicToolCallEventRequest),
|
||||
ControlToolCall(CodexControlToolCallEventRequest),
|
||||
CollabAgentToolCall(CodexCollabAgentToolCallEventRequest),
|
||||
WebSearch(CodexWebSearchEventRequest),
|
||||
ImageGeneration(CodexImageGenerationEventRequest),
|
||||
@@ -827,6 +828,19 @@ pub(crate) struct CodexDynamicToolCallEventRequest {
|
||||
pub(crate) event_params: CodexDynamicToolCallEventParams,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexControlToolCallEventParams {
|
||||
#[serde(flatten)]
|
||||
pub(crate) base: CodexToolItemEventBase,
|
||||
pub(crate) success: bool,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexControlToolCallEventRequest {
|
||||
pub(crate) event_type: &'static str,
|
||||
pub(crate) event_params: CodexControlToolCallEventParams,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexCollabAgentToolCallEventParams {
|
||||
#[serde(flatten)]
|
||||
|
||||
Reference in new issue
Block a user