Skip to content

feat(provider): show DeepSeek pricing in model picker#128

Merged
Vizards merged 1 commit into
mainfrom
feat/deepseek-pricing-display
Jun 3, 2026
Merged

feat(provider): show DeepSeek pricing in model picker#128
Vizards merged 1 commit into
mainfrom
feat/deepseek-pricing-display

Conversation

@Vizards

@Vizards Vizards commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • add official DeepSeek per-1M token pricing metadata for V4 Flash and Pro
  • infer display currency from the official /user/balance API with locale fallback
  • localize model tooltips and suppress pricing on non-official base URLs

Notes

  • cost fields intentionally pass formatted currency strings because current Copilot UI renders them textually; if upstream switches to numeric parsing, remove this at src/provider/pricing/costs.ts
  • priceCategory is emitted only when concrete official pricing is available

Verification

  • npm run format:check
  • npm run compile
  • npm run lint

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds official DeepSeek model pricing metadata to the model picker UI by attaching per-currency pricing to model definitions, resolving a display currency from the /user/balance endpoint (with locale fallback), and localizing model tooltips while suppressing pricing on non-official base URLs.

Changes:

  • Extend model definitions with optional pricing metadata (pricing, priceCategory) and related shared types.
  • Introduce a background currency resolver that infers USD/CNY from /user/balance and caches the result.
  • Attach cost metadata + localized tooltips to the model picker chat information, and add V4 Flash/Pro pricing + new i18n strings.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/types.ts Adds shared pricing-related types and optional pricing fields on ModelDefinition.
src/provider/pricing/currency.ts Implements display-currency inference + caching from /user/balance (official host only).
src/provider/pricing/costs.ts Maps model pricing into Copilot model-picker cost fields.
src/provider/models.ts Adds localized tooltip support and injects cost metadata into chat info.
src/provider/index.ts Wires the currency resolver into model info refresh and invalidation flows.
src/i18n.ts Adds localized tooltip strings for V4 Flash/Pro.
src/consts.ts Adds official per-currency pricing + price category for V4 Flash and Pro.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/provider/pricing/currency.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread src/provider/pricing/costs.ts
Detect the DeepSeek account currency from the official balance API and expose official per-1M token pricing through Copilot model metadata.
@Vizards Vizards force-pushed the feat/deepseek-pricing-display branch from c6f1284 to 863f2c6 Compare June 3, 2026 07:05
@Vizards Vizards requested a review from Copilot June 3, 2026 07:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread src/provider/pricing/currency.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@Vizards Vizards merged commit 959bd0d into main Jun 3, 2026
3 checks passed
@Vizards Vizards deleted the feat/deepseek-pricing-display branch June 3, 2026 07:41
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.

2 participants