{"record":{"id":"2dee9f3b7f1b4d57","repo":"aaif-goose/goose","slug":"could-not-configure-fallback-provider-missing-mod","errorCode":null,"errorMessage":"Could not configure fallback provider: missing model","messagePattern":"Could not configure fallback provider: missing model","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/goose/src/agents/agent.rs","lineNumber":3611,"sourceCode":"                let fallback_provider_name = config\n                    .get_goose_provider()\n                    .ok()\n                    .filter(|name| name != &provider_name)\n                    .ok_or_else(|| {\n                        anyhow!(\n                            \"Could not create provider: provider '{}' not found\",\n                            provider_name\n                        )\n                    })?;\n\n                tracing::warn!(\n                    \"Session provider '{}' unavailable, falling back to '{}'\",\n                    provider_name,\n                    fallback_provider_name\n                );\n\n                let fallback_model_name = config.get_goose_model().ok().ok_or_else(|| {\n                    anyhow!(\"Could not configure fallback provider: missing model\")\n                })?;\n                let fallback_model_config = crate::model_config::model_config_from_user_config(\n                    &fallback_provider_name,\n                    &fallback_model_name,\n                )\n                .map_err(|e| {\n                    anyhow!(\"Could not configure fallback provider: invalid model {}\", e)\n                })?;\n\n                let fallback_provider = crate::providers::create_with_working_dir(\n                    &fallback_provider_name,\n                    extensions,\n                    session.working_dir.clone(),\n                )\n                .await\n                .map_err(|error| {\n                    provider_creation_error(\n                        error,","sourceCodeStart":3593,"sourceCodeEnd":3629,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose/src/agents/agent.rs#L3593-L3629","documentation":"Thrown on the fallback path of restore_provider_from_session: the session's provider is unavailable, a different fallback provider was found in config, but GOOSE_MODEL is unset so the fallback's model config cannot be built. Restore aborts before creating the fallback provider.","triggerScenarios":"Resuming a session whose provider is missing from the registry while config sets GOOSE_PROVIDER (a valid fallback) but no GOOSE_MODEL — the model_config of the session also could not be reused for the fallback provider.","commonSituations":"Partial configuration where only the provider was set; config.yaml trimmed during debugging and the model key not restored; CI environments exporting GOOSE_PROVIDER alone.","solutions":["Set GOOSE_MODEL ('goose configure' or 'export GOOSE_MODEL=<model>') so the fallback provider can be built","Verify both keys in ~/.config/goose/config.yaml","Alternatively reinstall/restore the session's original provider so no fallback is needed"],"exampleFix":"# before\n$ export GOOSE_PROVIDER=openai\n$ goose session resume\nError: Could not configure fallback provider: missing model\n\n# after\n$ export GOOSE_MODEL=gpt-4o\n$ goose session resume","handlingStrategy":"validation","validationCode":"// Rust — the fallback path needs a model; check before resume\nlet fallback_ready = Config::global().get_goose_model().is_ok();\nif !fallback_ready {\n    // set GOOSE_MODEL so a fallback provider can be configured\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure provider AND model together; the fallback path requires both","Test resume after removing any config keys"],"tags":["configuration","model","fallback","session-restore"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}