zeta: Send staff edit predictions through llm.zed.dev again (#23996)

This PR changes the edit predictions URL for Zed Staff back to
`llm.zed.dev/predict_edits`.

This endpoint is now being routed to the Cloudflare Workers instead of
the LLM service.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-01-30 21:07:38 -05:00 committed by GitHub
parent 517e519bdc
commit 35fbe1ef3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -602,7 +602,7 @@ and then another
fn perform_predict_edits( fn perform_predict_edits(
client: Arc<Client>, client: Arc<Client>,
llm_token: LlmApiToken, llm_token: LlmApiToken,
is_staff: bool, _is_staff: bool,
body: PredictEditsParams, body: PredictEditsParams,
) -> impl Future<Output = Result<PredictEditsResponse>> { ) -> impl Future<Output = Result<PredictEditsResponse>> {
async move { async move {
@ -611,18 +611,11 @@ and then another
let mut did_retry = false; let mut did_retry = false;
loop { loop {
let request_builder = http_client::Request::builder().method(Method::POST); let request_builder = http_client::Request::builder().method(Method::POST).uri(
let request_builder = if is_staff { http_client
request_builder.uri( .build_zed_llm_url("/predict_edits", &[])?
"https://llm-worker-production.zed-industries.workers.dev/predict_edits", .as_ref(),
) );
} else {
request_builder.uri(
http_client
.build_zed_llm_url("/predict_edits", &[])?
.as_ref(),
)
};
let request = request_builder let request = request_builder
.header("Content-Type", "application/json") .header("Content-Type", "application/json")
.header("Authorization", format!("Bearer {}", token)) .header("Authorization", format!("Bearer {}", token))