Skip to content

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

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

Use the selected chat model for the Ruby design agent#4193
Hashim1999164 wants to merge 3 commits 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.

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