[codex] configure rollout budget reminder thresholds (#29423)

## Summary

Instead of:

    reminder_interval_tokens = 65_536

allow users to configure explicit remaining-token reminder thresholds:

reminder_at_remaining_tokens = [65_536, 32_768, 16_384, 8_192, 4_096,
2_048, 1_024, 512]

## Validation

- CARGO_INCREMENTAL=0 just test -p codex-core rollout_budget: 9 passed
- just fix -p codex-core
- just fmt
This commit is contained in:
rka-oai
2026-06-22 13:25:48 -07:00
committed by GitHub
Unverified
parent 5a67d898a5
commit bd5bd953fb
8 changed files with 60 additions and 41 deletions
+2 -2
View File
@@ -109,8 +109,8 @@ pub struct RolloutBudgetConfigToml {
#[schemars(range(min = 1))]
pub limit_tokens: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
#[schemars(range(min = 1))]
pub reminder_interval_tokens: Option<i64>,
/// Remaining weighted-token values that trigger reminders when crossed.
pub reminder_at_remaining_tokens: Option<Vec<i64>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[schemars(range(min = 0.0))]
pub sampling_token_weight: Option<f64>,