Skip to content

[release/1.149] copilot: fix signed-out BYOK chat hanging when the legacy Copilot CLI provider is off (cherry-pick #351273) - #351290

Open
Vritant Bhardwaj (vritant24) wants to merge 1 commit into
release/1.149from
cherry-pick/351273-release-1.149
Open

Vritant Bhardwaj (vritant24) wants to merge 1 commit into
release/1.149from
cherry-pick/351273-release-1.149

Conversation

@vritant24

Copy link
Copy Markdown
Member

Cherry-pick of #351273 onto release/1.149. 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.enabled is off. Extension activation waits on ConversationFeature.activationBlocker, while BYOK detection waits on extension activation because the declared copilotcli vendor is no longer registered.

Change

ConversationFeature also releases the activation blocker once the first Copilot token request settles, whether it succeeds or fails. See #351273 for the full description.

How to test

  1. Use a profile that is not signed in to GitHub.
  2. Add a BYOK model (for example a Custom Endpoint group in chatLanguageModels.json).
  3. Set "github.copilot.chat.cli.legacyProvider.enabled": false and reload.
  4. In the Chat view pick the Local harness and send a request. It should be answered by the BYOK model; before this change it hangs and times out.

Validation

… provider is off (#351273)

copilot: unblock activation for signed-out BYOK when the Copilot CLI 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]>
(cherry picked from commit 32686b8)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the signed-out BYOK chat activation fix.

No open issues 🎉

What changed in this PR

Cherry-picks #351273 into release/1.149 to fix signed-out bring-your-own-key (BYOK) chat hanging when the legacy Copilot CLI provider is disabled, addressing #350360.

Changes:

  • Releases the conversation activation blocker when the initial Copilot token request succeeds or fails, while preserving existing chat enablement logic.
  • Adds a regression test covering failed authentication, a pending model query, and subsequent activation when BYOK models become available.

No actionable findings remain. The PR reports upstream validation; build and tests were not rerun on this release branch.

File Description
extensions/​copilot/​src/​extension/​conversation/​vscode-node/​test/​conversationFeature.test.ts Tests signed-out activation unblocking and delayed BYOK enablement.
extensions/​copilot/​src/​extension/​conversation/​vscode-node/​conversationFeature.ts Unblocks activation after the first token request settles, with a disposal guard.

Review effort: Balanced

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants