fix(llm): use correct binary name for VS Code Insiders detection#5109
Merged
fix(llm): use correct binary name for VS Code Insiders detection#5109
Conversation
VS Code Insiders ships its CLI shim as `code-insiders`, not `code`. With `LLMBinaryName: "code"`, DetectedLLMGatewayClients() would fail to detect vscode-insider on machines that only have the Insiders build installed (no stable VS Code), causing `thv llm setup` to silently skip it. Adds TestRealClientConfigs_LLMBinaryNames as a regression guard that asserts the binary name for every LLM-gateway-capable tool in supportedClientIntegrations. Fixes #5089 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9944d06 to
3b1345d
Compare
JAORMX
approved these changes
Apr 29, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes VS Code Insiders LLM gateway detection by correcting the CLI shim name used for exec.LookPath, and adds a regression test to guard LLMBinaryName values for real client configs.
Changes:
- Update VS Code Insiders
LLMBinaryNamefromcodetocode-insidersso detection works when only Insiders is installed. - Add a unit test asserting expected
LLMBinaryNamevalues for LLM-gateway-capable client configs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/client/config.go | Corrects the VS Code Insiders binary name used during LLM gateway client detection. |
| pkg/client/llm_gateway_test.go | Adds a regression test validating real supportedClientIntegrations LLMBinaryName values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5109 +/- ##
==========================================
- Coverage 67.08% 67.03% -0.05%
==========================================
Files 595 595
Lines 60000 60000
==========================================
- Hits 40250 40222 -28
- Misses 16691 16720 +29
+ Partials 3059 3058 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DetectedLLMGatewayClients()usesexec.LookPath(cfg.LLMBinaryName)to verify a tool is actually installed before reporting it as detected. Thevscode-insiderentry hadLLMBinaryName: "code"— the stable VS Code binary name — instead of"code-insiders", which is the actual CLI shim shipped by the Insiders build.On a machine with only VS Code Insiders installed (no stable VS Code),
LookPath("code")returns not-found, sothv llm setupsilently skips the Insiders integration even though the tool is present.LLMBinaryNameforvscode-insiderfrom"code"to"code-insiders"TestRealClientConfigs_LLMBinaryNamesas a regression guard that asserts the binary name for every LLM-gateway-capable tool insupportedClientIntegrationsFixes #5089
Type of change
Test plan
task test) —TestRealClientConfigs_LLMBinaryNamespasses and would have caught the bugtask test-e2e)task lint-fix)API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.Does this introduce a user-facing change?
Yes.
thv llm setupnow correctly detects VS Code Insiders on machines where only the Insiders build is installed.Special notes for reviewers
The regression test checks the binary name for all five tools that have
LLMBinaryNameset. If a future entry gets the wrong name, the test will catch it immediately rather than requiring manual verification on a machine with that specific tool installed.