diff --git a/src/api/providers/vscode-lm.ts b/src/api/providers/vscode-lm.ts index 85a17cc265..c06510c26c 100644 --- a/src/api/providers/vscode-lm.ts +++ b/src/api/providers/vscode-lm.ts @@ -555,10 +555,13 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan } } +// Static blacklist of VS Code Language Model IDs that should be excluded from the model list e.g. because they will never work +const VSCODE_LM_STATIC_BLACKLIST: string[] = ["claude-3.7-sonnet", "claude-3.7-sonnet-thought"] + export async function getVsCodeLmModels() { try { - const models = await vscode.lm.selectChatModels({}) - return models || [] + const models = (await vscode.lm.selectChatModels({})) || [] + return models.filter((model) => !VSCODE_LM_STATIC_BLACKLIST.includes(model.id)) } catch (error) { console.error( `Error fetching VS Code LM models: ${JSON.stringify(error, Object.getOwnPropertyNames(error), 2)}`, diff --git a/src/shared/api.ts b/src/shared/api.ts index 92cc406854..0788d5cfab 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -1473,32 +1473,6 @@ export const vscodeLlmModels = { supportsToolCalling: true, maxInputTokens: 81638, }, - "claude-3.7-sonnet": { - contextWindow: 89827, - supportsImages: true, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - family: "claude-3.7-sonnet", - version: "claude-3.7-sonnet", - name: "Claude 3.7 Sonnet", - supportsToolCalling: true, - maxInputTokens: 89827, - }, - "claude-3.7-sonnet-thought": { - contextWindow: 89827, - supportsImages: true, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - family: "claude-3.7-sonnet-thought", - version: "claude-3.7-sonnet-thought", - name: "Claude 3.7 Sonnet Thinking", - supportsToolCalling: false, - maxInputTokens: 89827, - supportsReasoningBudget: true, - requiredReasoningBudget: true, - }, "gemini-2.0-flash-001": { contextWindow: 127827, supportsImages: true,