Repository navigation
chat: Warn about BYOK models in remote Copilot sessions - #339941
Merged
Vritant Bhardwaj (vritant24) merged 5 commits intoOct 6, 2026
Merged
Vritant Bhardwaj (vritant24) merged 5 commits into
Vritant Bhardwaj (vritant24) merged 5 commits into
Conversation
Show an editor-only warning for configured BYOK models when the selected Copilot harness is connected remotely. Limit it to the first eligible input per window and support persistent profile-scoped muting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Vritant Bhardwaj (vritant24)
October 5, 2026 23:16
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Cached remote environment data can incorrectly show the warning for an already disconnected workspace.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds an editor-only warning when configured BYOK models are unavailable in connected remote Copilot sessions.
Changes:
- Adds connection-, model-, harness-, and window-aware warning logic with persistent muting.
- Passes input context to notification visibility callbacks.
- Adds accessibility guidance, regression tests, and a manual checklist.
| File | Description |
|---|---|
agentHostRemoteByokNotification.ts |
Implements warning eligibility and lifecycle. |
agentHost.contribution.ts |
Registers the contribution. |
chatInputNotificationService.ts |
Extends the visibility callback API. |
chatInputNotificationWidget.ts |
Supplies rendering context to callbacks. |
agentHostRemoteByokNotification.test.ts |
Tests warning behavior. |
chatInputNotificationWidget.test.ts |
Tests callback context delivery. |
chatAccessibilityHelp.ts |
Documents accessible interaction. |
chatAccessibilityHelp.test.ts |
Tests help visibility. |
BYOK-REMOTE-NOTIFICATION-TEST-CHECKLIST.md |
Provides manual validation steps. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use current remote transport state instead of cached environment data when deciding whether to show the warning. Require the rendering context for notification visibility callbacks and cover startup disconnects and reconnections. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
previously approved these changes
Oct 6, 2026
Avoid consuming the one-time remote warning before the chat has a stable session resource. Cover startup, message sending, and profile-isolated muting, and remove the manual checklist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
previously approved these changes
Oct 6, 2026
Contributor
|
This PR will be automatically cherry-picked to |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> # Conflicts: # src/vs/workbench/contrib/chat/test/browser/accessibility/chatAccessibilityHelp.test.ts # src/vs/workbench/contrib/chat/test/electron-browser/agentSessionsDraftHandoff.test.ts
Vritant Bhardwaj (vritant24)
enabled auto-merge
October 6, 2026 15:43
roblourens
approved these changes
Oct 6, 2026
Vritant Bhardwaj (vritant24)
merged commit Oct 6, 2026
75d6718
into
microsoft:main
54 of 56 checks passed
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
BYOK models are not supported by the Copilot harness in remote sessions. Add a chat-input warning in the editor so users with configured BYOK models understand this limitation.
onDidShowcallback to enforce first-input ownership.No linked issue was provided.
Testing
Passed:
npm run compile-client— completed with 0 errors../scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostRemoteByokNotification.test.ts --run src/vs/workbench/contrib/chat/test/browser/widget/input/chatInputNotificationWidget.test.ts --run src/vs/workbench/contrib/chat/test/browser/accessibility/chatAccessibilityHelp.test.ts— 110 tests passed.node build/hygiene.ts src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRemoteByokNotification.ts src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostRemoteByokNotification.test.ts— passed.git diff --cached --checkand the normal pre-commit hygiene hook — passed.Manual verification in the OSS editor using TestResolver and a synthetic BYOK provider registered through the real language-model service:
For manual verification in a fresh, unmuted OSS editor profile, use the built-in TestResolver (
./scripts/code.sh --remote=test+test); Remote-SSH does not support OSS:Not fully verified manually: real provider authentication, SSH/WSL/Dev Container/Codespaces transports, actual network interruption, multiple concurrent windows, full application restart, physical screen-reader output, and the complete theme/layout matrix. Automated connection-state and widget tests do not substitute for those environment-specific checks.