zed-industries/zed · error
Model {model_name} not found. Available: {available}
Error message
Model {model_name} not found. Available: {available} What it means
model_not_found_error builds a diagnostic after the model discovery wait timed out or was skipped: the requested provider/model pair is not among the registry's available_models, and the message enumerates what IS available (or '(none)'). It fires when MODEL_DISCOVERY_TIMEOUT elapsed without the model appearing, meaning the model id is misspelled, not offered by the provider, or discovery failed entirely.
Source
Thrown at crates/eval_cli/src/main.rs:552
}
fn selected_model_name(selected: &SelectedModel) -> String {
format!("{}/{}", selected.provider.0, selected.model.0)
}
fn model_not_found_error(model_name: &str, cx: &gpui::App) -> anyhow::Error {
let available = LanguageModelRegistry::global(cx)
.read(cx)
.available_models(cx)
.map(|model| format!("{}/{}", model.provider_id().0, model.id().0))
.collect::<Vec<_>>();
let available = if available.is_empty() {
"(none)".to_string()
} else {
available.join(", ")
};
anyhow::anyhow!("Model {model_name} not found. Available: {available}")
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn anthropic_latest_alias_matches_listed_base_model() {
assert!(model_id_matches_selected(
&ANTHROPIC_PROVIDER_ID,
&LanguageModelId("claude-sonnet-4-6".into()),
&LanguageModelId("claude-sonnet-4-6-latest".into()),
));
}
#[test]
fn anthropic_thinking_alias_matches_listed_base_model() {
assert!(model_id_matches_selected(View on GitHub (pinned to f4178619ac)
Solutions
- Check the 'Available:' list in the error and correct the --model provider/model spelling
- If the list is '(none)', fix provider configuration/authentication first — discovery produced no models
- Increase the discovery wait if the provider catalog is slow to load
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/eval_cli/src/main.rs:552 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/f5759997324e0a1c.
Report an issue: GitHub.