Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix lost error messages when listing OpenRouter models (#58502)
Zhiwei Liangaf264433a954
diff --git a/crates/open_router/src/open_router.rs b/crates/open_router/src/open_router.rsindex 01dbe69ed7d..885e42fd9b5 100644--- a/crates/open_router/src/open_router.rs+++ b/crates/open_router/src/open_router.rs@@ -610,13 +610,6 @@ pub async fn list_models(} else {let code = ApiErrorCode::from_status(response.status().as_u16());- let mut body = String::new();- response- .body_mut()- .read_to_string(&mut body)- .await- .map_err(OpenRouterError::ReadResponse)?;-let error_response = match serde_json::from_str::<OpenRouterErrorResponse>(&body) {Ok(OpenRouterErrorResponse { error }) => error,Err(_) => OpenRouterErrorBody {