Repository navigation
DeepSeek quota probe hardcodes USD symbol: CNY balance shown as \$76.88 instead of ¥76.88 #5692
Description
Client or integration
OpenCodex dashboard
Area
Provider adapter
Summary
The DeepSeek quota probe reports the account balance with a hardcoded $ prefix, regardless of the currency returned by the DeepSeek API. A CNY-denominated account with a balance of 76.88 CNY is displayed in the dashboard as "API balance ($76.88)", which misrepresents the currency. I expected the label to use the currency reported in balance_infos[].currency (e.g. "API balance (¥76.88)" for CNY).
The affected code is fetchDeepSeekQuota in src/providers/quota/vendor-probes-key.ts: the probe reads total_balance / granted_balance from balance_infos rows and prefers a USD row, but the label construction hardcodes $ for whichever row is selected. When the account only has a CNY row (the common case for DeepSeek accounts billed in CNY), the label is wrong.
Suggested fix: derive the symbol from the selected row's currency field (CNY → ¥, USD → $, otherwise show the currency code) instead of hardcoding $.
Reproduction
- Configure a DeepSeek provider (
baseUrl: https://api.deepseek.com) with an API key from a CNY-billed account. - Open the dashboard → Providers → DeepSeek → refresh quota (or call
GET /api/providers/keys?name=deepseek"a=1&refresh=1). - Observe the quota label:
API balance ($76.88). - Call
GET https://api.deepseek.com/user/balancewith the same key: the payload reports"currency": "CNY"insidebalance_infos, i.e. the amount is 76.88 CNY, not USD.
Version
2.64.0
Operating system
macOS 27.0 (arm64)
Provider and model
deepseek (quota probe; model-independent)
Logs or error output
# Dashboard quota label (wrong currency symbol):
API balance ($76.88)
# DeepSeek API response shape (redacted, amount kept as-is):
{
"is_available": true,
"balance_infos": [
{
"currency": "CNY",
"total_balance": "76.88",
"granted_balance": "0.00",
"topped_up_balance": "76.88"
}
]
}Screenshots and supporting files
Dashboard screenshot available on request; the label line above is the complete visible defect.
Redacted configuration
{
"providers": {
"deepseek": {
"baseUrl": "https://api.deepseek.com",
"authMode": "api-key"
}
}
}Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
fix(quota): label DeepSeek balance with the selected row's currency (#…
fix(quota): label DeepSeek balance with the selected row's currency (#…
fix(providers): bundle L3 — MiMo, DeepSeek, Google, Command Code and …
lidge-jun commentedon Sep 24, 2026
Fixed on
devby bundle #5739 (squash-merged as a8d526f); it will ship in the next release. Closing manually becausedevis not the default branch, so GitHub does not auto-close. If you still see this on a build that includes a8d526f, please reopen with the version and a redacted reproduction.