dsh-cost-crystal
DeepSeek Harness (dsh web) 成本潮汐观测插件:余额卡片、波峰/低峰状态与切换倒计时、近24h消耗、本会话费用,以及(后续)用量预测。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xxvk/dsh-cost-crystal说明文档
阅读完整 README ↗dsh-cost-crystal 💎
A cost & usage crystal ball for the DeepSeek Harness web GUI — balance, real-time rate, peak/off-peak billing, and a 🔮 next-message cost forecast, all timezone-aware.
中文说明见 README_CN.md。
Screenshot

Features
- 🔮 Next-message cost forecast — estimates the token usage and cost of your next message from the current conversation context and historical usage; re-prices instantly when you switch models
- Balance card — CNY/USD balance with data-freshness hints («just now / Ns ago»); click to refresh instantly
- Real-time rate — the breathing dot and shimmer light up within 2s of token consumption, showing live
tok/s - Peak/off-peak billing — status badge, countdown to the next rate switch, and a last-24h spend estimate
- Plug & play — zero runtime dependencies, dark/light theme aware, API key stays on the Host
Installation
Requires the DeepSeek Harness web profile (@deepseek-ai/dsh).
# Option 1 (recommended): npm package
dsh plugin --profile web add dsh-cost-crystal
# Option 2: from GitHub
dsh plugin --profile web add "github:xxvk/dsh-cost-crystal"
# Option 3: local development
dsh plugin --profile web add /path/to/dsh-cost-crystal
Then restart dsh web and hard-refresh the browser. The package declares dsh.bundle, so dsh plugin mounts it into the profile's bundle layer automatically — no manual config.
Pricing & Timezone
- Pricing engine implements the official DeepSeek policy timeline: model-aware unit prices, peak/off-peak/flat buckets, dual currency (CNY/USD).
- Peak (deepseek-v4-flash etc.): hit $0.014 / miss $0.44 / output $1.32 per M tokens; off-peak at half price. Windows
01:00–04:00and06:00–10:00 UTC. - Windows are defined in UTC; state/price judged in UTC; display uses the browser's local timezone.
- Spend/cost covers local Harness sessions only; display conversion uses a fixed rate of 7.1.