{"record":{"id":"8868f8ca762938da","repo":"zed-industries/zed","slug":"provider-not-found","errorCode":null,"errorMessage":"Provider not found","messagePattern":"Provider not found","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/agent/src/agent.rs","lineNumber":2573,"sourceCode":"        let list = self.connection.0.read(cx).models.model_list.clone();\n        Task::ready(if list.is_empty() {\n            Err(anyhow::anyhow!(\"No models available\"))\n        } else {\n            Ok(list)\n        })\n    }\n\n    fn select_model(&self, model_id: AgentModelId, cx: &mut App) -> Task<Result<()>> {\n        log::debug!(\n            \"Setting model for session {}: {}\",\n            self.session_id,\n            model_id\n        );\n        let Some(thread) = self\n            .connection\n            .0\n            .read(cx)\n            .sessions\n            .get(&self.session_id)\n            .map(|session| session.thread.clone())\n        else {\n            return Task::ready(Err(anyhow!(\"Session not found\")));\n        };\n\n        let Some(model) = self.connection.0.read(cx).models.model_from_id(&model_id) else {\n            return Task::ready(Err(anyhow!(\"Invalid model ID {}\", model_id)));\n        };\n\n        let favorite = agent_settings::AgentSettings::get_global(cx)\n            .favorite_models\n            .iter()\n            .find(|favorite| {\n                favorite.provider.0 == model.provider_id().0.as_ref()\n                    && favorite.model == model.id().0.as_ref()\n            })\n            .cloned();","sourceCodeStart":2555,"sourceCodeEnd":2591,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent/src/agent.rs#L2555-L2591","documentation":"Returned by selected_model when the thread has a model selected but the LanguageModelRegistry cannot resolve a provider for it (provider lookup returns None), e.g. the provider was uninstalled or disabled after selection. Resolves as a ready Task carrying this sentinel error.","triggerScenarios":"Thrown at crates/agent/src/agent.rs:2536 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-enable or reinstall the provider extension that owned the model","Switch the thread to a model from an available provider","Refresh the model registry so stale providers are pruned and defaults re-selected"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}