From 924a8460a1036e9255f9dbf0f1ceb046b281153f Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 14 May 2026 12:33:26 -0400 Subject: [PATCH 1/3] Bump SDK --- extensions/copilot/package-lock.json | 56 ++++++++--------- extensions/copilot/package.json | 2 +- .../copilotcli/node/copilotCli.ts | 61 +++++++++++++++---- .../browser/widget/input/chatModelPicker.ts | 18 ++++-- 4 files changed, 91 insertions(+), 46 deletions(-) diff --git a/extensions/copilot/package-lock.json b/extensions/copilot/package-lock.json index 87782713621d6..ed5843d8bb7a4 100644 --- a/extensions/copilot/package-lock.json +++ b/extensions/copilot/package-lock.json @@ -13,7 +13,7 @@ "@anthropic-ai/claude-agent-sdk": "0.2.112", "@anthropic-ai/sdk": "^0.82.0", "@github/blackbird-external-ingest-utils": "^0.3.0", - "@github/copilot": "1.0.39", + "@github/copilot": "1.0.48", "@google/genai": "^1.22.0", "@humanwhocodes/gitignore-to-minimatch": "1.0.2", "@microsoft/tiktokenizer": "^1.0.10", @@ -2931,26 +2931,26 @@ "license": "MIT" }, "node_modules/@github/copilot": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.39.tgz", - "integrity": "sha512-AY0VPYf6QQm88wUcOav2B36iedWKBUaMegKRxxY2uIHESiU6HueEuQR/n7D3U2UdD0zLox3jFRjYbZAsr2CgkQ==", + "version": "1.0.48", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.48.tgz", + "integrity": "sha512-U5SzyTEq376UU9A4Sd3TEKz+Y2nRUd90cLO4Hc1otaB8yFSy9Ur2UVGcI2/wCoodL3a39k6WbdgNzFxr0gWFRQ==", "license": "SEE LICENSE IN LICENSE.md", "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.39", - "@github/copilot-darwin-x64": "1.0.39", - "@github/copilot-linux-arm64": "1.0.39", - "@github/copilot-linux-x64": "1.0.39", - "@github/copilot-win32-arm64": "1.0.39", - "@github/copilot-win32-x64": "1.0.39" + "@github/copilot-darwin-arm64": "1.0.48", + "@github/copilot-darwin-x64": "1.0.48", + "@github/copilot-linux-arm64": "1.0.48", + "@github/copilot-linux-x64": "1.0.48", + "@github/copilot-win32-arm64": "1.0.48", + "@github/copilot-win32-x64": "1.0.48" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.39.tgz", - "integrity": "sha512-E8WfNL43NMzMTDDpCiYikaEmYCMAr6mz8LHrJtkaFuVXVkBr/q2NI3hAtwHFy8M11Fac/MeIe3/VEymWwwh3kw==", + "version": "1.0.48", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.48.tgz", + "integrity": "sha512-82MLoMQwPVVFM8EYssihFxSEPUYtZADE8rMzQ3jG9HgRg2qjQSfnHQS1mKe64dlXswZUK/onw6/8kjnW5I4pPg==", "cpu": [ "arm64" ], @@ -2964,9 +2964,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.39.tgz", - "integrity": "sha512-0zbC4lDVX7l8Wvq+JSCMjO0xTN69nWLejTBCl3Ev5bP6P+/7wPURcUvZKoHEaXxOULQ3AGj0DwZNAsvvQkA/6Q==", + "version": "1.0.48", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.48.tgz", + "integrity": "sha512-1VQ5r5F0h8GwboXmZTcutqcJT+iCpPXAF27QqodmpKEvW9aYfG8g9X2kFJOzDZoX+SA3Uaka9qXdYKF2xT6Uog==", "cpu": [ "x64" ], @@ -2980,9 +2980,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.39.tgz", - "integrity": "sha512-x88FuByweJlHlAmUZXjq4JlmtqgoM57Fe7nXzQkGr2Y5wnc2EDydBzFYEOlYDSWozQreimaJIm0KEMAA5T8/Fg==", + "version": "1.0.48", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.48.tgz", + "integrity": "sha512-PmsGnb0DZlI+Bf53l9HM1PAHHkUcMyB4y8v/7tnC/jDOV5dGF124n0HnDNfJLOLiJGiQGodthIif6QtPaAxpeA==", "cpu": [ "arm64" ], @@ -2996,9 +2996,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.39.tgz", - "integrity": "sha512-ssahg8r7a0VCsHVXPRmFFXx70xNAxaTM2SZfG7qPRfFB2OM8gHrW26F2oikTklDF6D+A2MfSAMpzJLBUZbPnhw==", + "version": "1.0.48", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.48.tgz", + "integrity": "sha512-b2cc4euSlke9fYHXXsS2EL9UYbctN0h4lZvtAcKUDY+RCnpYAQOVBZK+c1R9dQrtsT6Z/yUv7PuFPSs8qdtc2Q==", "cpu": [ "x64" ], @@ -3012,9 +3012,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.39.tgz", - "integrity": "sha512-hhBWGZQIywbp6MBxlqMX2GSmHqtUAOGwpo9b0igscecL4i0kz89QNasC+mKiN+zFEHP6I8gggOu87XPI17Io8Q==", + "version": "1.0.48", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.48.tgz", + "integrity": "sha512-VEEOwddtpJ3DTbXGhnK6K8im4ofl9m08q1m/K++sNvWV8wkkOSOQBTiPdyUsuU/TXAoFhb8tZMIJv+6NnMBtMw==", "cpu": [ "arm64" ], @@ -3028,9 +3028,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.39.tgz", - "integrity": "sha512-0ehlMtBiwKjmfEY3hVZggdn7qrmPMC8ueBQv/b+6UY3SMRS/M/1Y7xkOCwG84NvJsktdSsk3SlQnE2LbkTVpSA==", + "version": "1.0.48", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.48.tgz", + "integrity": "sha512-93BzvXLPHTyy1gWBXQY/IWIHor4IAwZuuo7/obG80/Qa6U0WeaN9slz/FBJvrsgVNrrRfEID5Xm3At+S6Kj67Q==", "cpu": [ "x64" ], diff --git a/extensions/copilot/package.json b/extensions/copilot/package.json index 064345d9e2db4..da4ac1cdbf5e9 100644 --- a/extensions/copilot/package.json +++ b/extensions/copilot/package.json @@ -6865,7 +6865,7 @@ "@anthropic-ai/claude-agent-sdk": "0.2.112", "@anthropic-ai/sdk": "^0.82.0", "@github/blackbird-external-ingest-utils": "^0.3.0", - "@github/copilot": "1.0.39", + "@github/copilot": "1.0.48", "@google/genai": "^1.22.0", "@humanwhocodes/gitignore-to-minimatch": "1.0.2", "@microsoft/tiktokenizer": "^1.0.10", diff --git a/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts b/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts index 4d7180a7988de..c2b4ad17a955a 100644 --- a/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts +++ b/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts @@ -43,6 +43,10 @@ export interface CopilotCLIModelInfo { readonly id: string; readonly name: string; readonly multiplier?: number; + readonly priceCategory?: string; + readonly inputCost?: number; + readonly outputCost?: number; + readonly cacheCost?: number; readonly maxInputTokens?: number; readonly maxOutputTokens?: number; readonly maxContextWindowTokens: number; @@ -152,18 +156,26 @@ export class CopilotCLIModels extends Disposable implements ICopilotCLIModels { const [{ getAvailableModels }, authInfo] = await Promise.all([this.copilotCLISDK.getPackage(), this.copilotCLISDK.getAuthInfo()]); try { const models = await getAvailableModels(authInfo); - return models.map(model => ({ - id: model.id, - name: model.name, - multiplier: model.billing?.multiplier, - maxInputTokens: model.capabilities.limits.max_prompt_tokens, - maxOutputTokens: model.capabilities.limits.max_output_tokens, - maxContextWindowTokens: model.capabilities.limits.max_context_window_tokens, - supportsVision: model.capabilities.supports.vision, - supportsReasoningEffort: model.capabilities.supports.reasoningEffort, - defaultReasoningEffort: model.defaultReasoningEffort, - supportedReasoningEfforts: model.supportedReasoningEfforts, - } satisfies CopilotCLIModelInfo)); + return models.map(model => { + const tokenPrices = model.billing?.token_prices; + const normalizedPricing = normalizeTokenPricing(tokenPrices); + return { + id: model.id, + name: model.name, + multiplier: model.billing?.multiplier, + priceCategory: model.model_picker_price_category, + inputCost: normalizedPricing?.inputPrice, + outputCost: normalizedPricing?.outputPrice, + cacheCost: normalizedPricing?.cachePrice, + maxInputTokens: model.capabilities.limits.max_prompt_tokens, + maxOutputTokens: model.capabilities.limits.max_output_tokens, + maxContextWindowTokens: model.capabilities.limits.max_context_window_tokens, + supportsVision: model.capabilities.supports.vision, + supportsReasoningEffort: model.capabilities.supports.reasoningEffort, + defaultReasoningEffort: model.defaultReasoningEffort, + supportedReasoningEfforts: model.supportedReasoningEfforts, + } satisfies CopilotCLIModelInfo; + }); } catch (ex) { this.logService.error(`[CopilotCLISession] Failed to fetch models`, ex); return []; @@ -205,6 +217,10 @@ export class CopilotCLIModels extends Disposable implements ICopilotCLIModels { maxInputTokens: model.maxInputTokens ?? model.maxContextWindowTokens, maxOutputTokens: model.maxOutputTokens ?? 0, pricing: multiplier, + priceCategory: model.priceCategory, + inputCost: model.inputCost, + outputCost: model.outputCost, + cacheCost: model.cacheCost, multiplierNumeric: model.multiplier, isUserSelectable: true, configurationSchema: isReasoningEffortEnabled ? buildConfigurationSchema(model) : undefined, @@ -601,3 +617,24 @@ export function isEnabledForCopilotCLI(customization: { sessionTypes?: readonly return sessionTypes === undefined || sessionTypes.includes('copilotcli') || false; } +const AIC_DIVISOR = 1_000_000_000; +const TOKENS_PER_MILLION = 1_000_000; + +/** + * Converts raw billing token prices (nano-AICs with a batch_size) into + * normalized AICs per million tokens, matching the normalization in + * chatEndpoint.ts for non-CLI models. + */ +function normalizeTokenPricing(tokenPrices: { input_price?: number; output_price?: number; cache_price?: number; batch_size?: number } | undefined): { inputPrice: number; outputPrice: number; cachePrice: number } | undefined { + if (!tokenPrices || tokenPrices.input_price === undefined || tokenPrices.output_price === undefined) { + return undefined; + } + const batchSize = tokenPrices.batch_size ?? TOKENS_PER_MILLION; + const scale = TOKENS_PER_MILLION / batchSize; + return { + inputPrice: (tokenPrices.input_price / AIC_DIVISOR) * scale, + outputPrice: (tokenPrices.output_price / AIC_DIVISOR) * scale, + cachePrice: ((tokenPrices.cache_price ?? 0) / AIC_DIVISOR) * scale, + }; +} + diff --git a/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts b/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts index c897eb39ac5c5..1f04b7e7299dd 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts +++ b/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts @@ -252,11 +252,19 @@ function resolveConfigProperty( */ function getPriceCategoryLabel(priceCategory: string | undefined): string | undefined { switch (priceCategory) { - case 'low': return localize('chat.priceCategory.low', "Low cost"); - case 'medium': return localize('chat.priceCategory.medium', "Medium cost"); - case 'high': return localize('chat.priceCategory.high', "High cost"); - case 'very_high': return localize('chat.priceCategory.veryHigh', "Very high cost"); - default: return undefined; + case undefined: + case '': + return undefined; + case 'low': + return localize('chat.priceCategory.low', "Low cost"); + case 'medium': + return localize('chat.priceCategory.medium', "Medium cost"); + case 'high': + return localize('chat.priceCategory.high', "High cost"); + case 'very_high': + return localize('chat.priceCategory.veryHigh', "Very high cost"); + default: + return localize('chat.priceCategory.unknown', "{0} cost", priceCategory.charAt(0).toUpperCase() + priceCategory.slice(1)); } } From 4480dfedfb4118c1bb426f1e6884264782b41baf Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 14 May 2026 13:00:01 -0400 Subject: [PATCH 2/3] fix cli tests and stuff --- .../copilotcli/node/copilotCli.ts | 4 +- .../test/copilotCLISDKUpgrade.spec.ts | 55 +++++++++++++++++-- 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts b/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts index c2b4ad17a955a..76faf3fda1542 100644 --- a/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts +++ b/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts @@ -625,7 +625,7 @@ const TOKENS_PER_MILLION = 1_000_000; * normalized AICs per million tokens, matching the normalization in * chatEndpoint.ts for non-CLI models. */ -function normalizeTokenPricing(tokenPrices: { input_price?: number; output_price?: number; cache_price?: number; batch_size?: number } | undefined): { inputPrice: number; outputPrice: number; cachePrice: number } | undefined { +function normalizeTokenPricing(tokenPrices: { input_price?: number; output_price?: number; cache_price?: number; batch_size?: number } | undefined): { inputPrice: number; outputPrice: number; cachePrice: number | undefined } | undefined { if (!tokenPrices || tokenPrices.input_price === undefined || tokenPrices.output_price === undefined) { return undefined; } @@ -634,7 +634,7 @@ function normalizeTokenPricing(tokenPrices: { input_price?: number; output_price return { inputPrice: (tokenPrices.input_price / AIC_DIVISOR) * scale, outputPrice: (tokenPrices.output_price / AIC_DIVISOR) * scale, - cachePrice: ((tokenPrices.cache_price ?? 0) / AIC_DIVISOR) * scale, + cachePrice: tokenPrices.cache_price !== undefined ? (tokenPrices.cache_price / AIC_DIVISOR) * scale : undefined, }; } diff --git a/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts b/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts index fdb1b71292315..b00f6e2f56744 100644 --- a/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts +++ b/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts @@ -55,10 +55,21 @@ describe('CopilotCLI SDK Upgrade', function () { path.join('prebuilds', 'linux-x64', 'computer.node'), path.join('prebuilds', 'win32-arm64', 'computer.node'), path.join('prebuilds', 'win32-x64', 'computer.node'), - // win32 native module (formerly win_error_mode) - path.join('prebuilds', 'win32-arm64', 'win32.node'), - path.join('prebuilds', 'win32-x64', 'win32.node'), - // Second copy of computer.node / win32.node re-shipped by the @github/copilot/sdk subpackage + // icu-native and runtime native modules + path.join('prebuilds', 'darwin-arm64', 'icu-native.node'), + path.join('prebuilds', 'darwin-arm64', 'runtime.node'), + path.join('prebuilds', 'darwin-x64', 'icu-native.node'), + path.join('prebuilds', 'darwin-x64', 'runtime.node'), + path.join('prebuilds', 'linux-arm64', 'runtime.node'), + path.join('prebuilds', 'linux-x64', 'icu-native.node'), + path.join('prebuilds', 'linux-x64', 'runtime.node'), + path.join('prebuilds', 'win32-arm64', 'icu-native.node'), + path.join('prebuilds', 'win32-arm64', 'runtime.node'), + path.join('prebuilds', 'win32-arm64', 'win32-native.node'), + path.join('prebuilds', 'win32-x64', 'icu-native.node'), + path.join('prebuilds', 'win32-x64', 'runtime.node'), + path.join('prebuilds', 'win32-x64', 'win32-native.node'), + // Second copy of computer.node re-shipped by the @github/copilot/sdk subpackage // (previously hidden by a broad sdk/prebuilds/** exclusion that masked the node-pty files we used to shim in at test setup). path.join('sdk', 'prebuilds', 'darwin-arm64', 'computer.node'), path.join('sdk', 'prebuilds', 'darwin-x64', 'computer.node'), @@ -66,8 +77,8 @@ describe('CopilotCLI SDK Upgrade', function () { path.join('sdk', 'prebuilds', 'linux-x64', 'computer.node'), path.join('sdk', 'prebuilds', 'win32-arm64', 'computer.node'), path.join('sdk', 'prebuilds', 'win32-x64', 'computer.node'), - path.join('sdk', 'prebuilds', 'win32-arm64', 'win32.node'), - path.join('sdk', 'prebuilds', 'win32-x64', 'win32.node'), + path.join('sdk', 'prebuilds', 'darwin-arm64', 'spawn-helper'), + path.join('sdk', 'prebuilds', 'darwin-arm64', 'pty.node'), path.join('ripgrep', 'bin', 'darwin-arm64', 'rg'), path.join('ripgrep', 'bin', 'darwin-x64', 'rg'), path.join('ripgrep', 'bin', 'linux-x64', 'rg'), @@ -96,6 +107,38 @@ describe('CopilotCLI SDK Upgrade', function () { 'tree-sitter-rust.wasm', 'tree-sitter-typescript.wasm', 'tree-sitter-scala.wasm', + // foundry-local-sdk native bindings + path.join('foundry-local-sdk', 'node_modules', 'foundry-local-sdk', 'prebuilds', 'darwin-arm64', 'foundry_local_napi.node'), + path.join('foundry-local-sdk', 'node_modules', 'foundry-local-sdk', 'prebuilds', 'win32-x64', 'foundry_local_napi.node'), + path.join('foundry-local-sdk', 'node_modules', 'foundry-local-sdk', 'prebuilds', 'linux-x64', 'foundry_local_napi.node'), + path.join('foundry-local-sdk', 'node_modules', 'foundry-local-sdk', 'prebuilds', 'win32-arm64', 'foundry_local_napi.node'), + // pvrecorder native bindings + path.join('pvrecorder', 'node_modules', '@picovoice', 'pvrecorder-node', 'lib', 'linux', 'x86_64', 'pv_recorder.node'), + path.join('pvrecorder', 'node_modules', '@picovoice', 'pvrecorder-node', 'lib', 'mac', 'x86_64', 'pv_recorder.node'), + path.join('pvrecorder', 'node_modules', '@picovoice', 'pvrecorder-node', 'lib', 'windows', 'amd64', 'pv_recorder.node'), + path.join('pvrecorder', 'node_modules', '@picovoice', 'pvrecorder-node', 'lib', 'mac', 'arm64', 'pv_recorder.node'), + path.join('pvrecorder', 'node_modules', '@picovoice', 'pvrecorder-node', 'lib', 'windows', 'arm64', 'pv_recorder.node'), + // mxc-bin binaries (sandbox) + path.join('mxc-bin', 'arm64', 'winhttp-proxy-shim.exe'), + path.join('mxc-bin', 'arm64', 'wslcsdk.dll'), + path.join('mxc-bin', 'arm64', 'wxc-exec.exe'), + path.join('mxc-bin', 'arm64', 'wxc-test-proxy.exe'), + path.join('mxc-bin', 'arm64', 'lxc-exec'), + path.join('mxc-bin', 'arm64', 'wxc-windows-sandbox-guest.exe'), + path.join('mxc-bin', 'arm64', 'wxc-windows-sandbox-daemon.exe'), + path.join('mxc-bin', 'arm64', '_manifest', 'spdx_2.2', 'bsi.cose'), + path.join('mxc-bin', 'arm64', '_manifest', 'spdx_2.2', 'manifest.cat'), + path.join('mxc-bin', 'arm64', '_manifest', 'spdx_2.2', 'manifest.spdx.cose'), + path.join('mxc-bin', 'x64', 'winhttp-proxy-shim.exe'), + path.join('mxc-bin', 'x64', 'wslcsdk.dll'), + path.join('mxc-bin', 'x64', 'wxc-exec.exe'), + path.join('mxc-bin', 'x64', 'wxc-test-proxy.exe'), + path.join('mxc-bin', 'x64', 'lxc-exec'), + path.join('mxc-bin', 'x64', 'wxc-windows-sandbox-guest.exe'), + path.join('mxc-bin', 'x64', 'wxc-windows-sandbox-daemon.exe'), + path.join('mxc-bin', 'x64', '_manifest', 'spdx_2.2', 'bsi.cose'), + path.join('mxc-bin', 'x64', '_manifest', 'spdx_2.2', 'manifest.cat'), + path.join('mxc-bin', 'x64', '_manifest', 'spdx_2.2', 'manifest.spdx.cose'), ].map(p => path.join(copilotSDKPath, p))); // Exclude ripgrep files that we copy over in src/extension/chatSessions/copilotcli/node/ripgrepShim.ts (until we get better API/solution from SDK) From ab0b9c7c62dab16fa66ccb72a463467ac7e4144c Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 14 May 2026 13:20:26 -0400 Subject: [PATCH 3/3] Tests plz --- .../vscode-node/test/copilotCLISDKUpgrade.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts b/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts index b00f6e2f56744..de9e53b23ab59 100644 --- a/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts +++ b/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts @@ -77,8 +77,6 @@ describe('CopilotCLI SDK Upgrade', function () { path.join('sdk', 'prebuilds', 'linux-x64', 'computer.node'), path.join('sdk', 'prebuilds', 'win32-arm64', 'computer.node'), path.join('sdk', 'prebuilds', 'win32-x64', 'computer.node'), - path.join('sdk', 'prebuilds', 'darwin-arm64', 'spawn-helper'), - path.join('sdk', 'prebuilds', 'darwin-arm64', 'pty.node'), path.join('ripgrep', 'bin', 'darwin-arm64', 'rg'), path.join('ripgrep', 'bin', 'darwin-x64', 'rg'), path.join('ripgrep', 'bin', 'linux-x64', 'rg'), @@ -143,6 +141,10 @@ describe('CopilotCLI SDK Upgrade', function () { // Exclude ripgrep files that we copy over in src/extension/chatSessions/copilotcli/node/ripgrepShim.ts (until we get better API/solution from SDK) const ripgrepFilesWeCopy = path.join(copilotSDKPath, 'sdk', 'ripgrep', 'bin'); + // Exclude node-pty files under sdk/prebuilds/ — these are platform-specific postinstall artifacts + // that vary per OS (pty.node/spawn-helper on macOS/Linux, conpty files on Windows). + const sdkPrebuildsPath = path.join(copilotSDKPath, 'sdk', 'prebuilds'); + const nodePtyBinaryNames = new Set(['pty.node', 'spawn-helper', 'conpty.node', 'conpty.pdb', 'conpty_console_list.node', 'conpty_console_list.pdb', 'OpenConsole.exe', 'conpty.dll']); const errors: string[] = []; // Look for new binaries @@ -154,6 +156,9 @@ describe('CopilotCLI SDK Upgrade', function () { if (binaryName.startsWith('keytar') || binaryName.startsWith('clipboard')) { continue; } + if (binary.startsWith(sdkPrebuildsPath) && nodePtyBinaryNames.has(binaryName)) { + continue; + } if (!knownBinaries.has(binary)) { errors.push(`Unexpected native binary found in Copilot CLI SDK: ${path.relative(copilotSDKPath, binary)}`); }