Skip to content

Default built-in pricing to CNY / 默认内置计费使用人民币#4462

Closed
SivanCola wants to merge 1 commit into
esengine:main-v2from
SivanCola:fix/default-cny-pricing
Closed

Default built-in pricing to CNY / 默认内置计费使用人民币#4462
SivanCola wants to merge 1 commit into
esengine:main-v2from
SivanCola:fix/default-cny-pricing

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • Switch DeepSeek built-in and official-template prices to CNY values.
  • Add MiMo domestic CNY pricing for built-in providers and official desktop templates.
  • Keep default money display fallbacks in CNY while preserving explicit USD/custom currency display.

Verification

  • go test ./internal/provider ./internal/config
  • (cd desktop && go test ./...)
  • (cd desktop/frontend && npm run typecheck && npm exec -- tsx src/__tests__/context-panel-breakdown.test.ts)
  • git diff --check

@SivanCola SivanCola requested a review from esengine as a code owner June 15, 2026 06:42
@github-actions github-actions Bot added desktop Wails desktop app (desktop/**) config Configuration & setup (internal/config) v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 15, 2026
@SivanCola SivanCola enabled auto-merge June 15, 2026 06:50

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2b4e01581

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/config/config.go
Comment on lines +1324 to +1325
if e.Prices[model] == nil {
e.Prices[model] = clonePricing(price)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve explicit MiMo price fallback

When an existing official MiMo provider has a provider-wide price fallback but no per-model prices (for example a user configured overseas USD/custom rates), this backfill adds CNY defaults for the curated models. PriceForModel prefers Prices[model] over Price, so after mergeCuratedModelsIntoProvider those new entries silently shadow the user's explicit pricing for mimo-v2.5-pro/mimo-v2.5/mimo-v2-omni; skip this backfill or seed from the existing fallback when e.Price is already set.

Useful? React with 👍 / 👎.

Comment thread internal/config/config.go
Comment on lines 1270 to +1271
func deepSeekV4FlashPrice() *provider.Pricing {
return &provider.Pricing{CacheHit: 0.0028, Input: 0.14, Output: 0.28, Currency: "$"}
return &provider.Pricing{CacheHit: 0.02, Input: 1, Output: 2, Currency: "¥"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop reporting CNY amounts as USD

Changing the default DeepSeek price currency to ¥ makes the default model's Pricing.Cost return yuan, but the desktop and serve wire paths still copy that raw value into the deprecated costUsd/sessionCostUsd fields without any conversion. Any client or saved telemetry that still reads those compatibility fields for the default DeepSeek model will now receive a CNY amount labeled as USD; either avoid populating the USD alias for non-USD prices or convert it before setting those fields.

Useful? React with 👍 / 👎.

Comment thread internal/config/config.go
Comment on lines +1293 to +1294
func mimoV2FlashPrice() *provider.Pricing {
return &provider.Pricing{CacheHit: 0.07, Input: 0.70, Output: 2.10, Currency: "¥"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use V2.5 pricing for rerouted v2-flash

For configurations that still include mimo-v2-flash, this helper continues to price it at the legacy V2 Flash rates even though MiMo's pricing page says the model auto-routes to V2.5 pricing on 2026-06-18 (https://mimo.mi.com/docs/en-US/price/pay-as-you-go). After that date cost estimates for copied examples or fetched/backfilled v2-flash models will mix stale rates, e.g. input miss ¥0.70 instead of ¥1.00, so map the alias to mimoV25Price() once the reroute is in effect or avoid hardcoding the expiring rate.

Useful? React with 👍 / 👎.

@SivanCola

Copy link
Copy Markdown
Collaborator Author

Superseded by #4329. The default CNY pricing behavior for official DeepSeek/MiMo providers has been folded into that integration PR while preserving explicit custom pricing.

@SivanCola SivanCola closed this Jun 15, 2026
auto-merge was automatically disabled June 15, 2026 07:32

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration & setup (internal/config) desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant