- Home
- Plugins
- Usage & Billing
- dsh-costbench (plugin)
dsh-costbench (plugin)
yuzhanbo-98/dsh-costbench/plugin
A measured leaderboard of token-saving DeepSeek Harness plugins. The default setup and three plugins each ran 28 fixed tasks four times (448 runs), with cost reconciled against DeepSeek billing, 95% intervals and automatic answer checks. /costbench shows the leaderboard, /costbench check compares it with the plugins in your profile, and /costbench apply --yes installs the recommended setup at the tested versions. The commands make no model calls.
Install
dsh plugin --profile web add github:yuzhanbo-98/dsh-costbenchThis plugin lives in the plugin subdirectory of the repository.
README
dsh-costbench
Which DeepSeek Harness (dsh) token-saving plugins and settings actually cut cost, and which ones quietly break tasks?
dsh-costbench runs the same fixed task set in dsh --profile headless --json under different plugin setups (one --patch overlay per setup), repeats each run, and reports tokens, cache hits, estimated cost and task success side by side.
Results (2026-11-30, dsh 0.2.2-rc.5, deepseek-flash)
448 runs: 28 tasks × 4 setups × 4 repeats, all at off-peak price. Billed by DeepSeek: ¥5.58 in total.
| Setup | Success | Cost per task vs default | Single-turn tasks | 5-turn sessions (95% CI) |
|---|---|---|---|---|
| dsh-readprune 0.6.0 | 112/112 | −9% | +4% | −22% (−34% to −7%) |
| default dsh | 112/112 | — | — | — |
| dsh-context-compression-improved 0.15.9 | 112/112 | +8% | +6% | +9% (−4% to +26%) |
| @lightcheng/dsh-strata 0.5.1 | 110/112 (2 unverified) | +9% | +4% | +14% (−3% to +34%) |
What this says:
- dsh-readprune is the only plugin that saved money, and only in multi-turn sessions, where it cut cost by about a fifth by reading files by range instead of whole. The biggest win was a five-turn refactor session (−57%). No answers got worse.
- The two compression plugins cost a little more at these sizes. Their main savings start when context reaches tens of percent of the 1M-token window; our sessions stay around 30-60k tokens. They add prompt and tool overhead before that point. Their confidence intervals include zero, so "no saving yet" is the safe reading, not "harmful".
- Single-turn tasks: no plugin helps. Short tasks never trigger pruning or compression, and each plugin adds a few hundred tokens of instructions.
- Quality held. After fixing the grader (below), every setup answered every task correctly, except two strata runs that could not be re-verified; 4 fresh strata runs of that task all passed.
Notes on the numbers:
- Grader fix. The first pass marked 5 runs wrong; all had the right answer with decoration (
4.95 EUR,/orders (374 ms average)). The answer parser now tolerates units and notes;bench/regrade.pyre-graded the 3 text-only cases, and the 2 strata cart-session runs (which also check code) are counted as unverified. Raw and re-graded results are both inbench/results/. - Cost scale. Summed step usage at the price table in
run.pygives ¥7.92, but DeepSeek billed ¥5.58 (balance 21.15 → 15.57), a steady 0.70 ratio across the run. The table overstates absolute prices; relative comparisons are unaffected. No setup shows hidden spending beyond its step usage. - Small sample. 4 repeats per task; per-task step counts vary a lot (sd is about as large as the mean across tasks). Treat differences under ~10% as noise.
The dsh plugin
plugin/ is a dsh plugin that brings these results into DeepSeek Harness:
/costbenchshows the leaderboard,/costbench checkreads your profile, and/costbench apply --yesinstalls the cheapest setup at the exact version measured (dsh-readprune@0.6.0today).- Commands never call the model. The data is
plugin/data/leaderboard.json, generated from the results bybench/export_leaderboard.py. - Tested in an isolated dsh 0.2.2-rc.5 install: all four commands run in the web app, and
apply --yesinstalled a package byte-identical to the reviewed readprune tarball (same sha512).

Listing it on awesome-dsh-plugin: the entry is ready in docs/submission/. It needs this repository to be public with the dsh-plugin topic, and the package published to npm so the in-app Discover index picks it up.
Run the prototype
Requires Node.js 24.9+, npm i @deepseek-ai/dsh, a DeepSeek API key, and Python 3.
python3 prototype/run.py baseline no-pruner pruner-aggressive
Paths at the top of prototype/run.py point to the author's environment; edit them for yours.
Run the benchmark
cd bench
export DSH_BIN=/path/to/node_modules/.bin/dsh DEEPSEEK_API_KEY=...
export COSTBENCH_HOMES='{"strata": "/path/to/dsh-home-with-strata"}' # plugin variants
python3 run.py --variants baseline,strata --repeats 4 --budget-cny 10
python3 report.py results/run.jsonl
bench/tasks.py holds 24 tasks (read-and-answer, code edits graded by hidden tests, longer-context lookups); every check was validated against a reference solution.
Method and limits
- Setups tested as shipped. Each plugin runs with its default settings, because that is what most users get.
- Single-turn and multi-turn tasks. 24 single-turn tasks plus 4 five-turn sessions. Compression plugins act at turn ends, so only the sessions exercise them; each session ends with a question about something seen in the first turn, to catch savings that come from forgetting.
- Repeats. The same task can take 4 or 6 steps on different runs, so every task runs several times per setup and results are reported as mean and spread.
- Fair ordering. Runs are interleaved (round 1 of every task and setup, then round 2, ...), so DeepSeek's prefix cache and time-of-day affect all setups alike.
- Hidden plugin calls. A plugin that calls the model itself may not show up in step usage; the account balance is logged at the start and end of each run as a cross-check.
- Not covered yet. Only
deepseek-flash; context windows far below the 1M-token limit, so thresholds set as a share of the window (e.g. Strata's 50 % auto-fold) never fire; Chinese public holidays are ignored in peak/off-peak pricing.
Reproduce the environment
scripts/setup.sh installs Node 24, dsh 0.2.2-rc.5 and one isolated DSH_HOME per plugin, each from the exact tarball that was reviewed (checked by sha256), and prints the env vars bench/run.py needs.
Roadmap
- Task set: 20-30 realistic tasks with automatic checks.
- Repeated runs, mean and spread, cost in CNY with DeepSeek peak/off-peak prices.
- Third-party token-saver plugins, each source-reviewed before it is installed in an isolated
DSH_HOME. Leaderboard + a dsh plugin that shows results and applies the best setup.Done:plugin/.- Longer sessions (200k+ tokens) to test compression plugins where they are meant to help.
License
MIT
Related plugins
DeepSeek-Balance-Whale-Widget
meteornox/deepseek-balance-whale-widget
dsh-context
bowenliang123/dsh-context
dsh-cost-meter
han-1413141/dsh-cost-meter
dsh-damage-pulse
wssfk12138/dsh-damage-pulse