본문으로 건너뛰기
J

dsh-token-billing

jianzhexu/dsh-token-billing

Token billing plugin for DeepSeek Harness — per-call cost readout under the web composer

설치

dsh plugin --profile web add github:jianzhexu/dsh-token-billing

README

dsh-token-billing

English | 中文

A token billing plugin for DeepSeek Harness: records every model call at DeepSeek's official pricing and shows a billing readout row in the ambient stats band under the Web UI input box.

Features

  • Three-level cost totals — current session / owning workspace / all sessions (call count, input/cache-hit/output tokens, cost)
  • Separate peak / off-peak pricing (Beijing time 9:00-12:00 and 14:00-18:00 are peak; off-peak is half the peak price)
  • The ledger persists in the token_billing storage-domain domain and survives restarts
  • Hover the readout row for the full breakdown: session and global cost, token usage, per-model stats, workspace list, price table

Install

Requires a profile composing the web app (e.g. dsh --profile web; the plugin injects the webServer and storageDomain services and registers in the browser plugin table, all provided by the dsh-web-app bundle):

dsh plugin --profile <name> add github:jianzhexu/dsh-token-billing

Installing activates it: the plugin row mounts through the bundle's own patch layer — no manual config editing. The plugin is plain JavaScript with no build step, so git installs need no pnpm build authorization (allowBuilds).

Uninstall & override

dsh plugin --profile <name> remove dsh-token-billing

To override config or disable the row, target row id token-billing in your profile's own cordis.patch.yml.

Pricing source

https://api-docs.deepseek.com/zh-cn/quick_start/pricing (prices are built into the plugin and updated per release; models not listed on the pricing page are not billed)

License

MIT

관련 플러그인