{"record":{"id":"1bd6f6c4fe8747a1","repo":"zed-industries/zed","slug":"error-1bd6f6","errorCode":null,"errorMessage":"{:?}","messagePattern":"\\{:\\?\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/edit_prediction_cli/src/openai_client.rs","lineNumber":63,"sourceCode":"            max_tokens: None,\n            stop: Vec::new(),\n            temperature: None,\n            tool_choice: None,\n            parallel_tool_calls: None,\n            service_tier: None,\n            tools: Vec::new(),\n            prompt_cache_key: None,\n            reasoning_effort: None,\n        };\n\n        let response = non_streaming_completion(\n            self.http_client.as_ref(),\n            OPEN_AI_API_URL,\n            &self.api_key,\n            request,\n        )\n        .await\n        .map_err(|e| anyhow::anyhow!(\"{:?}\", e))?;\n\n        Ok(response)\n    }\n}\n\npub struct BatchingOpenAiClient {\n    connection: Mutex<sqlez::connection::Connection>,\n    http_client: Arc<dyn HttpClient>,\n    api_key: String,\n}\n\nstruct CacheRow {\n    request_hash: String,\n    request: Option<String>,\n    response: Option<String>,\n    batch_id: Option<String>,\n}\n","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction_cli/src/openai_client.rs#L45-L81","documentation":"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.","triggerScenarios":"Thrown at crates/edit_prediction_cli/src/openai_client.rs:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped error for the failing step","Verify the API key and endpoint configuration","Retry on transient network failures"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}