RMB/USD Token Billing Plugin
bpc-oss/dsh-web-billing · skills
CNY/USD Token Billing Plugin for DeepSeek Harness (dsh web): Official policy automatic pricing, including peak/off-peak hours, per-message ledger, account balance, region-driven currency display.
★ 13GitHub stars
0Forks
2026-08-15Last updated
JavaScriptLanguage
MITLicense
Key features
- lib/pricing.js has a built-in official price schedule (OFFICIAL_PRICING_POLICIES). Each policy has an effective time (since) and a unit price list.
- Accounting (host side)Subscribe to session/event, and charge the price of each assistant/message with usage according to the message time (CNY and USD dual currencies, the official US dollar price is released independently), and the ledger is persisted to $DSH_HOME/storages/web-billing.json.
- IdempotentWith (sessionId, messageId) as the primary key, repeat/replay events only cover details and will never be accumulated repeatedly (multi-process, multiple restarts, actual test verification).
- The /billing endpoint is only accessible by the loopback address by default (loopbackOnly: true)
- 2026-08-17Peak and valley pricing (peak hours 09:00-12:00 / 14:00-18:00 Beijing time, half price during free periods): See the table below
Install command
dsh plugin --profile web add github:bpc-oss/dsh-web-billing