Skip to content

Commit 9ac861b

Browse files
author
Bertan Ari
committed
feat(vscode-lm): port six Copilot model entries
Port simurg79/Roo-Code#13 at 922db52fdf24fd102fbf4056f33b0136b60ea0ee without its version bump or PR #14 changes. Preserve advertised unverified Opus 5 and Gemini 3.6 Flash limits and cover exact rows, ordering, and exclusions.
1 parent 839fd6c commit 9ac861b

2 files changed

Lines changed: 112 additions & 0 deletions

File tree

‎packages/types/src/__tests__/vscode-llm.spec.ts‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,40 @@ describe("vscodeLlmModels", () => {
1515
expect(vscodeLlmModels["gemini-2.5-pro"].contextWindow).toBe(108594)
1616
expect(vscodeLlmModels["gemini-2.5-pro"].maxInputTokens).toBe(108594)
1717
})
18+
it.each([
19+
["claude-opus-5", "Claude Opus 5", 935793, "advertised, unverified"],
20+
["claude-sonnet-5", "Claude Sonnet 5", 925449, "measured"],
21+
["gpt-5.6-luna", "GPT-5.6 Luna", 199753, "measured"],
22+
["gpt-5.6-sol", "GPT-5.6 Sol", 271785, "measured"],
23+
["gpt-5.6-terra", "GPT-5.6 Terra", 271785, "measured"],
24+
["gemini-3.6-flash", "Gemini 3.6 Flash", 935793, "advertised, unverified"],
25+
] as const)("preserves PR #13 row %s (%s), limit %i (%s)", (...[family, name, limit]) => {
26+
expect(vscodeLlmModels[family]).toEqual({
27+
contextWindow: limit,
28+
supportsImages: true,
29+
supportsPromptCache: false,
30+
inputPrice: 0,
31+
outputPrice: 0,
32+
family,
33+
version: family,
34+
name,
35+
supportsToolCalling: true,
36+
maxInputTokens: limit,
37+
})
38+
})
39+
40+
it.each([
41+
["claude-opus-5", "claude-opus-4.8"],
42+
["claude-sonnet-5", "claude-sonnet-4.6"],
43+
["gpt-5.6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.5"],
44+
["gemini-3.6-flash", "gemini-3.1-pro-preview"],
45+
])("preserves upstream ordering starting with %s", (...families) => {
46+
const modelIds = Object.keys(vscodeLlmModels)
47+
const startIndex = modelIds.indexOf(families[0])
48+
expect(startIndex).toBeGreaterThanOrEqual(0)
49+
expect(modelIds.slice(startIndex, startIndex + families.length)).toEqual(families)
50+
})
51+
1852
it("keeps both window fields populated and positive for every row", () => {
1953
for (const [family, model] of Object.entries(vscodeLlmModels)) {
2054
expect(model.contextWindow, `${family}: contextWindow must be a positive integer`).toBeGreaterThan(0)
@@ -25,6 +59,9 @@ describe("vscodeLlmModels", () => {
2559
expect(vscodeLlmModels).not.toHaveProperty("claude-opus-4.7-high")
2660
expect(vscodeLlmModels).not.toHaveProperty("claude-3.5-sonnet")
2761
expect(vscodeLlmModels).not.toHaveProperty("claude-4-sonnet")
62+
expect(vscodeLlmModels).not.toHaveProperty("auto")
63+
expect(vscodeLlmModels).not.toHaveProperty("copilot-utility")
64+
expect(vscodeLlmModels).not.toHaveProperty("copilot-utility-small")
2865
})
2966
it("defaults to a model id that exists in the table", () => {
3067
expect(vscodeLlmDefaultModelId).toBe("claude-sonnet-4.5")

‎packages/types/src/providers/vscode-llm.ts‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,22 @@ export const vscodeLlmDefaultModelId: VscodeLlmModelId = "claude-sonnet-4.5"
1717
// Curated VS Code LM (GitHub Copilot) model catalog.
1818
// The API exposes only `maxInputTokens`; the UI and condense gate read that. `contextWindow` is
1919
// the advertised window, kept for rows where it diverges from the ceiling (e.g. claude-opus-4.8).
20+
// https://github.com/simurg79/Roo-Code/pull/13: sonnet-5 and gpt-5.6 limits were measured
21+
// by single-message binary search on VS Code 1.126.0 (2026-07-14). Opus-5 and gemini-3.6-flash
22+
// retain advertised, unverified limits from the Copilot model-picker cache (2026-07-26).
2023
export const vscodeLlmModels = {
24+
"claude-opus-5": {
25+
contextWindow: 935793,
26+
supportsImages: true,
27+
supportsPromptCache: false,
28+
inputPrice: 0,
29+
outputPrice: 0,
30+
family: "claude-opus-5",
31+
version: "claude-opus-5",
32+
name: "Claude Opus 5",
33+
supportsToolCalling: true,
34+
maxInputTokens: 935793,
35+
},
2136
"claude-opus-4.8": {
2237
contextWindow: 679560,
2338
supportsImages: true,
@@ -66,6 +81,18 @@ export const vscodeLlmModels = {
6681
supportsToolCalling: true,
6782
maxInputTokens: 167790,
6883
},
84+
"claude-sonnet-5": {
85+
contextWindow: 925449,
86+
supportsImages: true,
87+
supportsPromptCache: false,
88+
inputPrice: 0,
89+
outputPrice: 0,
90+
family: "claude-sonnet-5",
91+
version: "claude-sonnet-5",
92+
name: "Claude Sonnet 5",
93+
supportsToolCalling: true,
94+
maxInputTokens: 925449,
95+
},
6996
"claude-sonnet-4.6": {
7097
contextWindow: 197896,
7198
supportsImages: true,
@@ -102,6 +129,42 @@ export const vscodeLlmModels = {
102129
supportsToolCalling: true,
103130
maxInputTokens: 135790,
104131
},
132+
"gpt-5.6-luna": {
133+
contextWindow: 199753,
134+
supportsImages: true,
135+
supportsPromptCache: false,
136+
inputPrice: 0,
137+
outputPrice: 0,
138+
family: "gpt-5.6-luna",
139+
version: "gpt-5.6-luna",
140+
name: "GPT-5.6 Luna",
141+
supportsToolCalling: true,
142+
maxInputTokens: 199753,
143+
},
144+
"gpt-5.6-sol": {
145+
contextWindow: 271785,
146+
supportsImages: true,
147+
supportsPromptCache: false,
148+
inputPrice: 0,
149+
outputPrice: 0,
150+
family: "gpt-5.6-sol",
151+
version: "gpt-5.6-sol",
152+
name: "GPT-5.6 Sol",
153+
supportsToolCalling: true,
154+
maxInputTokens: 271785,
155+
},
156+
"gpt-5.6-terra": {
157+
contextWindow: 271785,
158+
supportsImages: true,
159+
supportsPromptCache: false,
160+
inputPrice: 0,
161+
outputPrice: 0,
162+
family: "gpt-5.6-terra",
163+
version: "gpt-5.6-terra",
164+
name: "GPT-5.6 Terra",
165+
supportsToolCalling: true,
166+
maxInputTokens: 271785,
167+
},
105168
"gpt-5.5": {
106169
contextWindow: 268426,
107170
supportsImages: true,
@@ -174,6 +237,18 @@ export const vscodeLlmModels = {
174237
supportsToolCalling: true,
175238
maxInputTokens: 12078,
176239
},
240+
"gemini-3.6-flash": {
241+
contextWindow: 935793,
242+
supportsImages: true,
243+
supportsPromptCache: false,
244+
inputPrice: 0,
245+
outputPrice: 0,
246+
family: "gemini-3.6-flash",
247+
version: "gemini-3.6-flash",
248+
name: "Gemini 3.6 Flash",
249+
supportsToolCalling: true,
250+
maxInputTokens: 935793,
251+
},
177252
"gemini-3.1-pro-preview": {
178253
contextWindow: 197897,
179254
supportsImages: true,

0 commit comments

Comments
 (0)