dsh-token-cost
Run the following command in DeepSeek Harness:
dsh plugin install gdy01/dsh-token-cost
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install gdy01/dsh-token-cost in your terminal; the source is at https://github.com/gdy01/dsh-token-cost . Restart dsh web after install and the cost panel button will appear in the sidebar.
About this plugin
When running multiple DeepSeek-model sub-projects through DSH, token usage is buried in per-project session logs, and the RMB price differs across uncached input, cache-hit input, and output tokens. Calculating the real cost used to mean sifting through raw logs by hand. dsh-token-cost turns that into a single sidebar button.
The plugin scans every session.jsonl and .zstd file under ~/.dsh/sessions, aggregates by project (cwd) and by model, splits each request into three token categories — uncached input, cache-hit input (cacheReadTokens), and output — then converts them to RMB using a built-in DeepSeek official price table (CNY per 1M tokens). Models not in the table are still listed with raw token counts so you can add or override prices in cordis.patch.yml without touching code. A small button appears at the bottom of the DSH web sidebar; opening it reveals per-project totals with expandable per-model breakdowns. The HTTP API is bound to loopback only, and the plugin carries zero runtime npm dependencies (Zstandard decoding uses the Node built-in node:zlib module).
Ideal for developers and team leads who manage multiple DSH projects across several models and want an at-a-glance view of token cost composition, particularly the savings unlocked by prompt-caching hit rates.
Use Cases
- Quickly check per-project token spend after parallel inference runs
- Evaluate real savings from prompt-cache hit rates
- Add custom prices for non-listed models without touching code
Best For
- Developers managing multi-project inference via DSH
- Team leads who need per-project LLM cost accounting
- AI engineers using DeepSeek models and tracking cache-driven savings
Related Plugins
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.
Packages all 87 SKILL.md files from upstream reverse-skill as a DeepSeek Harness plugin that auto-registers them for authorized reverse engineering, penetration testing, and security research.
Dockyard DSH is a native DeepSeek Harness plugin that unifies official OAuth/client sessions for Codex, Antigravity, Grok, Claude, and Cursor, providing account pool, model catalog, and quota status.