Skip to content

sessions: support signed-out Copilot Agent Host sessions - #330094

Merged
Vritant Bhardwaj (vritant24) merged 5 commits into
mainfrom
vritant24/agent-host-signed-out-models
Aug 11, 2026
Merged

sessions: support signed-out Copilot Agent Host sessions#330094
Vritant Bhardwaj (vritant24) merged 5 commits into
mainfrom
vritant24/agent-host-signed-out-models

Conversation

@vritant24

Copy link
Copy Markdown
Member

Summary

  • Guides signed-out Copilot Agent Host users to configure a BYOK model when none is ready.
  • Allows sessions using an advertised BYOK model to start without GitHub authentication.
  • Keeps GitHub authentication required for models and agents that still depend on it.
Technical context for AI-assisted review

Intent and previous behavior

The signed-out Agent Host gate from the base branch makes the Copilot Agent Host target available when BYOK use is enabled. Session creation still treated every selected model as requiring the agent's GitHub authentication, however, and users without a ready model had no guidance in the chat input.

Implementation

A session-type-scoped chat input notification observes sign-in state, extension registration, configuration, and Agent Host model availability. It offers model management and sign-in actions when the Copilot Agent Host target is selected but no usable BYOK model is available.

The session handler now passes the selected model into the authentication decision. Required agent authentication is bypassed only when that model is an advertised BYOK model; all other selections continue through the existing authentication flow.

Behavior and constraints

  • The notification applies only to the Copilot Agent Host session type while signed out and while signed-out use is enabled.
  • Model discovery must settle before the notification decides that setup is required.
  • A model's advertised BYOK status, rather than the setting alone, controls the authentication bypass.
  • Existing authentication behavior remains unchanged for GitHub-backed models and other session providers.

Review context

This change is stacked on #330082 and relies on its signed-out session-type availability behavior.

@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-copilot-resource-optional branch from 8b64944 to ca9a681 Compare August 10, 2026 21:21
Copilot AI balanced review requested due to automatic review settings August 10, 2026 21:21
@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-signed-out-models branch from 3e0a03c to b97805e Compare August 10, 2026 21:21

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.

Pull request overview

Adds signed-out BYOK support for Copilot Agent Host sessions while retaining authentication for GitHub-backed models.

Changes:

  • Adds signed-out model setup guidance.
  • Makes authentication depend on the selected model’s advertised BYOK metadata.
  • Adds related availability and authentication tests.
Show a summary per file
File Description
agentHostAuth.test.ts Tests model-specific authentication decisions.
agentHostSignedOutModelsNotification.ts Adds signed-out model guidance.
agentHostSessionHandler.ts Passes model selection into authentication.
agentHostAuth.ts Implements BYOK authentication bypass.
sessionTypeAuthRequirement.test.ts Tests notification readiness and visibility.
localAgentHost.contribution.ts Registers the notification contribution.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Balanced

@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-copilot-resource-optional branch from 6b9794b to 8f16c2a Compare August 10, 2026 21:37
@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-signed-out-models branch from b97805e to 83140e6 Compare August 10, 2026 21:37
@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-copilot-resource-optional branch from 8f16c2a to 278805b Compare August 10, 2026 23:09
@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-signed-out-models branch 2 times, most recently from a7e8792 to e3bb8d0 Compare August 10, 2026 23:34
@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-copilot-resource-optional branch 2 times, most recently from dce238f to ed98646 Compare August 10, 2026 23:39
@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-signed-out-models branch from e3bb8d0 to c9b7417 Compare August 10, 2026 23:39
@vritant24
Vritant Bhardwaj (vritant24) marked this pull request as ready for review August 11, 2026 00:11
Guide signed-out users to configure a BYOK model, and allow sessions using those models to proceed without GitHub authentication.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve optional authentication for providers without bridged BYOK models,
and require a visible targeted model before suppressing setup guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose the model picker from the signed-out Agents welcome state when BYOK
operation is enabled.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-copilot-resource-optional branch from ed98646 to a181ca4 Compare August 11, 2026 00:28
@vritant24
Vritant Bhardwaj (vritant24) force-pushed the vritant24/agent-host-signed-out-models branch from 634071e to b456b81 Compare August 11, 2026 00:28
TylerLeonhardt
TylerLeonhardt previously approved these changes Aug 11, 2026
Base automatically changed from vritant24/agent-host-copilot-resource-optional to main August 11, 2026 14:59
@vritant24
Vritant Bhardwaj (vritant24) dismissed stale reviews from TylerLeonhardt and Don Jayamanne (DonJayamanne) August 11, 2026 14:59

The base branch was changed.

Co-authored-by: vritant24 <13074644+vritant24@users.noreply.github.com>
@vritant24
Vritant Bhardwaj (vritant24) merged commit b48b664 into main Aug 11, 2026
28 checks passed
@vritant24
Vritant Bhardwaj (vritant24) deleted the vritant24/agent-host-signed-out-models branch August 11, 2026 16:07
@vs-code-engineering vs-code-engineering Bot added this to the 1.134.0 milestone Aug 11, 2026
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.

7 participants