zed-industries/zed · error · anyhow::Error
Provider not found
Error message
Provider not found
What it means
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.
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/agent/src/agent.rs:2536 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20).
Data as JSON: /api/errors/8868f8ca762938da.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent/src/agent.rs:2573
let list = self.connection.0.read(cx).models.model_list.clone();
Task::ready(if list.is_empty() {
Err(anyhow::anyhow!("No models available"))
} else {
Ok(list)
})
}
fn select_model(&self, model_id: AgentModelId, cx: &mut App) -> Task<Result<()>> {
log::debug!(
"Setting model for session {}: {}",
self.session_id,
model_id
);
let Some(thread) = self
.connection
.0
.read(cx)
.sessions
.get(&self.session_id)
.map(|session| session.thread.clone())
else {
return Task::ready(Err(anyhow!("Session not found")));
};
let Some(model) = self.connection.0.read(cx).models.model_from_id(&model_id) else {
return Task::ready(Err(anyhow!("Invalid model ID {}", model_id)));
};
let favorite = agent_settings::AgentSettings::get_global(cx)
.favorite_models
.iter()
.find(|favorite| {
favorite.provider.0 == model.provider_id().0.as_ref()
&& favorite.model == model.id().0.as_ref()
})
.cloned();View on GitHub (pinned to 916fc2b8cb)