mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Add token history and credit formatting helpers for analytics (#45741)
## What changed - Add daily text token history grouped by model or token type, with date-range and model filtering, freshness metadata, and validation of token counts. Support both grouped and per-model report data, including reported model totals when components are unavailable. - Add credit formatting helpers that preserve tiny signed adjustments and format integer millionths without floating-point rounding, plus a short date formatter. ## Testing Add unit tests for token groupings, model filtering, freshness, missing components, explicit zero totals, and credit formatting across tiny refunds and integer limits. GitOrigin-RevId: 706dcae7995e46707c2f1df9cdf3e06966459dd6
This commit is contained in:
1 parent
1fd5399004
commit
7224096b85
6 files changed
+407
No files matched your search
@@ -25,6 +25,7 @@ pub(crate) enum AccountAnalyticsUnit {
|
||||
RelativeUsage,
|
||||
Credits,
|
||||
Count,
|
||||
Tokens,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
|
||||
Reference in new issue
Block a user