Skip to content

Commit 0afccfa

Browse files
committed
fix(api-config): use default API URL when account type is individual
When account type is not specified or set to 'individual', use the default api.githubcopilot.com URL instead of constructing a subdomain-based URL. This restores previous behavior where business users could work without explicitly specifying their account type, as the default URL works for both individual and business accounts. Only constructs account-type-specific URLs (api.business.githubcopilot.com, api.enterprise.githubcopilot.com) when those account types are explicitly specified.
1 parent dd80c8d commit 0afccfa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib/api-config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ const USER_AGENT = `GitHubCopilotChat/${COPILOT_VERSION}`
1414
const API_VERSION = "2025-10-01"
1515

1616
export const copilotBaseUrl = (state: State) =>
17-
`https://api.${state.accountType}.githubcopilot.com`
18-
17+
state.accountType === "individual" ?
18+
"https://api.githubcopilot.com"
19+
: `https://api.${state.accountType}.githubcopilot.com`
1920
export const copilotHeaders = (state: State, vision: boolean = false) => {
2021
const headers: Record<string, string> = {
2122
Authorization: `Bearer ${state.copilotToken}`,

0 commit comments

Comments
 (0)