microsoft / microsoft/vscode

Agent Host Copilot: allow BYOK sessions without GitHub Copilot sign-in

Open
#329,667 0 comments 5 reactions 2 assignees Claimed by @eli-w-king View on GitHub
agent-host agents-window feature-request model-byok
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Related platform capability: #318578

## Feature request

Allow the Copilot Agent Host provider to advertise that GitHub Copilot authentication is optional when it has at least one usable BYOK model.

#322977 added BYOK model support to the Copilot Agent Host. However, the provider still advertises the GitHub Copilot protected resource as required at the agent level. As a result, the conditional gate introduced by #328990 continues to treat the Copilot session type as requiring GitHub sign-in, even when its selected model is backed entirely by the user's own provider.

## Expected behavior

- When at least one usable BYOK model is available, the Copilot provider advertises that its GitHub Copilot protected resource is optional.
- A signed-out user can create and run a Copilot Agent Host session using a BYOK model.
- Copilot-hosted models are only advertised when an appropriate Copilot credential is available.
- Selecting or restoring a Copilot-hosted model while signed out requests GitHub Copilot authentication on demand rather than failing the turn.
- Signing in adds Copilot-hosted models without disrupting existing BYOK sessions.
- Signing out removes Copilot-hosted models while leaving usable BYOK models and sessions available.
- If the user is signed out and no usable BYOK model exists, the provider must not report itself as usable without GitHub.
- Repository-scoped GitHub authentication remains optional and can be requested separately when a GitHub operation needs it.
- Changes to BYOK models and authentication are republished reactively to the Agents window.

## Acceptance criteria

- Signed out + usable BYOK model: Copilot session type is available without GitHub.
- Signed out + no usable BYOK model: Copilot session type still requires GitHub sign-in.
- BYOK requests complete without a GitHub Copilot token.
- Copilot-backed requests trigger the normal authentication flow when needed.
- Tests cover BYOK model registration/removal, sign-in/sign-out, restored sessions, and model switching.

## Related

- #318578
- #322977
- #328990
- #327078

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.