mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Add configurable goal token budget limits (#37878)
## What changed - Add `goals.max_goal_token_budget` as a positive-integer configuration setting. - Use the configured maximum as the default budget for new goals and when `tokenBudget` is reset to `null`. - Reject goal creation and updates whose token budget exceeds the configured maximum, including requests through goal tools and `thread/goal/set`. - Respect managed configuration precedence and per-thread configuration overrides. ## Testing - Cover configuration parsing and managed overrides. - Cover defaulting, resetting, and rejecting oversized budgets through the goal service, goal tools, and app-server API. GitOrigin-RevId: f8d7e6418cdc237d454c8cf47bb32ba0d44a60cf
This commit is contained in:
@@ -303,6 +303,7 @@ fn new_config(model: Option<String>, arg0_paths: Arg0DispatchPaths) -> anyhow::R
|
||||
background_terminal_max_timeout: 300_000,
|
||||
ghost_snapshot: GhostSnapshotConfig::default(),
|
||||
multi_agent_v2: MultiAgentV2Config::default(),
|
||||
max_goal_token_budget: None,
|
||||
token_budget: None,
|
||||
rollout_budget: None,
|
||||
current_time_reminder: None,
|
||||
|
||||
Reference in New Issue
Block a user