mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Use provider-reported rollout budget units (#36715)
## What changed - Charge `codex_rollout_budget_units` against the shared rollout budget when the provider includes it in response usage. - Fall back to weighted input and output token accounting when provider units are absent. - Reject non-finite or negative provider units as a fatal response error. ## Testing - Cover provider units in reminder thresholds and local and remote compaction budget exhaustion. - Verify invalid units fail without retrying the response. GitOrigin-RevId: b452403e365985854d16f298d1ba46383e9892c4
This commit is contained in:
1 parent
bb5054fe47
commit
8b8fa7276f
3 files changed
+104
-15
No files matched your search
@@ -28,7 +28,7 @@ impl Session {
|
||||
.services
|
||||
.agent_control
|
||||
.rollout_budget()
|
||||
.record_usage(usage)
|
||||
.record_usage(usage)?
|
||||
{
|
||||
return Err(CodexErr::SessionBudgetExceeded);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user