Skip to content

Commit 20c7453

Browse files
shariqriazzRuakij
andauthored
Remove claude-3.7-sonnet and claude-3.7-sonnet:thinking from vscodelm (#3895)
* Remove claude-3.7-sonnet and claude-3.7-sonnet:thinking from vscodelm provider in api.ts (not supported via API) * Add static blacklist for unsupported VS Code Language Model IDs --------- Co-authored-by: Ruakij <[email protected]>
1 parent be19a49 commit 20c7453

File tree

2 files changed

+5
-28
lines changed

2 files changed

+5
-28
lines changed

src/api/providers/vscode-lm.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,10 +555,13 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
555555
}
556556
}
557557

558+
// Static blacklist of VS Code Language Model IDs that should be excluded from the model list e.g. because they will never work
559+
const VSCODE_LM_STATIC_BLACKLIST: string[] = ["claude-3.7-sonnet", "claude-3.7-sonnet-thought"]
560+
558561
export async function getVsCodeLmModels() {
559562
try {
560-
const models = await vscode.lm.selectChatModels({})
561-
return models || []
563+
const models = (await vscode.lm.selectChatModels({})) || []
564+
return models.filter((model) => !VSCODE_LM_STATIC_BLACKLIST.includes(model.id))
562565
} catch (error) {
563566
console.error(
564567
`Error fetching VS Code LM models: ${JSON.stringify(error, Object.getOwnPropertyNames(error), 2)}`,

src/shared/api.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,32 +1473,6 @@ export const vscodeLlmModels = {
14731473
supportsToolCalling: true,
14741474
maxInputTokens: 81638,
14751475
},
1476-
"claude-3.7-sonnet": {
1477-
contextWindow: 89827,
1478-
supportsImages: true,
1479-
supportsPromptCache: false,
1480-
inputPrice: 0,
1481-
outputPrice: 0,
1482-
family: "claude-3.7-sonnet",
1483-
version: "claude-3.7-sonnet",
1484-
name: "Claude 3.7 Sonnet",
1485-
supportsToolCalling: true,
1486-
maxInputTokens: 89827,
1487-
},
1488-
"claude-3.7-sonnet-thought": {
1489-
contextWindow: 89827,
1490-
supportsImages: true,
1491-
supportsPromptCache: false,
1492-
inputPrice: 0,
1493-
outputPrice: 0,
1494-
family: "claude-3.7-sonnet-thought",
1495-
version: "claude-3.7-sonnet-thought",
1496-
name: "Claude 3.7 Sonnet Thinking",
1497-
supportsToolCalling: false,
1498-
maxInputTokens: 89827,
1499-
supportsReasoningBudget: true,
1500-
requiredReasoningBudget: true,
1501-
},
15021476
"gemini-2.0-flash-001": {
15031477
contextWindow: 127827,
15041478
supportsImages: true,

0 commit comments

Comments
 (0)