Skip to content

Use the selected chat model for the Ruby design agent - #4193

Open
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/chat-agent-custom-model
Open

Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/chat-agent-custom-model

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 18, 2026 •

Copy link
Copy Markdown

Summary

  • The design chat agent always asked vscode.lm.selectChatModels for Copilot GPT4o, so custom chat models left model undefined and sendRequest crashed
  • It now uses the model already selected for the chat, falls back to Copilot GPT4o if needed, and shows a message instead of throwing when no model is available

Closes #4186

Tests

  • npx tsc covering the vscode extension

@Hashim1999164
Hashim1999164 requested a review from a team as a code owner August 18, 2026 19:28
Comment thread vscode/src/chatAgent.ts Outdated
Comment thread vscode/src/chatAgent.ts Outdated
@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Aug 26, 2026
@vinistock

Copy link
Copy Markdown
Member

It looks like both linting and formatting are failing. If request.model is new, it may require bumping the vscode types package to the version that introduces it along with the VS Code engine declared in the package.json.

@Hashim1999164

Copy link
Copy Markdown
Author

Bumped the VS Code engine and @types/vscode to 1.96 so request.model is typed, and put the missing model message on one line for Prettier. lint_node and build_node should be green on this push.

@vinistock

Copy link
Copy Markdown
Member

I ended up pushing an upgrade to a more recent version. Could you please rebase this branch with just the fix? It should be ready to ship.

@Hashim1999164
Hashim1999164 force-pushed the fix/chat-agent-custom-model branch from 10a3031 to 7cdbfee Compare September 25, 2026 23:06
@Hashim1999164

Copy link
Copy Markdown
Author

@vinistock rebased on main with just the chatAgent fix, dropped my old vscode bump since you already upgraded that side. should be ready now.

@Hashim1999164

Copy link
Copy Markdown
Author

@vinistock any update? rebased with just the chatAgent fix like you asked, curious if this is good to go now

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read properties of undefined (reading 'sendRequest')

2 participants