aaif-goose/goose · error
Could not resolve default model: {}
Error message
Could not resolve default model: {} What it means
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.
Source
Thrown at crates/goose/src/agents/agent.rs:3571
let model_name = config
.get_goose_model()
.ok()
.ok_or_else(|| anyhow!("Could not configure agent: missing model"))?;
crate::model_config::model_config_from_user_config(&provider_name, &model_name)
.map_err(|e| anyhow!("Could not configure agent: invalid model {}", e))?
}
};
// if the saved model is the ACP sentinel "current", only preserve this if the provider
// uses this sentinel to indicate it's an ACP provider that manages its model
if model_config.model_name == crate::acp::ACP_CURRENT_MODEL {
if let Ok(entry) = crate::providers::get_from_registry(&provider_name).await {
if entry.metadata().default_model != crate::acp::ACP_CURRENT_MODEL {
model_config = crate::model_config::model_config_from_user_config(
&provider_name,
&entry.metadata().default_model,
)
.map_err(|e| anyhow!("Could not resolve default model: {}", e))?;
}
}
}
let extensions =
EnabledExtensionsState::extensions_or_default(Some(&session.extension_data), config);
let (provider, active_model_config, provider_changed) =
if crate::providers::get_from_registry(&provider_name)
.await
.is_ok()
{
let p = crate::providers::create_with_working_dir(
&provider_name,
extensions,
session.working_dir.clone(),
)
.awaitView on GitHub (pinned to 3810898a74)
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
Defensive patterns
Strategy: validation
Validate before calling
// Rust — validate the config surface before restoring an ACP "current" session
if model_config.model_name == crate::acp::ACP_CURRENT_MODEL {
if let Ok(entry) = crate::providers::get_from_registry(&provider_name).await {
let default = entry.metadata().default_model.clone();
if default != crate::acp::ACP_CURRENT_MODEL {
crate::model_config::model_config_from_user_config(&provider_name, &default)?; // fail early with the raw error
}
}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Could not configure agent: missing model
- Could not configure agent: invalid model {}
- Could not configure fallback provider: missing model
- Could not configure fallback provider: invalid model {}
- External ACP backend URL is required
AI-assisted analysis of aaif-goose/goose@3810898a74 (2026-08-16).
Data as JSON: /api/errors/1a554e7ffa17bd0f.
Report an issue: GitHub.