Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/api/providers/vscode-lm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`,
Expand Down
26 changes: 0 additions & 26 deletions src/shared/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading