[FEATURE]: Configure usage cost display currency
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Usage costs are currently formatted as USD in the app and TUI. Users with custom model pricing may want to display costs in another currency, or may already configure model prices in a local currency.
Please add config for the displayed cost currency and the source currency used by configured prices, so examples like CNY display and RMB-denominated custom prices can be represented without double conversion.
support!
+1 from a Chinese user! Would love to see costs in CNY/RMB. Excited to see this feature being tracked!
By the way, I built a small tool for automating proxy setup via Mihomo/Clash during development. Might be useful for other Chinese devs: https://github.com/tianshan233/auto-proxy
Opened a PR for this: #41208. It adds a display.currency config (with optional display.rates overrides) that converts displayed usage costs in the TUI, app, and ACP usage updates, while keeping the provider currency as the source value. The source-currency half of this issue (custom prices configured in RMB) is covered by the provider-level currency field from #39425, which this PR builds on. Happy to adjust if @StarpTech is still actively working on this.
+1 — I'd really like a configurable display currency.
For anyone looking into this, the cost is hardcoded to USD in two places:
packages/tui/src/component/prompt/index.tsx(the prompt status line):const money = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" })packages/tui/src/feature-plugins/sidebar/context.tsx(sidebar "Context" block): the same formatter.
A minimal client setting would already cover the common case, e.g. in cli.json:
{
"cost": {
"currency": "CNY", // display currency
"locale": "zh-CN",
"source_currency": "USD", // currency the provider/model prices are in
"rate": 7.20 // source_currency -> currency
}
}
Keeping source_currency + rate separate matters for users whose configured model prices are already in their local currency (e.g. DeepSeek bills in CNY), so a naive USD->CNY conversion doesn't double-convert. Defaults could stay USD / en-US / 1:1 to preserve current behavior.
Thanks!
Thanks for the request, @dingskyhi! You're asking for a config option to choose the currency usage costs are shown in, and to declare the currency that custom model prices are set in, so that prices already in CNY/RMB aren't converted twice. Right now costs are always formatted as USD in the TUI, the app and ACP. Maintainers will consider it.
Related:
- #38667: ACP
usage_updatealways reportscurrency: "USD", even for custom providers priced in another currency, because price config has no currency field. This is the "source currency" part of your request. - #41208, #51429, #51631: community PRs that added
display.currency/display.exchangeRatesfor this issue. All three were closed without being merged.
This can't be done as a plugin today. The plugin API has no way to change how the built-in views format costs.
Meanwhile, all pull requests get closed without merging.
Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.
Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.
Any reason for that, except that there are no currencies other that US dollar?