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/2] 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/2] 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" } }; }