From 2baa05f4d3756251f36ce9aaf939ecb31db58fd9 Mon Sep 17 00:00:00 2001 From: Hashim1999164 <64767361+Hashim1999164@users.noreply.github.com> Date: Wed, 19 Aug 2026 00:28:41 +0500 Subject: [PATCH 1/3] Use the selected chat model for the Ruby design agent --- vscode/src/chatAgent.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/vscode/src/chatAgent.ts b/vscode/src/chatAgent.ts index 48be9b0c35..0660f98f35 100644 --- a/vscode/src/chatAgent.ts +++ b/vscode/src/chatAgent.ts @@ -86,11 +86,20 @@ export class ChatAgent implements vscode.Disposable { } try { - // Select the LLM model - const [model] = await vscode.lm.selectChatModels({ - vendor: "copilot", - family: "gpt-4o", - }); + // Prefer the model chosen for this chat so custom models work, not only Copilot gpt-4o. + let model = request.model; + if (!model) { + [model] = await vscode.lm.selectChatModels({ + vendor: "copilot", + family: "gpt-4o", + }); + } + if (!model) { + stream.markdown( + "No language model is available for this chat. Select a model in the chat picker and try again.", + ); + return { metadata: { command: "design" } }; + } stream.progress("Designing the models for the requested concept..."); const chatResponse = await model.sendRequest(messages, {}, token); From 16a46f601927c01c9ca9a07e28d4015ed01ab2d3 Mon Sep 17 00:00:00 2001 From: Hashim1999164 <64767361+Hashim1999164@users.noreply.github.com> Date: Sat, 22 Aug 2026 23:10:57 +0500 Subject: [PATCH 2/3] Use the selected chat model without a gpt-4o fallback. --- vscode/src/chatAgent.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/vscode/src/chatAgent.ts b/vscode/src/chatAgent.ts index 0660f98f35..c6d77e3bec 100644 --- a/vscode/src/chatAgent.ts +++ b/vscode/src/chatAgent.ts @@ -86,17 +86,10 @@ export class ChatAgent implements vscode.Disposable { } try { - // Prefer the model chosen for this chat so custom models work, not only Copilot gpt-4o. - let model = request.model; - if (!model) { - [model] = await vscode.lm.selectChatModels({ - vendor: "copilot", - family: "gpt-4o", - }); - } + const model = request.model; if (!model) { stream.markdown( - "No language model is available for this chat. Select a model in the chat picker and try again.", + "No language model selected. Select a model in the chat picker and try again.", ); return { metadata: { command: "design" } }; } From 10a3031d829adcea5305bf57a8bc2465f9e66f81 Mon Sep 17 00:00:00 2001 From: Hashim1999164 <64767361+Hashim1999164@users.noreply.github.com> Date: Thu, 27 Aug 2026 00:03:52 +0500 Subject: [PATCH 3/3] Bump VS Code engine and types so the chat request model is typed --- vscode/package.json | 4 ++-- vscode/pnpm-lock.yaml | 10 +++++----- vscode/src/chatAgent.ts | 4 +--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index ed171fe7f6..cd3fc08f22 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -11,7 +11,7 @@ "license": "MIT", "icon": "icon.png", "engines": { - "vscode": "^1.91.0" + "vscode": "^1.96.0" }, "categories": [ "Programming Languages", @@ -859,7 +859,7 @@ "@types/mocha": "^10.0.10", "@types/node": "26.x", "@types/sinon": "^22.0.0", - "@types/vscode": "^1.91.0", + "@types/vscode": "1.96.0", "@vscode/test-cli": "^0.0.15", "@vscode/test-electron": "^3.1.0", "@vscode/vsce": "^3.9.2", diff --git a/vscode/pnpm-lock.yaml b/vscode/pnpm-lock.yaml index 428a426cfb..504d4e68c7 100644 --- a/vscode/pnpm-lock.yaml +++ b/vscode/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: ^22.0.0 version: 22.0.0 '@types/vscode': - specifier: ^1.91.0 - version: 1.92.0 + specifier: 1.96.0 + version: 1.96.0 '@vscode/test-cli': specifier: ^0.0.15 version: 0.0.15 @@ -612,8 +612,8 @@ packages: '@types/sinonjs__fake-timers@15.0.1': resolution: {integrity: sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==} - '@types/vscode@1.92.0': - resolution: {integrity: sha512-DcZoCj17RXlzB4XJ7IfKdPTcTGDLYvTOcTNkvtjXWF+K2TlKzHHkBEXNWQRpBIXixNEUgx39cQeTFunY0E2msw==} + '@types/vscode@1.96.0': + resolution: {integrity: sha512-qvZbSZo+K4ZYmmDuaodMbAa67Pl6VDQzLKFka6rq+3WUTY4Kro7Bwoi0CuZLO/wema0ygcmpwow7zZfPJTs5jg==} '@typescript-eslint/eslint-plugin@8.64.0': resolution: {integrity: sha512-CGvQPBxN3wZLu6Rz2kFUpZeoCm78xUic92ck39KPePkO1NPOwjCqdQnm5Q87tpWw9vcBvW8XLrDXjH9PWYtJ3Q==} @@ -2831,7 +2831,7 @@ snapshots: '@types/sinonjs__fake-timers@15.0.1': {} - '@types/vscode@1.92.0': {} + '@types/vscode@1.96.0': {} '@typescript-eslint/eslint-plugin@8.64.0(@typescript-eslint/parser@8.64.0(eslint@9.30.1)(typescript@6.0.3))(eslint@9.30.1)(typescript@6.0.3)': dependencies: diff --git a/vscode/src/chatAgent.ts b/vscode/src/chatAgent.ts index c6d77e3bec..f1079fd234 100644 --- a/vscode/src/chatAgent.ts +++ b/vscode/src/chatAgent.ts @@ -88,9 +88,7 @@ export class ChatAgent implements vscode.Disposable { try { const model = request.model; if (!model) { - stream.markdown( - "No language model selected. Select a model in the chat picker and try again.", - ); + stream.markdown("No language model selected. Select a model in the chat picker and try again."); return { metadata: { command: "design" } }; }