mirror of
https://github.com/openai/codex.git
synced 2026-05-03 04:42:20 +03:00
make model optional in config (#7769)
- Make Config.model optional and centralize default-selection logic in ModelsManager, including a default_model helper (with codex-auto-balanced when available) so sessions now carry an explicit chosen model separate from the base config. - Resolve `model` once in `core` and `tui` from config. Then store the state of it on other structs. - Move refreshing models to be before resolving the default model
This commit is contained in:
@@ -17,7 +17,7 @@ fn normalize_agents_display_path(path: &Path) -> String {
|
||||
}
|
||||
|
||||
pub(crate) fn compose_model_display(
|
||||
config: &Config,
|
||||
model_name: &str,
|
||||
entries: &[(&str, String)],
|
||||
) -> (String, Vec<String>) {
|
||||
let mut details: Vec<String> = Vec::new();
|
||||
@@ -33,7 +33,7 @@ pub(crate) fn compose_model_display(
|
||||
}
|
||||
}
|
||||
|
||||
(config.model.clone(), details)
|
||||
(model_name.to_string(), details)
|
||||
}
|
||||
|
||||
pub(crate) fn compose_agents_summary(config: &Config) -> String {
|
||||
|
||||
Reference in New Issue
Block a user