From 501c3e8a246634ea41f7304f30e4102cc8506985 Mon Sep 17 00:00:00 2001 From: Steffen Kram Date: Mon, 13 Apr 2026 01:32:20 +0200 Subject: [PATCH] fix: use api. subdomain for enterprise GitHub Copilot token URL (#8494) --- crates/goose/src/providers/githubcopilot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/goose/src/providers/githubcopilot.rs b/crates/goose/src/providers/githubcopilot.rs index 96abc895..2ce16cf2 100644 --- a/crates/goose/src/providers/githubcopilot.rs +++ b/crates/goose/src/providers/githubcopilot.rs @@ -82,7 +82,7 @@ impl GithubCopilotUrls { let base = format!("https://{}", host); let copilot_token_url = copilot_token_url .map(|u| u.trim_end_matches('/').to_string()) - .unwrap_or_else(|| format!("{}/api/copilot_internal/v2/token", base)); + .unwrap_or_else(|| format!("https://api.{}/copilot_internal/v2/token", host)); Self { device_code_url: format!("{}/login/device/code", base), access_token_url: format!("{}/login/oauth/access_token", base), @@ -777,7 +777,7 @@ mod tests { ); assert_eq!( urls.copilot_token_url, - "https://my-enterprise.ghe.com/api/copilot_internal/v2/token" + "https://api.my-enterprise.ghe.com/copilot_internal/v2/token" ); }