zed-industries/zed · error

GraphQL endpoint discovery failed

Error message

GraphQL endpoint discovery failed: {}

What it means

The GraphQL query used to discover the Copilot Chat API endpoint failed; the message wraps the discovery error (network failure or GraphQL error response). Zed could not learn which API base URL to use for Copilot Chat requests.

Solutions

  1. Check network access to the Copilot GraphQL endpoint
  2. Re-authenticate if the token was rejected (see the wrapped error)
  3. Retry; transient failures of discovery are common
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/copilot_chat/src/copilot_chat.rs:957 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/bc32abe2219efc68. Report an issue: GitHub.

Appendix: source

Thrown at crates/copilot_chat/src/copilot_chat.rs:965

                && model
                    .policy
                    .as_ref()
                    .is_none_or(|policy| policy.state == "enabled")
        })
        .collect();

    if let Some(default_model_position) = models.iter().position(|model| model.is_chat_default) {
        let default_model = models.remove(default_model_position);
        models.insert(0, default_model);
    }

    Ok(models)
}

#[derive(Deserialize)]
struct GraphQLResponse {
    data: Option<GraphQLData>,
}

#[derive(Deserialize)]
struct GraphQLData {
    viewer: GraphQLViewer,
}

#[derive(Deserialize)]
struct GraphQLViewer {
    #[serde(rename = "copilotEndpoints")]
    copilot_endpoints: GraphQLCopilotEndpoints,
}

#[derive(Deserialize)]
struct GraphQLCopilotEndpoints {
    api: String,
}

pub(crate) async fn discover_api_endpoint(

View on GitHub (pinned to 916fc2b8cb)