Skip to content

Commit 589b64b

Browse files
committed
Merge upstream/main (58341d8) into feat/abort-r1-vscode-lm
Conflict resolution: keep the branch's completePrompt cancellation scope (request-local CancellationTokenSource bridged from the external signal, timeout armed before getClient); upstream's _options variant predates the abort wiring. Review follow-ups folded into this round (threads GUIH/GUIN/GUIP/ GUIU): - createMessage/completePrompt now build their abort errors through the shared createAbortError("VS Code LM") instead of ten hand-built copies; the canonical abort message is now "The VS Code LM request was aborted" for both methods (spec assertions updated). The host-cancellation variant ("Request cancelled by user") keeps its distinct message. - All 18 Stryker suppression comments removed from vscode-lm.ts (the copy-adjacent StringLiteral pairs disappear with the port; the two LogicalOperator pairs are equivalent - onExternalAbort/ onAbort are only assigned when the signal is present - argued in the PR body per the directive ban). - Bridge test now asserts the token handed to sendRequest is the request's own source token (identity, not just cancel()). - New test: a newer request superseding during input token counting (no external signal) rejects with the canonical abort and never reaches the host call - pins the post-count token check. - New test: quiet stream end after an abort with a complete leaked tool call still buffered rejects with the canonical abort instead of flushing salvage - pins the guard-before-flush ordering. - Early-consumer test renames the intentionally-unused gate resolver to _releaseStream for the re-enabled unused-variable rule. Negative controls: removing the post-count check, swapping the guard with flushSalvage, and passing a fresh token to sendRequest each fail exactly one test.
2 parents ed7f4cd + 58341d8 commit 589b64b

230 files changed

Lines changed: 1050 additions & 1165 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
"rollup": "4.60.4",
6969
"vite": "8.1.0",
7070
"undici": "6.28.1",
71+
"@ai-sdk/provider@3": "3.0.13",
72+
"@ai-sdk/provider-utils@4": "4.0.35",
7173
"form-data": ">=4.0.4",
7274
"bluebird": ">=3.7.2",
7375
"glob": "11.1.0",

‎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)