Skip to content

Long context pricing#317820

Merged
lramos15 merged 2 commits into
mainfrom
lramos15/mighty-bison
May 21, 2026
Merged

Long context pricing#317820
lramos15 merged 2 commits into
mainfrom
lramos15/mighty-bison

Conversation

@lramos15
Copy link
Copy Markdown
Member

Fix #317575

Copilot AI review requested due to automatic review settings May 21, 2026 17:59
@lramos15 lramos15 self-assigned this May 21, 2026
@lramos15 lramos15 enabled auto-merge (squash) May 21, 2026 18:00
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

Adds support for “long context” (tiered) pricing metadata for language models and surfaces it in relevant VS Code Chat UI hovers, aligned with the updated Copilot API pricing structure.

Changes:

  • Extend language model pricing metadata (proposed API + internal metadata + ext host marshalling) with optional long-context cost fields.
  • Show long-context cost details in the model picker hover and the chat models management hover content.
  • Update Copilot extension token pricing normalization to a tiered { default, longContext? } structure and bump @vscode/copilot-api to ^0.4.0.
Show a summary per file
File Description
src/vscode-dts/vscode.proposed.languageModelPricing.d.ts Adds optional longContext*Cost fields to the proposed API types.
src/vs/workbench/contrib/chat/common/languageModels.ts Extends internal ILanguageModelChatMetadata with long-context pricing fields.
src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts Renders a second “Long context cost” section in the model picker hover when present.
src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.ts Adds long-context pricing section to the markdown hover content.
src/vs/workbench/api/common/extHostLanguageModels.ts Marshals long-context pricing fields from extensions into workbench metadata (and back into API objects).
package.json Bumps @vscode/copilot-api to ^0.4.0.
package-lock.json Updates lock entry for @vscode/copilot-api@0.4.0.
remote/package.json Bumps @vscode/copilot-api to ^0.4.0 for remote.
remote/package-lock.json Updates remote lock entry for @vscode/copilot-api@0.4.0.
extensions/copilot/src/platform/networking/common/networking.ts Introduces tier types (ITokenPriceTier, tiered IChatEndpointTokenPricing).
extensions/copilot/src/platform/endpoint/node/chatEndpoint.ts Normalizes tiered pricing (default + optional long_context) into per-1M token rates.
extensions/copilot/src/platform/endpoint/common/endpointProvider.ts Updates raw billing token price type shape to tiered structure.
extensions/copilot/src/extension/conversation/common/languageModelAccess.ts Uses pricing.default.* for labels after pricing shape change.
extensions/copilot/src/extension/conversation/vscode-node/languageModelAccess.ts Emits both default and long-context costs into model metadata.
extensions/copilot/src/extension/chatSessions/claude/node/claudeCodeModels.ts Emits both default and long-context costs for Claude code models.
extensions/copilot/package.json Bumps @vscode/copilot-api to ^0.4.0 in Copilot extension.
extensions/copilot/package-lock.json Updates Copilot extension lock entry for @vscode/copilot-api@0.4.0.
extensions/copilot/chat-lib/package.json Bumps @vscode/copilot-api to ^0.4.0 in chat-lib package.

Copilot's findings

Files not reviewed (2)
  • extensions/copilot/package-lock.json: Language not supported
  • remote/package-lock.json: Language not supported
  • Files reviewed: 14/18 changed files
  • Comments generated: 2

Comment thread extensions/copilot/chat-lib/package.json
@lramos15 lramos15 merged commit a2d2b10 into main May 21, 2026
26 checks passed
@lramos15 lramos15 deleted the lramos15/mighty-bison branch May 21, 2026 22:00
@vs-code-engineering vs-code-engineering Bot added this to the 1.122.0 milestone May 21, 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.

Add long context pricing to relevant models

3 participants