mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Capture rollout budget units from response usage (#36641)
## What changed - Parse `codex_rollout_budget_units` from completed Responses API usage into `TokenUsage`. - Keep the provider-only value out of serialized protocol, JSON schema, and TypeScript representations. ## Testing - Cover the value in unit and end-to-end SSE response parsing tests. GitOrigin-RevId: a53d4202beb9c8985d25894cb10e7c01f20b2a44
This commit is contained in:
1 parent
5157493c23
commit
bb5054fe47
18 files changed
+63
-3
No files matched your search
@@ -324,6 +324,7 @@ fn token_delta_since_last_accounting(last: &TokenUsage, current: &TokenUsage) ->
|
||||
.reasoning_output_tokens
|
||||
.saturating_sub(last.reasoning_output_tokens),
|
||||
total_tokens: current.total_tokens.saturating_sub(last.total_tokens),
|
||||
codex_rollout_budget_units: None,
|
||||
};
|
||||
goal_token_delta_for_usage(&delta)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user