zed-industries/zed · error · anyhow::Error

ChatGPT models request timed out after {MODEL_CATALOG_REQUES

Error message

ChatGPT models request timed out after {MODEL_CATALOG_REQUEST_TIMEOUT:?}

What it means

The spawned background task that fetches the ChatGPT model catalog exceeded MODEL_CATALOG_REQUEST_TIMEOUT, so the HTTP request to OpenAI was aborted mid-flight. It indicates the models endpoint was unreachable or slow (network issues, proxy blocking, or OpenAI outage), not that the response was malformed.

Source

Thrown at crates/openai_subscribed/src/openai_subscribed.rs:254

    ) -> Task<Result<(), Arc<anyhow::Error>>> {
        self.model_catalog_generation = self.model_catalog_generation.wrapping_add(1);
        let model_catalog_generation = self.model_catalog_generation;
        let http_client = self.http_client.clone();
        let client_version = self.client_version.clone();

        cx.spawn(async move |this, cx| {
            let result = async {
                let credentials = get_fresh_credentials(&this, &http_client, cx)
                    .await
                    .map_err(|error| anyhow!("{error}"))?;
                let request =
                    list_models(http_client.as_ref(), &credentials, client_version.as_ref());
                let timeout = cx
                    .background_executor()
                    .timer(MODEL_CATALOG_REQUEST_TIMEOUT);
                futures::select! {
                    result = request.fuse() => result,
                    () = timeout.fuse() => Err(anyhow!(
                        "ChatGPT models request timed out after {MODEL_CATALOG_REQUEST_TIMEOUT:?}"
                    )),
                }
            }
            .await;

            match result {
                Ok(models) => this
                    .update(cx, |state, cx| {
                        if state.model_catalog_generation == model_catalog_generation {
                            state.available_models = models;
                            state.last_model_catalog_error = None;
                            cx.notify();
                        }
                    })
                    .map_err(Arc::new),
                Err(error) => {
                    let error = Arc::new(error);

View on GitHub (pinned to 5a9b9558db)

Solutions

  1. Check network connectivity and any proxy/VPN configuration that might block chatgpt.com or the OpenAI models endpoint
  2. Retry the request; the catalog refresh is rescheduled automatically on the next attempt or when credentials change
  3. If the timeout persists, check status.openai.com for an ongoing outage
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/openai_subscribed/src/openai_subscribed.rs:233 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20). Data as JSON: /api/errors/ad64087aaf386746. Report an issue: GitHub.