Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Allow passing custom access token to zeta2 models via env var (#46830)
Max Brunsfeld14e05ccb783d
diff --git a/crates/edit_prediction/src/edit_prediction.rs b/crates/edit_prediction/src/edit_prediction.rsindex a3035a72ace..880ea9b2320 100644--- a/crates/edit_prediction/src/edit_prediction.rs+++ b/crates/edit_prediction/src/edit_prediction.rs@@ -2055,7 +2055,9 @@ impl EditPredictionStore {{let http_client = client.http_client();- let mut token = if require_auth {+ let mut token = if let Ok(custom_token) = std::env::var("ZED_PREDICT_EDITS_TOKEN") {+ Some(custom_token)+ } else if require_auth {Some(llm_token.acquire(&client).await?)} else {llm_token.acquire(&client).await.ok()