Route all LLM traffic through cloud.zed.dev
(#34404)
This PR makes it so all LLM traffic is routed through `cloud.zed.dev`. We're already routing `llm.zed.dev` to `cloud.zed.dev` on the server, but we want to standardize on `cloud.zed.dev` moving forward. Release Notes: - N/A
This commit is contained in:
parent
6673c7cd4c
commit
eca36c502e
8 changed files with 13 additions and 71 deletions
|
@ -8,7 +8,6 @@ mod rate_completion_modal;
|
|||
|
||||
pub(crate) use completion_diff_element::*;
|
||||
use db::kvp::KEY_VALUE_STORE;
|
||||
use feature_flags::{FeatureFlagAppExt as _, ZedCloudFeatureFlag};
|
||||
pub use init::*;
|
||||
use inline_completion::DataCollectionState;
|
||||
use license_detection::LICENSE_FILES_TO_CHECK;
|
||||
|
@ -391,7 +390,6 @@ impl Zeta {
|
|||
let client = self.client.clone();
|
||||
let llm_token = self.llm_token.clone();
|
||||
let app_version = AppVersion::global(cx);
|
||||
let use_cloud = cx.has_flag::<ZedCloudFeatureFlag>();
|
||||
|
||||
let buffer = buffer.clone();
|
||||
|
||||
|
@ -482,7 +480,6 @@ impl Zeta {
|
|||
llm_token,
|
||||
app_version,
|
||||
body,
|
||||
use_cloud,
|
||||
})
|
||||
.await;
|
||||
let (response, usage) = match response {
|
||||
|
@ -748,7 +745,6 @@ and then another
|
|||
llm_token,
|
||||
app_version,
|
||||
body,
|
||||
use_cloud,
|
||||
..
|
||||
} = params;
|
||||
|
||||
|
@ -764,7 +760,7 @@ and then another
|
|||
} else {
|
||||
request_builder.uri(
|
||||
http_client
|
||||
.build_zed_llm_url("/predict_edits/v2", &[], use_cloud)?
|
||||
.build_zed_llm_url("/predict_edits/v2", &[])?
|
||||
.as_ref(),
|
||||
)
|
||||
};
|
||||
|
@ -824,7 +820,6 @@ and then another
|
|||
let client = self.client.clone();
|
||||
let llm_token = self.llm_token.clone();
|
||||
let app_version = AppVersion::global(cx);
|
||||
let use_cloud = cx.has_flag::<ZedCloudFeatureFlag>();
|
||||
cx.spawn(async move |this, cx| {
|
||||
let http_client = client.http_client();
|
||||
let mut response = llm_token_retry(&llm_token, &client, |token| {
|
||||
|
@ -835,7 +830,7 @@ and then another
|
|||
} else {
|
||||
request_builder.uri(
|
||||
http_client
|
||||
.build_zed_llm_url("/predict_edits/accept", &[], use_cloud)?
|
||||
.build_zed_llm_url("/predict_edits/accept", &[])?
|
||||
.as_ref(),
|
||||
)
|
||||
};
|
||||
|
@ -1131,7 +1126,6 @@ struct PerformPredictEditsParams {
|
|||
pub llm_token: LlmApiToken,
|
||||
pub app_version: SemanticVersion,
|
||||
pub body: PredictEditsBody,
|
||||
pub use_cloud: bool,
|
||||
}
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue