Refresh model catalogs when authentication changes - #329685
Draft
Vritant Bhardwaj (vritant24) wants to merge 2 commits into
Draft
Refresh model catalogs when authentication changes#329685Vritant Bhardwaj (vritant24) wants to merge 2 commits into
Vritant Bhardwaj (vritant24) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Vritant Bhardwaj (vritant24)
August 7, 2026 20:26
View session
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Tyler James Leonhardt (@TylerLeonhardt)Matched files:
|
Vritant Bhardwaj (vritant24)
marked this pull request as draft
August 7, 2026 20:27
Contributor
There was a problem hiding this comment.
Pull request overview
Refreshes model catalogs and revokes cached Agent Host credentials when authentication changes.
Changes:
- Rebuilds model-management and picker catalogs after account changes.
- Forwards sign-out revocations and removes cached credentials.
- Refreshes Claude models and disposes stale proxy handles.
Show a summary per file
| File | Description |
|---|---|
.github/skills/sessions/SKILL.md |
Documents authentication refresh guidance. |
src/vs/platform/agentHost/common/agentService.ts |
Documents empty-token revocation semantics. |
src/vs/platform/agentHost/node/agentHostAuthenticationService.ts |
Removes revoked cached tokens. |
src/vs/platform/agentHost/node/claude/claudeAgent.ts |
Handles proxy revocation and catalog refresh. |
src/vs/platform/agentHost/test/node/claudeAgent.test.ts |
Tests Claude sign-out behavior. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.ts |
Forwards credential removal. |
src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.ts |
Refreshes models after account resolution. |
src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerItemSections.ts |
Exposes Manage Models while signed out. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostAuth.test.ts |
Tests removal forwarding. |
src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerItems.test.ts |
Updates signed-out picker expectations. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 2
- Review effort level: Balanced
Copilot started reviewing on behalf of
Vritant Bhardwaj (vritant24)
August 7, 2026 20:42
View session
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
src/vs/platform/agentHost/node/claude/claudeAgent.ts:587
- This also removes the already-published native Anthropic catalog. If the subsequent native refresh fails,
_refreshModels()takes its all-sources-failed path and deliberately keeps the “last known-good” catalog—but that catalog is now empty—so signing out makes otherwise usable BYOK models disappear. Preserve the current native entries while dropping Copilot entries, then refresh them in the background.
this._models.set([], undefined);
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Balanced
| @@ -71,7 +71,12 @@ export class AgentHostAuthenticationService { | |||
| authenticated = this._tokens.get(this._key(params.resource, scopes))?.token === params.token; | |||
| } | |||
| if (authenticated) { | |||
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
Related to #329667.