mirror of
https://github.com/openai/codex.git
synced 2026-11-22 07:13:50 +00:00
Make token budget context identity configurable (#36970)
## What changed - Add a `features.token_budget.mode` setting with `thread` and `name` values. - Default context-window metadata to the thread ID while allowing configurations to retain the agent name. - Preserve the selected identity mode when applying model token-budget defaults and replaying locked configuration. ## Testing - Cover configuration parsing and both identity formats in token-budget context messages. GitOrigin-RevId: f6e6d2c49e09e70c0352e803bb65784ef77e5bee
This commit is contained in:
1 parent
720c9d68e1
commit
c607da9f37
11 files changed
+102
-12
No files matched your search
@@ -272,6 +272,7 @@ mod tests {
|
||||
config.multi_agent_v2.subagent_developer_instructions =
|
||||
Some("Locked subagent developer instructions.".to_string());
|
||||
config.token_budget = Some(crate::config::TokenBudgetConfig {
|
||||
mode: codex_features::TokenBudgetMode::Thread,
|
||||
reminder_threshold_tokens: Some(16_000),
|
||||
reminder_message_template: "Locked reminder: {n_remaining} tokens.".to_string(),
|
||||
guidance_message: Some("Locked context-window guidance.".to_string()),
|
||||
@@ -371,6 +372,7 @@ mod tests {
|
||||
features.token_budget,
|
||||
Some(FeatureToml::Config(TokenBudgetConfigToml {
|
||||
enabled: Some(true),
|
||||
mode: Some(codex_features::TokenBudgetMode::Thread),
|
||||
reminder_threshold_tokens: Some(16_000),
|
||||
reminder_message_template: Some(
|
||||
"Locked reminder: {n_remaining} tokens.".to_string()
|
||||
|
||||
Reference in new issue
Block a user