microsoft/vscode · error · Error
Copilot API endpoint is not available
Error message
Copilot API endpoint is not available
What it means
Error "Copilot API endpoint is not available" thrown in microsoft/vscode.
Source
Thrown at extensions/copilot/src/extension/chatSessions/copilotcli/node/missionControlApiClient.ts:211
*
* The base URL is resolved via the Copilot token's `endpoints.api` which is
* GHES-aware.
*/
private async _buildRequest(
path: string,
authOptions: McAuthOptions,
): Promise<{ url: string; headers: Record<string, string> }> {
const session = authOptions.createIfNone
? await this._authService.getGitHubSession('permissive', { createIfNone: authOptions.createIfNone })
: await this._authService.getGitHubSession('permissive', { silent: true });
if (!session?.accessToken) {
throw new PermissiveAuthRequiredError();
}
const copilotToken = await this._authService.getCopilotToken();
const baseUrl = copilotToken.endpoints?.api;
if (!baseUrl) {
throw new Error('Copilot API endpoint is not available');
}
const url = `${baseUrl.replace(/\/+$/, '')}${path}`;
const headers: Record<string, string> = {
'Authorization': `Bearer ${session.accessToken}`,
'Copilot-Integration-Id': INTEGRATION_ID,
};
return { url, headers };
}
}
View on GitHub (pinned to a94b963a32)
When it happens
Trigger: Thrown at extensions/copilot/src/extension/chatSessions/copilotcli/node/missionControlApiClient.ts:211 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/vscode@a94b963a32 (2026-08-12).
Data as JSON: /api/errors/3f5b69f8c6ea4c79.
Report an issue: GitHub.