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
24 changes: 24 additions & 0 deletions packages/types/src/__tests__/vscode-llm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ describe("vscodeLlmModels", () => {
expect(vscodeLlmModels["gemini-2.5-pro"].maxInputTokens).toBe(108594)
})

it("includes the 2026-07-14 additions with their measured single-message ceilings", () => {
// Measured via single-message binary search on VS Code 1.126.0 (largest input the backend
// accepts). claude-sonnet-5 accepts nearly its full advertised window (925449), unlike the
// older claude rows that cap at ~197.9K — this divergence is exactly why the values are
// measured rather than inferred from a sibling row.
expect(vscodeLlmModels["claude-sonnet-5"].maxInputTokens).toBe(925449)
expect(vscodeLlmModels["claude-sonnet-5"].contextWindow).toBe(925449)
expect(vscodeLlmModels["gpt-5.6-luna"].maxInputTokens).toBe(199753)
expect(vscodeLlmModels["gpt-5.6-sol"].maxInputTokens).toBe(271785)
expect(vscodeLlmModels["gpt-5.6-terra"].maxInputTokens).toBe(271785)
})

it("includes the 2026-07-26 model-picker-cache additions at their advertised windows", () => {
// Sourced from `chat.cachedLanguageModels` in User/globalStorage/state.vscdb; not yet
// binary-searched, so both fields carry the advertised value exactly as captured.
expect(vscodeLlmModels["claude-opus-5"].maxInputTokens).toBe(935793)
expect(vscodeLlmModels["claude-opus-5"].contextWindow).toBe(935793)
expect(vscodeLlmModels["gemini-3.6-flash"].maxInputTokens).toBe(935793)
expect(vscodeLlmModels["gemini-3.6-flash"].contextWindow).toBe(935793)
})

it("keeps both window fields populated and positive for every row", () => {
// NOTE: contextWindow and maxInputTokens are intentionally ALLOWED to differ (claude-opus-4.8
// diverges: 679560 vs 197897). The UI reads maxInputTokens, and that divergence is a deliberate
Expand All @@ -40,6 +61,9 @@ describe("vscodeLlmModels", () => {
expect(vscodeLlmModels).not.toHaveProperty("claude-opus-4.7-high")
expect(vscodeLlmModels).not.toHaveProperty("claude-3.5-sonnet")
expect(vscodeLlmModels).not.toHaveProperty("claude-4-sonnet")
expect(vscodeLlmModels).not.toHaveProperty("auto")
expect(vscodeLlmModels).not.toHaveProperty("copilot-utility")
expect(vscodeLlmModels).not.toHaveProperty("copilot-utility-small")
})

it("defaults to a model id that exists in the table", () => {
Expand Down
81 changes: 81 additions & 0 deletions packages/types/src/providers/vscode-llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,30 @@ export const vscodeLlmDefaultModelId: VscodeLlmModelId = "claude-sonnet-4.5"
// - claude-opus-4.7 / 4.6, claude-sonnet-4.6,
// gemini-3.1-pro-preview, gemini-3.5-flash: enforced ~197.9K
// - gpt-5.5 / gpt-5.4: enforced ~268.4K
// Additions measured 2026-07-14 (VS Code 1.126.0) with the same single-message binary search:
// - claude-sonnet-5: enforced 925449 (near-full window, unlike the older ~197.9K claude rows)
// - gpt-5.6-luna: enforced 199753
// - gpt-5.6-sol / gpt-5.6-terra: enforced 271785
// Additions sourced 2026-07-26 from the Copilot model-picker cache (`chat.cachedLanguageModels` in
// VS Code's User/globalStorage/state.vscdb), which persists the metadata `selectChatModels` returns:
// - claude-opus-5 / gemini-3.6-flash: advertised 935793, NOT yet binary-searched
// Those two rows carry the advertised value exactly as captured; re-measure by binary search and
// correct them if the backend turns out to enforce a lower ceiling.
// Guardrail: these are empirically measured — re-measure (do not hand-tune) if the models change.
// See GitHub issue simurg79/Roo-Code#10 and myplans/VSCode LM Model Table Integrity/vscode_lm_opus_data_integrity_design.md.
export const vscodeLlmModels = {
"claude-opus-5": {
contextWindow: 935793,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
family: "claude-opus-5",
version: "claude-opus-5",
name: "Claude Opus 5",
supportsToolCalling: true,
maxInputTokens: 935793,
},
"claude-opus-4.8": {
contextWindow: 679560,
supportsImages: true,
Expand Down Expand Up @@ -69,6 +90,18 @@ export const vscodeLlmModels = {
supportsToolCalling: true,
maxInputTokens: 167790,
},
"claude-sonnet-5": {
contextWindow: 925449,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
family: "claude-sonnet-5",
version: "claude-sonnet-5",
name: "Claude Sonnet 5",
supportsToolCalling: true,
maxInputTokens: 925449,
},
"claude-sonnet-4.6": {
contextWindow: 197896,
supportsImages: true,
Expand Down Expand Up @@ -105,6 +138,42 @@ export const vscodeLlmModels = {
supportsToolCalling: true,
maxInputTokens: 135790,
},
"gpt-5.6-luna": {
contextWindow: 199753,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
family: "gpt-5.6-luna",
version: "gpt-5.6-luna",
name: "GPT-5.6 Luna",
supportsToolCalling: true,
maxInputTokens: 199753,
},
"gpt-5.6-sol": {
contextWindow: 271785,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
family: "gpt-5.6-sol",
version: "gpt-5.6-sol",
name: "GPT-5.6 Sol",
supportsToolCalling: true,
maxInputTokens: 271785,
},
"gpt-5.6-terra": {
contextWindow: 271785,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
family: "gpt-5.6-terra",
version: "gpt-5.6-terra",
name: "GPT-5.6 Terra",
supportsToolCalling: true,
maxInputTokens: 271785,
},
"gpt-5.5": {
contextWindow: 268426,
supportsImages: true,
Expand Down Expand Up @@ -177,6 +246,18 @@ export const vscodeLlmModels = {
supportsToolCalling: true,
maxInputTokens: 12078,
},
"gemini-3.6-flash": {
contextWindow: 935793,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
family: "gemini-3.6-flash",
version: "gemini-3.6-flash",
name: "Gemini 3.6 Flash",
supportsToolCalling: true,
maxInputTokens: 935793,
},
"gemini-3.1-pro-preview": {
contextWindow: 197897,
supportsImages: true,
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "%extension.displayName%",
"description": "%extension.description%",
"publisher": "RooVeterinaryInc",
"version": "3.53.2",
"version": "3.53.3",
"icon": "assets/icons/icon.png",
"galleryBanner": {
"color": "#617A91",
Expand Down
Loading