AI Agent Hub
Back to plugins
🖥️

dsh-token-ledger-pro

Client Updated 2026.09.02

Run the following command in DeepSeek Harness:

dsh plugin install bjzkhy/dsh-token-ledger-pro

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install bjzkhy/dsh-token-ledger-pro in the DeepSeek Harness terminal; the full source code lives at https://github.com/bjzkhy/dsh-token-ledger-pro. After installation, restart DSH Web and hard-refresh the browser (Ctrl+F5) to see the plugin in action.

About this plugin

Anyone who runs LLM sessions through DeepSeek Harness knows the quiet anxiety of an opaque token bill. dsh-token-ledger-pro merges the previously separate cost-meter and spend panels into a single-script plugin that pins a live status strip beside the input bar: current model, account balance, session cost, daily, monthly, and a colour-coded budget bar that shifts from green to orange to red as you cross alertThreshold.

Under the hood the plugin captures token usage from every DSH session event and prices it against a built-in catalogue spanning 16 vendors and 136 models, with a four-level matching strategy (exact, prefix, vendor default, cross-vendor global). DeepSeek peak/off-peak pricing, separate cache-read and cache-write rates, and graceful fallback with a visible "unpriced" badge for models outside the catalogue are all handled. Balance lookups call official APIs for DeepSeek, OpenAI, Anthropic, Kimi, Zhipu, Volcano Ark, Aliyun and more, or you can point a custom HTTP endpoint with JSONPath extraction at any provider in between; results are cached for one minute by default.

Aggregated session, daily, and monthly figures plus the last 2,000 line items are persisted via atomic JSON writes, so nothing is lost across restarts. An optional priceSyncUrl lets you overlay a remote pricing feed on top of the built-in directory. The plugin is aimed at solo developers and small teams who juggle several models and want a glanceable, always-present view of spend and balance without spinning up an extra service.

Use Cases

  • Track real-time token spend while switching between multiple models
  • Review cumulative costs by session, daily, and monthly for month-end reconciliation
  • Get early warnings via the budget bar and balance panel before credits run out

Best For

  • Solo developers making heavy multi-model API calls through DeepSeek Harness
  • Team leads who need to monitor and control token budgets
  • Engineers juggling several LLM vendors who want a unified view of balance and spend