DSH Plugins
返回列表
dsh-usage-stats

dsh-usage-stats

admin-security 更新于 2026.08.21

在终端中运行以下命令:

dsh plugin install Tastelessor/dsh-usage-stats

将以下提示词粘贴到 DeepSeek Harness 对话框中:

在 DeepSeek Harness 终端中执行 dsh plugin install Tastelessor/dsh-usage-stats 即可安装该插件,项目源码位于 https://github.com/Tastelessor/dsh-usage-stats 。

插件介绍

DeepSeek Harness ships without a built-in token-usage view, so after a few sessions you are left guessing at real spend — which model burns the most, how much the cache-hit rate actually saves, and whether a particular hour pushed the bill higher. dsh-usage-stats adds a dedicated Usage Stats page to the Web settings panel: summary cards (total tokens, daily average, cache hit rate, estimated spend) that switch between today, this week, and this month in one click, plus a three-month GitHub-style heatmap that turns raw session logs into an at-a-glance picture of consumption, priced automatically against official peak and off-peak rates in both CNY and USD.

The plugin ships official tiered defaults for deepseek-v4-flash and deepseek-v4-pro, lets you edit per-model prices inline by currency and peak/off-peak slot, and refreshes the stats instantly without a restart. The cost of each call is resolved from its own event timestamp — Beijing-time peak windows (09:00–12:00, 14:00–18:00) are billed at the peak tier, everything else at half that rate — and alias ids such as ark-code-latest are auto-mapped to their physical models so the price table actually matches.

It is built for developers who run DeepSeek Harness day-to-day for coding or conversation and want a clear handle on their token budget: spot which days spike, which model dominates, and how much caching saves — without digging through logs or doing hand math. As a pure observer it never touches the agent loop, never reports to any external service, and keeps all data on your machine.

截图预览

使用场景

  • 查看每日/每周/每月 token 消耗与估算费用
  • 通过三月热力图发现用量峰值与低谷
  • 按峰谷时段自动换算 CNY 与 USD 真实花费

适合人员

  • 日常使用 DeepSeek Harness 进行编码或对话的开发者
  • 需要控制 token 预算的 AI 应用团队
  • 关注缓存命中率对实际成本影响的工程师