zed-industries/zed · error

{:?}

Error message

{:?}

What it means

PlainOpenAiClient::generate calls the non-streaming OpenAI completion endpoint and re-wraps any failure with Debug formatting; the message carries the underlying request error (network, auth, or API rejection) verbatim.

Source

Thrown at crates/edit_prediction_cli/src/openai_client.rs:63

            max_tokens: None,
            stop: Vec::new(),
            temperature: None,
            tool_choice: None,
            parallel_tool_calls: None,
            service_tier: None,
            tools: Vec::new(),
            prompt_cache_key: None,
            reasoning_effort: None,
        };

        let response = non_streaming_completion(
            self.http_client.as_ref(),
            OPEN_AI_API_URL,
            &self.api_key,
            request,
        )
        .await
        .map_err(|e| anyhow::anyhow!("{:?}", e))?;

        Ok(response)
    }
}

pub struct BatchingOpenAiClient {
    connection: Mutex<sqlez::connection::Connection>,
    http_client: Arc<dyn HttpClient>,
    api_key: String,
}

struct CacheRow {
    request_hash: String,
    request: Option<String>,
    response: Option<String>,
    batch_id: Option<String>,
}

View on GitHub (pinned to f4178619ac)

Solutions

  1. Read the wrapped error for the failing step
  2. Verify the API key and endpoint configuration
  3. Retry on transient network failures
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/edit_prediction_cli/src/openai_client.rs:63 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/1bd6f6c4fe8747a1. Report an issue: GitHub.