MIT-licensed DSH plugin (JavaScript, zero runtime dependencies) for token usage, cost estimates, provider balances, quotas and budget alerts.
DSH integration
Native runtime
Author-claimed
Safety audit
Unaudited
Last verified
2026-11-10
License
MIT
01What can it help you accomplish?
See how many tokens DeepSeek Harness actually burns, per model, provider, project and subagent
A sidebar statistics page with today / last 7 days / all-time totals, a trend chart, a share donut and a detail table
DSH users who pay per token and want to know where the spend goes
Turn raw token counts into money, with peak/off-peak pricing and budgets
Per-model cost estimates from the LiteLLM price list, USD / CNY switching, day and month budgets with used percentages
Individuals and teams that need a spend ceiling rather than a surprise bill
Keep an eye on provider balances and subscription quotas without opening each console
A model-access tab with balances, quota windows and reset countdowns, plus eight kinds of alerts pushed to the bottom-right corner
Users juggling several relay stations and official platforms
02How to install into DeepSeek Harness
Prerequisites
- DSH with the plugin manager available (the Add plugin search box or plugin_manager)
- Node.js ^22.19 || >=24 per the package badge
Installation steps
- 01
Search for `dsh-token-metrics` in DSH's Add plugin box, or run `plugin_manager install_bundle dsh-token-metrics`
- 02
Alternatively install straight from GitHub: `plugin_manager install_bundle github:hugoyee75-cmyk/dsh-token-metrics`
- 03
Restart DSH (or hot reload); the Token usage icon appears in the sidebar and the first open back-scans existing session logs
Verify the integration
Not specified by the author
03DSH integration and capability boundaries
A DSH bundle installed through the plugin manager or the Add plugin search box; it adds a sidebar page, host HTTP routes and a right-corner notification stream inside the DSH host process.
Usage statistics page
DSH's own session logs→totals for input / output / cacheRead / reasoning / total / calls / cache hit rate / average first-token latency, plus a trend chart and a detail table
stores its data in $DSH_HOME/token-metrics/usage.jsonCost estimation
per-call token usage plus the LiteLLM public price list→per-model cost in USD or CNY, with peak / off-peak pricing for DeepSeek and a manual price entry for unpriced models
Provider balance and quota probes
your configured provider keys and base URLs→balances for Sub2API / new-api / one-api gateways and 11 official platforms; quota windows and reset countdowns for subscription plans
only quota queries send requests, and only to the subscription sites you configured (auto sampling can be disabled with quotaSampleMs: 0)Corner notifications over SSE
balance, quota, query failure, new version, peak/off-peak and budget events→eight alert types pushed to the bottom-right corner with server-side cooldown, on-disk state and client memory de-duplication
alert state is written to $DSH_HOME/token-metrics/alerts.json
04Who is it for? When not to use it?
Good for
- DSH users who pay per token and want to know where the spend goes
- Individuals and teams that need a spend ceiling rather than a surprise bill
- Users juggling several relay stations and official platforms
Not for
- Hot reload depends on Cordis internal APIs; a DSH or Node upgrade can break it, and restarting DSH is the fallback.
05Compatibility, maintenance and safety notes
- Everything is computed from DSH's session logs, which the README calls the only authoritative source; local numbers will not match official billing because the two count differently.
- Hot reload depends on Cordis internal APIs; a DSH or Node upgrade can break it, and restarting DSH is the fallback.
- The plugin stores no keys; keys stay with DSH's credential service and only a reference name (apiKeyEnv) is written, with apiKey / token / secret-like fields filtered out.
- History cannot be attributed retroactively: the session log has no accountId / userId / keyId, so usage recorded before switching accounts is counted as unknown.
MIT · latest release v0.4.0 (2026-11-07); zero runtime dependencies, no build step
06Frequently asked questions
How do I install dsh-token-metrics?
Type `dsh-token-metrics` into DSH's Add plugin search box, or run `plugin_manager install_bundle dsh-token-metrics`. To install from GitHub instead, use `plugin_manager install_bundle github:hugoyee75-cmyk/dsh-token-metrics`.
Does it upload my usage data anywhere?
No. The README says data comes from DSH's own session logs, and that only subscription quota queries send requests — to the subscription sites you configured — with auto sampling switchable off via quotaSampleMs: 0.
Where is the data stored, and will I lose history on upgrade?
In `$DSH_HOME/token-metrics/usage.json`. The README stresses that when data consistency is in doubt the plugin keeps existing data, marks it for rebuild and re-scans from the session logs instead of wiping history.
Why don't the numbers match my official bill?
Local statistics are computed from session logs while the official bill counts actual billing; the README says to treat the official bill as authoritative and the local numbers as a trend view.
Do I need to install dependencies or build it?
No. The README lists zero runtime dependencies, no build step and no npm install.
07Related DSH workflows
weknora
by tencent
Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
honcho
by plastic-labs
Memory library for building stateful agents
webnovel-writer
by lingfengqaq
A long-form Chinese web-novel writing assistant for Claude Code and DeepSeek Harness, designed to reduce memory loss and hallucinations in serialized projects of up to 2 million characters.
reme
by agentscope-ai
ReMe: Memory Management Kit for Agents - Remember Me, Refine Me.
08Data and sources
一个 DSH 插件:把经过 DeepSeek Harness 的每一次模型调用都记下来,在侧边栏给你一个 Token 用量统计页,顺带管好成本与供应商余额。
plugin_manager install_bundle dsh-token-metrics
This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-10. Found an error? Submit a correction.
Best DeepSeek Harness Plugins
Twelve plugins worth installing first — picked from the whole catalog, across every category.
