feat(provider): show DeepSeek pricing in model picker#128
Merged
Conversation
There was a problem hiding this comment.
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/balanceand 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.
Detect the DeepSeek account currency from the official balance API and expose official per-1M token pricing through Copilot model metadata.
c6f1284 to
863f2c6
Compare
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
Notes
Verification