Files
codex/codex-rs
felixxia-oai b473c4e6ab Record Guardian v2 classification token usage (#39303)
## What changed

- Pass session-attributed extension metrics to the Guardian v2 sampler.
- Record `codex.guardian_v2.classification.token_usage` histograms for total, input, cached input, cache-write input, non-cached input, output, and reasoning output tokens.
- Preserve token accounting when streamed JSON produces an early score by recording usage from the terminal response in the background.

## Testing

- Cover token metrics through the Guardian v2 extension and the sampler's early-score path.

GitOrigin-RevId: 04fadc07f3b9cbe83f9fa3737536860b5cf5b4be
2026-08-18 22:33:28 +00:00
..
2026-07-29 13:53:15 +00:00
2026-08-17 23:04:09 +00:00
…
2026-07-29 13:53:15 +00:00
2026-06-04 09:16:03 -07:00