zed-industries/zed · error

Provider {} not found

Error message

Provider {} not found

What it means

ensure_provider_authenticated looked up the provider id from the selected model spec in the global LanguageModelRegistry and found no matching provider. The provider portion of the model name (e.g. 'anthropic') does not correspond to any registered/built-in provider, so authentication cannot even be checked.

Source

Thrown at crates/eval_cli/src/main.rs:455

        let should_wait_for_discovery =
            selected.provider == ANTHROPIC_PROVIDER_ID || !selected_provider_has_models;

        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

View on GitHub (pinned to f4178619ac)

Solutions

  1. Use a provider id that exists in the registry (check available providers in settings)
  2. Register the custom/OpenAI-compatible provider via configuration before referencing it in --model
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/eval_cli/src/main.rs:455 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/0b42e0cfae84df34. Report an issue: GitHub.