Skip to content

v1.0.0 — RMB/USD token billing for DSH web / DSH web 人民币/美元 token 计费

Choose a tag to compare

@bpc-oss bpc-oss released this 14 Aug 06:45
· 4 commits to master since this release

English

dsh-web-billing v1.0.0 — RMB/USD token-billing plugin for DeepSeek Harness (dsh web).

  • Official-policy auto pricing: curated policy schedule in lib/pricing.js, incl. the 2026-08-17 peak/off-peak rates (peak 09:00-12:00 / 14:00-18:00 Beijing, off-peak at half price). Policy changes apply automatically and the ledger re-prices itself on restart.
  • Per-message cost ledger: every assistant message with usage is priced by its own timestamp and persisted ($DSH_HOME/storages/web-billing.json); idempotent against event replays.
  • Account balance: live DeepSeek balance via the official /user/balance API (CNY and USD).
  • Locale-driven currency: ¥ in the Chinese UI, $ in the English UI (displayCurrency to force one).
  • Extensible: policyOverrides config, per-model price overrides, USD price overrides.

Install: dsh plugin --profile web add github:bpc-oss/dsh-web-billing

Docs: README.md (中文) / README.en.md (English)

中文

dsh-web-billing v1.0.0 —— DeepSeek Harness(dsh web)的人民币/美元 token 计费插件。

  • 官方政策自动计价lib/pricing.js 内置官方价格时间表,含 2026-08-17 起的峰谷定价(高峰 09:00-12:00 / 14:00-18:00 北京时间,空闲半价)。政策变化自动生效,重启后账本自动按新规则重估全部历史记录。
  • 逐条消息记账:每条带 usage 的 assistant 消息按完成时刻计价并持久化($DSH_HOME/storages/web-billing.json),事件重放幂等、绝不重复累计。
  • 账号余额:通过官方 /user/balance 接口实时显示余额(CNY/USD 双币种)。
  • 界面语言切换币种:中文界面显示 ¥、英文界面显示 $(可用 displayCurrency 强制指定)。
  • 可扩展policyOverrides 配置可追加官方政策、支持按模型价格覆盖与美元价覆盖。

安装:dsh plugin --profile web add github:bpc-oss/dsh-web-billing

文档:README.md(中文)/ README.en.md(English)