mirror of
https://github.com/openai/codex.git
synced 2026-11-25 07:23:22 +00: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:
1 parent
8a71f8b634
commit
cb9a189857
44 files changed
+838
-429
No files matched your search
@@ -11,7 +11,10 @@ pub const DEFAULT_OSS_MODEL: &str = "openai/gpt-oss-20b";
|
||||
/// - Ensures a local LM Studio server is reachable.
|
||||
/// - Checks if the model exists locally and downloads it if missing.
|
||||
pub async fn ensure_oss_ready(config: &Config) -> std::io::Result<()> {
|
||||
let model: &str = config.model.as_ref();
|
||||
let model = match config.model.as_ref() {
|
||||
Some(model) => model,
|
||||
None => DEFAULT_OSS_MODEL,
|
||||
};
|
||||
|
||||
// Verify local LM Studio is reachable.
|
||||
let lmstudio_client = LMStudioClient::try_from_provider(config).await?;
|
||||
|
||||
Reference in new issue
Block a user