mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Track inference tool changes in turn analytics (#50964)
## What changed Add `tools_change_count` to turn profiles and turn analytics events. Compare the full model-visible tool list before each sampling request, retaining the previous list across turns and connection resets. The first list establishes a baseline; subsequent changes increment the current turn's count. ## Testing Add coverage for schema changes, tool additions, ordering changes, empty lists, and tracking across sessions and transport fallback. Extend the turn event serialization test to include `tools_change_count`. GitOrigin-RevId: 44a15c42dc7d0b35c166666faeb9627b718b33dd
This commit is contained in:
@@ -237,6 +237,7 @@ fn turn_profile_breaks_down_sampling_blocking_and_retry_overhead() {
|
||||
after_last_sampling_ms: 100,
|
||||
sampling_request_count: 2,
|
||||
sampling_retry_count: 1,
|
||||
tools_change_count: 0,
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -270,6 +271,7 @@ fn turn_profile_counts_compaction_as_an_exclusive_phase() {
|
||||
after_last_sampling_ms: 100,
|
||||
sampling_request_count: 1,
|
||||
sampling_retry_count: 0,
|
||||
tools_change_count: 0,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user