microsoft/vscode · error · Error
Unrecognized Azure deployment URL: ${url}
Error message
Unrecognized Azure deployment URL: ${url} What it means
Error "Unrecognized Azure deployment URL: ${url}" thrown in microsoft/vscode.
Source
Thrown at extensions/copilot/src/extension/byok/vscode-node/azureProvider.ts:44
// Remove the trailing slash
if (url.endsWith('/')) {
url = url.slice(0, -1);
}
// if url ends with `/v1` remove it
if (url.endsWith('/v1')) {
url = url.slice(0, -3);
}
// Default to chat completions for base URLs
const defaultApiPath = '/chat/completions';
if (url.includes('models.ai.azure.com') || url.includes('inference.ml.azure.com')) {
return `${url}/v1${defaultApiPath}`;
} else if (url.includes('openai.azure.com')) {
return `${url}/openai/deployments/${modelId}${defaultApiPath}?api-version=2025-01-01-preview`;
} else {
throw new Error(`Unrecognized Azure deployment URL: ${url}`);
}
}
/**
* Determines the `supported_endpoints` for a resolved Azure BYOK URL. When the URL targets the
* Responses API, both Chat Completions and Responses are advertised so a Responses-shaped body
* (`input`) is sent; otherwise `undefined` preserves the default Chat Completions behavior. This
* keeps the Entra auth path consistent with the API-key path (issue #318114).
*/
export function azureSupportedEndpointsForUrl(url: string): ModelSupportedEndpoint[] | undefined {
let pathname: string;
try {
pathname = new URL(url).pathname;
} catch {
// Tolerate malformed URLs by preserving the default Chat Completions behavior.
return undefined;
}
// Match the final path segment so a deployment named "responses" (e.g.View on GitHub (pinned to a94b963a32)
When it happens
Trigger: Thrown at extensions/copilot/src/extension/byok/vscode-node/azureProvider.ts:44 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/2c19d0c729452f56.
Report an issue: GitHub.