Must have missed this one (#3733)
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
@@ -1529,7 +1529,17 @@ pub async fn handle_openrouter_auth() -> Result<(), Box<dyn Error>> {
|
|||||||
// Test configuration - get the model that was configured
|
// Test configuration - get the model that was configured
|
||||||
println!("\nTesting configuration...");
|
println!("\nTesting configuration...");
|
||||||
let configured_model: String = config.get_param("GOOSE_MODEL")?;
|
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) {
|
match create("openrouter", model_config) {
|
||||||
Ok(provider) => {
|
Ok(provider) => {
|
||||||
// Simple test request
|
// Simple test request
|
||||||
|
|||||||
Reference in New Issue
Block a user