Remove individual URL overrides for LLM service (#30290)
This PR removes the individual URL overrides for the LLM service. We initially had `ZED_PREDICT_EDITS_URL` to allow for directing traffic to the LLM Worker back when there was still the split of the Collab-based LLM Service and the Cloudflare-based LLM Worker. But now that all of the LLM functionality has been moved into the Worker, we can just direct all traffic there. Release Notes: - N/A
This commit is contained in:
parent
c64dc82e21
commit
f21780cef3
4 changed files with 21 additions and 39 deletions
|
@ -740,18 +740,13 @@ and then another
|
|||
let mut did_retry = false;
|
||||
|
||||
loop {
|
||||
let request_builder = http_client::Request::builder().method(Method::POST);
|
||||
let request_builder =
|
||||
if let Ok(predict_edits_url) = std::env::var("ZED_PREDICT_EDITS_URL") {
|
||||
request_builder.uri(predict_edits_url)
|
||||
} else {
|
||||
request_builder.uri(
|
||||
http_client
|
||||
.build_zed_llm_url("/predict_edits/v2", &[])?
|
||||
.as_ref(),
|
||||
)
|
||||
};
|
||||
let request = request_builder
|
||||
let request = http_client::Request::builder()
|
||||
.method(Method::POST)
|
||||
.uri(
|
||||
http_client
|
||||
.build_zed_llm_url("/predict_edits/v2", &[])?
|
||||
.as_ref(),
|
||||
)
|
||||
.header("Content-Type", "application/json")
|
||||
.header("Authorization", format!("Bearer {}", token))
|
||||
.header(ZED_VERSION_HEADER_NAME, app_version.to_string())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue