mirror of
https://github.com/openai/codex.git
synced 2026-11-09 20:50:33 +00:00
Support model-owned token budget defaults (#35608)
## What changed - Add token-budget settings to model catalog messages and apply them when the feature is enabled without explicit token-budget configuration. - Keep explicit user settings authoritative, reject invalid catalog defaults, and preserve resolved defaults in exported config locks. - Manage context-window guidance through world state so it updates once when the active model changes while retaining prior conversation history. ## Testing - Cover catalog defaults, explicit overrides, disabled features, invalid values, config-lock replay, and model switching. GitOrigin-RevId: 54544fefaa14b09f5ef5bad9967a13c52b87b0fe
This commit is contained in:
@@ -1453,6 +1453,7 @@ mod tests {
|
||||
policy_template: Some(catalog_template.to_string()),
|
||||
}),
|
||||
permissions: None,
|
||||
token_budget: None,
|
||||
};
|
||||
|
||||
let guardian_config = build_guardian_review_session_config(
|
||||
@@ -1485,6 +1486,7 @@ mod tests {
|
||||
policy_template: None,
|
||||
}),
|
||||
permissions: None,
|
||||
token_budget: None,
|
||||
};
|
||||
|
||||
let guardian_config = build_guardian_review_session_config(
|
||||
@@ -1525,6 +1527,7 @@ mod tests {
|
||||
policy_template: Some(String::new()),
|
||||
}),
|
||||
permissions: None,
|
||||
token_budget: None,
|
||||
};
|
||||
|
||||
let guardian_config = build_guardian_review_session_config(
|
||||
|
||||
Reference in New Issue
Block a user