Plugin directory / Developer / dsh-cost
dsh-cost
Verified · install-tested on dsh GiantGKL
What it does
DSH token cost tracking plugin.
Works — verified, early-stage project
DSH token cost tracking plugin. It installs cleanly and boots without issues in our testing. It's early-stage but functional.
“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.
README
dsh-cost
DSH plugin for the DeepSeek Harness: live conversation cost and DeepSeek account balance in the composer stats row. Currency follows the UI locale: RMB (¥) in the Chinese UI, USD ($) in the English UI.
Features
- Conversation cost: cumulative token usage over the whole session log × official DeepSeek pricing, shown as a live estimate —
¥ 0.0123in the Chinese UI,$ 0.0018in the English UI. Hover for the input/output/cache-read token breakdown and the pricing tier. - Account balance: queries the official DeepSeek
GET /user/balanceendpoint. A USD account is converted to RMB in the Chinese UI; a CNY account is converted to USD in the English UI (estimated rate, noted in the tooltip). Click to refresh, auto-poll every 60 s. - DeepSeek only: the cost hides itself for non-DeepSeek models; without a configured API key the balance shows "余额 — / Balance —".
- Supported models:
deepseek-v4-pro/deepseek-v4-flash/deepseek-chat/deepseek-reasoner(other DeepSeek models are estimated with the v4-pro tier).
Install
npm install dsh-cost
Then mount it in the deployment's cordis.yml (or a profile's cordis.patch.yml):
plugins:
- name: 'dsh-cost'
The web client is composed automatically via the dsh.client declaration (platform: web); no further configuration is required.
Config
The Host half follows the llm-deepseek adapter settings ($DSH_HOME/settings.yaml):
| Setting | Default | Meaning |
|---|---|---|
llm-deepseek.apiKeyEnv |
DEEPSEEK_API_KEY |
Credential reference (environment-variable name) for the API key, resolved through the credentials service ($DSH_HOME/.credentials.yaml / environment / .env) |
llm-deepseek.baseURL |
https://api.deepseek.com |
Base URL of the balance endpoint |
Without an API key the balance shows "余额 — / Balance —"; the cost display is unaffected.
Pricing (USD, per 1M tokens)
| Model | Input | Output | Cache read |
|---|---|---|---|
| deepseek-v4-pro | $0.435 | $0.87 | $0.003625 |
| deepseek-v4-flash | $0.14 | $0.28 | $0.0028 |
| deepseek-chat | $0.28 | $0.42 | $0.07 |
| deepseek-reasoner | $0.55 | $2.19 | $0.14 |
- Cache writes are billed at the input price (DeepSeek has no separate write fee).
- Official DeepSeek USD pricing (the v4 tiers match the deployment's bundled pi-ai data). In the Chinese UI the same tiers are displayed in RMB.
- Balance conversion uses the estimated rate 1 USD ≈ ¥6.79 (2026-08 central parity 6.7888). To follow official price or rate changes, edit the
PRICINGtable inlib/client.jsandUSD_CNYinlib/index.js.
Privacy
- The API key is resolved through the credentials service and used only to send the Bearer request to
api.deepseek.com— it is never logged, never placed on a command line, and never returned to the browser. - The balance route lives on the harness web server's same-origin path
/api/plugins/dsh-cost/balance; responses carry balance numbers only (no key) withCache-Control: no-store. - The balance request runs inside the Host process (native
fetch), not through a sandboxed subprocess.
Limitations
- DeepSeek models and the official DeepSeek balance endpoint only.
- Balance conversion uses a hard-coded estimated rate, not a live rate.
- The cost is an estimate based on official pricing (token counts come from the Harness
tokenUsageprojection; discounts and taxes are not included).
License
MIT © 2026 GiantGKL
Install
Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:
dsh plugin add dshbase-catalog Then say "install dsh-cost for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.
Web profile:
dsh plugin --profile web add dsh-cost Headless (CLI) profile:
dsh plugin --profile headless add dsh-cost Package
npm: dsh-cost · version 0.2.1 · tested on dsh 0.1.0-rc.6
Test report
Verified end-to-end: L1 install + L2 load + L3 runtime Q&A on dsh 0.1.0-rc.6.
When to use it
Extend the agent's coding surface — give it a new tool, workflow, or integration so it handles a dev task it couldn't before.
Who it's for
Developers who want dsh to behave like a teammate on real codebases — editing, running, and verifying changes rather than just answering.
For developers — extending it
The tool/command surface is the seam: expose more of the SDK, add smarter context wiring, or tighten the loop between code changes and verification.