Repository navigation
copilot: fix signed-out BYOK chat hanging when the legacy Copilot CLI provider is off - #351273
Merged
Vritant Bhardwaj (vritant24) merged 1 commit intoNov 30, 2026
Merged
Conversation
…vendor is unregistered Signed out, the first Copilot token request fails without an identity change, so nothing completed ConversationFeature's activation blocker. With the legacy Copilot CLI provider disabled, the BYOK model query waits for this extension's activation and the two deadlock. Release the blocker once the first token request settles. Fixes #350360 Co-authored-by: Copilot <[email protected]>
Federico Brancasi (federicobrancasi)
approved these changes
Nov 30, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change addressing signed-out BYOK chat startup hangs.
No open issues 🎉
What changed in this PR
Fixes signed-out BYOK chat startup hanging when the legacy Copilot CLI provider is disabled, addressing #350360.
Changes:
- Releases the activation blocker when the initial Copilot token request settles, while leaving chat enablement controlled by
reevaluate. - Adds a regression test covering token-request failure followed by delayed BYOK model discovery.
| File | Description |
|---|---|
extensions/copilot/src/extension/conversation/vscode-node/test/conversationFeature.test.ts |
Tests activation unblocking while signed out and subsequent BYOK enablement. |
extensions/copilot/src/extension/conversation/vscode-node/conversationFeature.ts |
Shares activation-unblocking logic and invokes it after the initial token request settles. |
Review effort: Balanced
Vritant Bhardwaj (vritant24)
enabled auto-merge
November 30, 2026 18:10
Ulugbek Abdullaev (ulugbekna)
approved these changes
Nov 30, 2026
Vritant Bhardwaj (vritant24)
deleted the
agents/mock-endpoint-repro-issue-350360
branch
November 30, 2026 18:52
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.
Fixes #350360
Problem
Signed out of GitHub with a BYOK model configured, a chat request in the Local harness never starts and ends with "Chat took too long to get ready" when
github.copilot.chat.cli.legacyProvider.enabledis off.The extension's activation waits on
ConversationFeature.activationBlocker, which completes on a Copilot token, a detected BYOK model, or an identity change. Signed out, none of these happen:onDidAuthenticationChangedoes not fire.vscode.lm.selectChatModels({}), which resolves every declared vendor. Thecopilotclivendor is declared but no longer registered when the legacy provider is off, so resolving it waits for this extension to finish activating, which is waiting on the blocker.With the legacy provider on, registering
copilotclifired a model change event that re-ran the query and hid the problem.Change
ConversationFeaturenow also releases the activation blocker once the first Copilot token request settles, whether it succeeds or fails. Signed out, that request fails quickly, activation completes, the pending model query returns the BYOK models, and chat enables as before. Enablement is still decided byreevaluate; only the blocker is affected.How to test
chatLanguageModels.json)."github.copilot.chat.cli.legacyProvider.enabled": falseand reload.Validation
pnpm -C extensions/copilot exec tsc --noEmit --project tsconfig.json: passedpnpm run oxlinton the two changed files: passedpnpm run test-extension -l copilot --grep "Conversation feature test suite": 8 passing, 1 pending (already skipped), including the new signed-out case