AgentHost: Add agent host model metadata multipliers#314026
Merged
roblourens merged 5 commits intomainfrom May 5, 2026
Merged
Conversation
(Written by Copilot)
Contributor
Screenshot ChangesBase: Changed (7)Errored (18)Fixtures that failed to render — no screenshot was produced.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR threads provider-supplied model pricing metadata (from Copilot SDK billing.multiplier) through the Agent Host protocol/root state into the chat model picker, and syncs newer Agent Host Protocol surface (notably resourceRequest and additional protocol types).
Changes:
- Add
_metato agent host model descriptors and map_meta.pricing/_meta.multiplierNumericinto chat language model metadata (model picker). - Populate Copilot agent model
_metafrom SDKbilling.multiplierand extend agent-side publishing so metadata is propagated. - Sync protocol types (e.g.
resourceRequest, typed error structures, new response part kind) and adjust/add tests accordingly.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts | Extends model-metadata mapping test to assert pricing/multiplier propagation. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.ts | Maps model _meta keys into chat language model metadata (pricing, multiplierNumeric). |
| src/vs/platform/agentHost/test/node/copilotAgent.test.ts | Adds test ensuring Copilot SDK billing.multiplier becomes model _meta. |
| src/vs/platform/agentHost/test/node/agentSideEffects.test.ts | Adds coverage that model observable updates publish model _meta through root-state actions. |
| src/vs/platform/agentHost/node/protocolServerHandler.ts | Adds a handler for the newly-synced resourceRequest command. |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Extends model info to include billing.multiplier and populates _meta pricing fields. |
| src/vs/platform/agentHost/node/agentSideEffects.ts | Publishes _meta alongside other model descriptor fields in RootAgentsChanged. |
| src/vs/platform/agentHost/common/state/protocol/state.ts | Adds SessionModelInfo._meta and introduces ResponsePartKind.SystemNotification + associated response part type. |
| src/vs/platform/agentHost/common/state/protocol/messages.ts | Adds bidirectional command typing (ServerCommandMap) and typed request/response helpers. |
| src/vs/platform/agentHost/common/state/protocol/errors.ts | Adds structured error-data types and a typed AhpError shape. |
| src/vs/platform/agentHost/common/state/protocol/commands.ts | Defines the new symmetric resourceRequest command shape. |
| src/vs/platform/agentHost/common/state/protocol/.ahp-version | Bumps synced agent-host-protocol version reference. |
| src/vs/platform/agentHost/common/agentService.ts | Extends IAgentModelInfo to carry optional model _meta. |
Copilot's findings
- Files reviewed: 13/13 changed files
- Comments generated: 2
(Written by Copilot)
Keep this PR scoped to model metadata multipliers; protocol support remains generated for later UI work.\n\n(Written by Copilot)
Remove the unrelated resourceRequest behavior change and read agent host model metadata through direct property access.\n\n(Written by Copilot)
Remove local Copilot SDK type copies from product code and keep agent-host model metadata numeric-only, deriving the pricing display string in the chat language model provider.\n\n(Written by Copilot)
dmitrivMS
approved these changes
May 5, 2026
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.
Fix #313922
Summary
_metafrom provider model info into root-state model descriptorsbilling.multiplierpricingandmultiplierNumericinto chat language model metadata for the Agents model pickerresourceRequestcommand in the protocol serverValidation
models include billing multiplier metadata when SDK provides itmodel observable update publishes model metadatamaps models with correct metadataClaude Haiku 4.5with0.33x,GPT-5.5withMedium · 7.5x)(Written by Copilot)