{"record":{"id":"1a554e7ffa17bd0f","repo":"aaif-goose/goose","slug":"could-not-resolve-default-model","errorCode":null,"errorMessage":"Could not resolve default model: {}","messagePattern":"Could not resolve default model: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/goose/src/agents/agent.rs","lineNumber":3571,"sourceCode":"                let model_name = config\n                    .get_goose_model()\n                    .ok()\n                    .ok_or_else(|| anyhow!(\"Could not configure agent: missing model\"))?;\n                crate::model_config::model_config_from_user_config(&provider_name, &model_name)\n                    .map_err(|e| anyhow!(\"Could not configure agent: invalid model {}\", e))?\n            }\n        };\n\n        // if the saved model is the ACP sentinel \"current\", only preserve this if the provider\n        // uses this sentinel to indicate it's an ACP provider that manages its model\n        if model_config.model_name == crate::acp::ACP_CURRENT_MODEL {\n            if let Ok(entry) = crate::providers::get_from_registry(&provider_name).await {\n                if entry.metadata().default_model != crate::acp::ACP_CURRENT_MODEL {\n                    model_config = crate::model_config::model_config_from_user_config(\n                        &provider_name,\n                        &entry.metadata().default_model,\n                    )\n                    .map_err(|e| anyhow!(\"Could not resolve default model: {}\", e))?;\n                }\n            }\n        }\n\n        let extensions =\n            EnabledExtensionsState::extensions_or_default(Some(&session.extension_data), config);\n\n        let (provider, active_model_config, provider_changed) =\n            if crate::providers::get_from_registry(&provider_name)\n                .await\n                .is_ok()\n            {\n                let p = crate::providers::create_with_working_dir(\n                    &provider_name,\n                    extensions,\n                    session.working_dir.clone(),\n                )\n                .await","sourceCodeStart":3553,"sourceCodeEnd":3589,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose/src/agents/agent.rs#L3553-L3589","documentation":"Thrown when the saved model is the ACP sentinel value (\"current\", indicating an ACP provider that manages its own model), but the provider's registry entry declares a different default model. Goose then rebuilds the ModelConfig from that default model, and this line wraps a failure of that rebuild. The '{}' carries the same class of underlying errors as model_config_from_user_config: invalid global config parameters or unmaterializable model settings.","triggerScenarios":"Resuming a session saved with model \"current\" for an ACP provider whose registry default_model is not \"current\", while global config contains an invalid value (negative GOOSE_TEMPERATURE, bad GOOSE_TOOLSHIM, malformed limits) that makes materializing the default model fail.","commonSituations":"Upgrading goose so a provider's declared default model changed; resuming cross-machine with a different config.yaml; hand-tuned config keys that only break on this rebuild path.","solutions":["Read the '{}' detail to identify the offending config key and fix or remove it in config.yaml","Re-select the provider's model in the session (send a /model change) so the saved model is a concrete name, not \"current\"","Update goose so the provider registry metadata matches the provider you used"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Rust — validate the config surface before restoring an ACP \"current\" session\nif model_config.model_name == crate::acp::ACP_CURRENT_MODEL {\n    if let Ok(entry) = crate::providers::get_from_registry(&provider_name).await {\n        let default = entry.metadata().default_model.clone();\n        if default != crate::acp::ACP_CURRENT_MODEL {\n            crate::model_config::model_config_from_user_config(&provider_name, &default)?; // fail early with the raw error\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep global GOOSE_* values valid so the \"current\"-sentinel rebuild cannot fail","After upgrading goose or the provider, run one resume to confirm sentinel resolution still works"],"tags":["configuration","acp","model","session-restore","registry"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}