Add feature flag to use cloud.zed.dev instead of llm.zed.dev (#34076)

This PR adds a new `zed-cloud` feature flag that can be used to send
traffic to `cloud.zed.dev` instead of `llm.zed.dev`.

This is just so Zed staff can test the new infrastructure. When we're
ready for prime-time we'll reroute traffic on the server.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-07-08 14:44:51 -04:00 committed by GitHub
parent 01bdef130b
commit 1220049089
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 70 additions and 12 deletions

View file

@ -226,10 +226,21 @@ impl HttpClientWithUrl {
}
/// Builds a Zed LLM URL using the given path.
pub fn build_zed_llm_url(&self, path: &str, query: &[(&str, &str)]) -> Result<Url> {
pub fn build_zed_llm_url(
&self,
path: &str,
query: &[(&str, &str)],
use_cloud: bool,
) -> Result<Url> {
let base_url = self.base_url();
let base_api_url = match base_url.as_ref() {
"https://zed.dev" => "https://llm.zed.dev",
"https://zed.dev" => {
if use_cloud {
"https://cloud.zed.dev"
} else {
"https://llm.zed.dev"
}
}
"https://staging.zed.dev" => "https://llm-staging.zed.dev",
"http://localhost:3000" => "http://localhost:8787",
other => other,