From 8c1f06831e5300b9ad09873f03cb42e679e782d1 Mon Sep 17 00:00:00 2001 From: Douwe Osinga Date: Wed, 30 Jul 2025 13:12:00 +0200 Subject: [PATCH] Must have missed this one --- crates/goose-cli/src/commands/configure.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/goose-cli/src/commands/configure.rs b/crates/goose-cli/src/commands/configure.rs index 059f4b68efd1..e0a05c023c7e 100644 --- a/crates/goose-cli/src/commands/configure.rs +++ b/crates/goose-cli/src/commands/configure.rs @@ -1529,7 +1529,17 @@ pub async fn handle_openrouter_auth() -> Result<(), Box> { // Test configuration - get the model that was configured println!("\nTesting configuration..."); let configured_model: String = config.get_param("GOOSE_MODEL")?; - let model_config = goose::model::ModelConfig::new(configured_model); + let model_config = match goose::model::ModelConfig::new(&configured_model) { + Ok(config) => config, + Err(e) => { + eprintln!("⚠️ Invalid model configuration: {}", e); + eprintln!( + "Your settings have been saved. Please check your model configuration." + ); + return Ok(()); + } + }; + match create("openrouter", model_config) { Ok(provider) => { // Simple test request