Skip to content

agentHost: bump @github/copilot to 1.0.34#311964

Merged
roblourens merged 9 commits intomainfrom
roblou/agents/bump-github-copilot-packages
Apr 22, 2026
Merged

agentHost: bump @github/copilot to 1.0.34#311964
roblourens merged 9 commits intomainfrom
roblou/agents/bump-github-copilot-packages

Conversation

@roblourens
Copy link
Copy Markdown
Member

Bumps @github/copilot from ^1.0.28^1.0.34 in the root and remote/ package.json files, matching the version already pinned in extensions/copilot. @github/copilot-sdk was already at the latest published version (^0.2.2) so it's unchanged.

Fix: tolerate synthetic models with empty capabilities

The 1.0.34 SDK's listModels() now returns a synthetic auto router entry shaped like:

{ "id": "auto", "name": "Auto", "capabilities": {} }

The SDK's ModelInfo type still declares capabilities.limits.max_context_window_tokens as required, so reading it threw and zeroed out the entire model list:

TypeError: Cannot read properties of undefined (reading 'max_context_window_tokens')
  at CopilotAgent._listModels (...copilotAgent.js:338:47)

Wrapped the SDK type in a local ICopilotModelInfo with the actually-optional fields marked optional, and skip entries lacking max_context_window_tokens with a warn log instead of throwing.

Validation

  • npm install clean (root + remote + extensions)
  • npm run compile — 0 errors
  • Unit tests — 9026 passing
  • All agentHost integration test suites passing
  • Real SDK integration test (AGENT_HOST_REAL_SDK=1) including the new listModels returns well-shaped model entries after authenticate test passes

(Written by Copilot)

roblourens and others added 7 commits April 21, 2026 20:06
From #311751

Co-authored-by: Copilot <copilot@github.com>
- Unrelated: fix local agent host being broken on main following
  some overnight cleanups
- Register a JSON schema for agent session settings (only when they're
  open since it has a perf cost)
- When there are multiple custom approval buttons, show them in a
  dropdown similar to other tool calls.
Matches the version used in extensions/copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…' into roblou/agents/bump-github-copilot-packages
After bumping @github/copilot to 1.0.34, listModels() returns a synthetic
'auto' router entry shaped like { id: 'auto', name: 'Auto', capabilities: {} }.
The SDK's ModelInfo type still declares capabilities.limits.max_context_window_tokens
as required, so reading it crashed _listModels and zeroed out the model list.

Wrap the SDK type in a local ICopilotModelInfo with the actually-optional
fields marked optional, and skip entries lacking max_context_window_tokens
with a warn log instead of throwing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 22, 2026 18:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Screenshot Changes

Base: 31320b4c Current: 887bbe9e

Changed (5)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
agentSessionsViewer/CompletedUnread/Dark
Before After
before after
agentSessionsViewer/CompletedUnread/Light
Before After
before after

Instead of dropping the synthetic 'auto' router model, make
IAgentModelInfo.maxContextWindow optional and pass it through as
undefined when the SDK doesn't report a fixed context window. The
agentHostLanguageModelProvider already handles undefined via '?? 0',
and the protocol state type already had the field optional.

Update the real-SDK listModels test to allow undefined maxContextWindow
and to assert the 'auto' entry is present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the agent host’s Copilot SDK dependency to align versions across the repo and adjusts agent-host/session UX code to accommodate updated SDK/runtime behaviors.

Changes:

  • Bump @github/copilot from ^1.0.28 to ^1.0.34 in root + remote/.
  • Harden Copilot agent model listing against SDK “synthetic” model entries that omit capabilities (skip with warning instead of throwing).
  • Add lazy per-session JSON schema registration for agent-session-settings://… documents so editors get schema-driven completions/validation.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.ts Refactors custom tool confirmation options into grouped primary/secondary buttons with overflow actions.
src/vs/sessions/contrib/agentHost/test/browser/agentSessionSettingsFileSystemProvider.test.ts Extends tests to cover lazy schema registration, refresh on config change, and disposal on session removal.
src/vs/sessions/contrib/agentHost/browser/localAgentHost.contribution.ts Ensures agent-host chat + terminal contributions are registered in the Sessions app.
src/vs/sessions/contrib/agentHost/browser/agentSessionSettingsFileSystemProvider.ts Registers per-session JSON schemas lazily and keeps them in sync with session config changes.
src/vs/sessions/contrib/agentHost/browser/agentSessionSettings.contribution.ts Wires up the schema registrar when registering the settings FS provider.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Wraps SDK listModels() types defensively and filters models missing required runtime fields.
package.json Bumps @github/copilot dependency range to ^1.0.34.
package-lock.json Updates lockfile entries for @github/copilot 1.0.34 and platform-specific optional deps.
remote/package.json Bumps @github/copilot dependency range to ^1.0.34.
remote/package-lock.json Updates lockfile entries for @github/copilot 1.0.34 and platform-specific optional deps.

Copilot's findings

Files not reviewed (1)
  • remote/package-lock.json: Language not supported
  • Files reviewed: 10/12 changed files
  • Comments generated: 2

@roblourens roblourens marked this pull request as ready for review April 22, 2026 18:47
@roblourens roblourens enabled auto-merge (squash) April 22, 2026 18:47
@roblourens roblourens merged commit 096e5ab into main Apr 22, 2026
26 checks passed
@roblourens roblourens deleted the roblou/agents/bump-github-copilot-packages branch April 22, 2026 19:23
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 22, 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.

4 participants