fix: suggest correct model on switch (#789)

This commit is contained in:
Bradley Axen
2025-01-25 23:48:14 -08:00
committed by GitHub
parent 52d339da05
commit ee9d1f3d4c

View File

@@ -194,10 +194,8 @@ pub async fn configure_provider_dialog() -> Result<bool, Box<dyn Error>> {
}
}
// Select model, defaulting to the provider's recommended model
let default_model = config
.get("GOOSE_MODEL")
.unwrap_or(provider_meta.default_model.clone());
// Select model, defaulting to the provider's recommended model UNLESS there is an env override
let default_model = std::env::var("GOOSE_MODEL").unwrap_or(provider_meta.default_model.clone());
let model: String = cliclack::input("Enter a model from that provider:")
.default_input(&default_model)
.interact()?;