zed-industries/zed · error
Provider {} is not authenticated
Error message
Provider {} is not authenticated What it means
The selected provider exists in the LanguageModelRegistry but is not authenticated — its credentials/API key are missing. This guard fires after the provider lookup succeeds and before the agent run starts, because requests to that provider would all fail with 401.
Source
Thrown at crates/eval_cli/src/main.rs:457
if !should_wait_for_discovery || started_at.elapsed() >= MODEL_DISCOVERY_TIMEOUT {
return Err(cx.update(|cx| model_not_found_error(&selected_model_name(selected), cx)));
}
cx.background_executor()
.timer(MODEL_DISCOVERY_POLL_INTERVAL)
.await;
}
}
fn ensure_provider_authenticated(selected: &SelectedModel, cx: &gpui::App) -> Result<()> {
let registry = LanguageModelRegistry::global(cx);
let provider = registry
.read(cx)
.provider(&selected.provider)
.ok_or_else(|| anyhow::anyhow!("Provider {} not found", selected.provider.0))?;
anyhow::ensure!(
provider.is_authenticated(cx),
"Provider {} is not authenticated",
selected.provider.0
);
Ok(())
}
fn find_available_model(
selected: &SelectedModel,
cx: &gpui::App,
) -> Option<Arc<dyn LanguageModel>> {
let registry = LanguageModelRegistry::global(cx);
let models = registry.read(cx).available_models(cx).collect::<Vec<_>>();
if let Some(model) = models
.iter()
.find(|model| model.provider_id() == selected.provider && model.id() == selected.model)View on GitHub (pinned to f4178619ac)
Solutions
- Run the provider's sign-in flow (e.g. 'zed: sign in') or set its API key in settings before running eval_cli
- For OpenAI-compatible providers, verify the api_url/api_key settings are present and correct
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/eval_cli/src/main.rs:457 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/6975a18d70813e85.
Report an issue: GitHub.