From e5ac6412ecce63511917a193956d3382e9726a3d Mon Sep 17 00:00:00 2001 From: Douwe Osinga Date: Wed, 30 Jul 2025 13:29:20 +0200 Subject: [PATCH] Must have missed this one (#3733) Co-authored-by: Douwe Osinga --- 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 059f4b68..e0a05c02 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