mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Allow models to enable token budgeting by default (#41803)
## What changed - Add model metadata flags for enabling token budgeting and its history-notes extension. - Apply those activation defaults once at thread startup when the user has not explicitly configured token budgeting, while respecting managed feature requirements. - Continue resolving model-owned prompts for the active model so model switches can use their own token-budget guidance. ## Testing - Update the token-budget integration test to verify that model metadata activates the feature without manual configuration. GitOrigin-RevId: 73a32623eaeabb9243e240c43da7a5e7e93e9a19
This commit is contained in:
1 parent
a9519cbcdd
commit
d58d0e5841
8 files changed
+60
-12
No files matched your search
@@ -668,6 +668,10 @@ impl Session {
|
||||
let model_info = models_manager
|
||||
.get_model_info(model.as_str(), &config.to_models_manager_config())
|
||||
.await;
|
||||
// Intentionally resolve `enabled` and `use_history_notes_extension` only at
|
||||
// thread startup. Both activation flags stay fixed for this thread runtime,
|
||||
// even if the selected model changes later.
|
||||
token_budget::apply_model_defaults(Arc::make_mut(&mut config), &model_info);
|
||||
let configured_config = Arc::clone(&config);
|
||||
let multi_agent_version = config.multi_agent_version_override().or_else(|| {
|
||||
resolve_multi_agent_version(&conversation_history, inherited_multi_agent_version)
|
||||
|
||||
Reference in new issue
Block a user