DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Usage Billing — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
U

dsh-usage-billing

Usage Billing

DeepSeek Harness usage and cost statistics plugin: billed according to peak and off-peak prices before and after the 2026-08-17 price adjustment, with a main interface summary panel, session-level details, and charts

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:940842546/dsh-usage-billing#4c209774fbe6d336acb992434495dd7b1d2fcaac
READMECompatibilityVersions
统计弹窗总览统计弹窗图表美元模式设置页概览

Compatibility and provenance

Usage Billing is published as dsh-usage-billing and currently resolves to version 0.8.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/20/2026

Versions

0.8.0stable
9/20/2026
0.7.5stable
9/14/2026
0.7.4stable
9/11/2026
Show 9 more versionsCollapse versions
0.7.3stable
9/10/2026
0.7.2stable
9/10/2026
0.7.1stable
9/9/2026
0.7.0stable
9/8/2026
0.6.0stable
8/24/2026
0.5.5stable
8/24/2026
0.5.4stable
8/24/2026
0.5.2stable
8/23/2026
0.4.0stable
8/21/2026

Related plugins

Loading related plugins…

Latest
0.8.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 9
Weekly downloads
0
Last push
9/20/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with the current session provider's today usage on the sidebar entryWhale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinUsage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.

README

dsh-usage-billing · DeepSeek 用量与消费统计插件

中文 | English

针对 DeepSeek Harness 的免构建双面插件:自动统计本机所有会话的 DeepSeek 模型调用,按官方定价分段计费,并在主界面与设置页提供图表化的用量面板。

计费口径:2026-08-17 00:00(北京时间)前旧价;之后峰谷定价(高峰为工作日 9:00–12:00、14:00–18:00(2026-08-23 起生效,此前周末同样计高峰),空闲价为高峰价的一半;9/10 12:00 起 flash 系列再次调价(空闲 hit 0.02 / miss 1 / out 4,高峰 ×2,pro 不变;V4 Pro 官方已确认 9/14 后继续提供服务、计费方式不变(仍按 pro 价;插件保留路由开关供将来官方恢复路由时开启,当前关闭)))。价格表见文末。

功能

  • 全自动统计:监听 llm/stream,所有会话的每次模型调用都会被记录(输入/输出/缓存命中/未命中 tokens)
  • 历史回填:首次启动自动扫描本机会话日志,重建历史用量与消费,并附会话标题
  • 分段计费:按北京时间自动归入「调价前旧价 / 调价后高峰 / 调价后空闲」三段(2026-08-23 起高峰仅限工作日,周末全天空闲;此前周末同样计高峰)
  • 预算告警通知:跨 80%/100% 阈值时桌面 toast 主动提醒(每日每档一次),进度条临近变橙、超支变红
  • 定价可配置:价格表、高峰时段、调价边界日期、美元汇率均可编辑(改动只对后续调用生效),一键恢复默认
  • 数据导出:一键导出 CSV(按日 / 按会话,文件名含日期范围)或 JSON,便于对账
  • 官方余额拉取:自动检测已配置的 DeepSeek API Key,拉取官方账户余额(总余额 / 充值 / 赠金),每 10 分钟自动刷新,未配置 Key 时静默跳过
  • 余额续航预估:按近 7 天日均花费估算余额可用天数与预计耗尽日期
  • 告警历史:设置页展示最近预算告警记录
  • 日趋势图:设置页近 30 天每日费用柱状图
  • 统计更稳健:写入带 temp 副本,主文件损坏时自动恢复;双实例心跳检测告警
  • 主界面:
    • 侧边栏底部「Token 用量」卡片(当前模型 + 本会话 tokens/费用,千分位显示)→ 点击弹出居中「Token 用量与费用统计」弹窗(¥/USD 币种切换、总览卡片、按模型/按会话表格、预算进度、官方余额、分段占比、用量热力图)
    • 输入框下方常驻一行当前会话的用量
  • 设置页 → 用量统计:完整明细(统计卡片、预算进度、分段占比、日/周/月/年/累计热力图(悬停即时显示 token 与金额)、按会话 Top 8(可点击打开对应会话)、按模型、最近调用、回填/清空/导出、计费与预算设置)
  • 动态工具 usage_billing:模型可直接查询统计(“现在用了多少钱?”“今天呢?”——支持 today/month/all 范围)
  • 持久化:数据写入写策略根目录 .dsh-usage-billing.json,重启不丢(v0.5.4 前为 .dsh-usage-stats.json,升级后自动迁移)
  • 中英双语:所有界面文案跟随应用语言设置即时切换(中文 / English)

界面预览

以下截图基于虚构演示数据。

统计弹窗 · 总览(主界面侧边栏卡片点开)

统计弹窗总览

统计弹窗 · 图表区(分段占比 + 用量热力图,支持 ¥/USD 切换)

统计弹窗图表

美元模式(弹窗右上角一键切换,汇率换算)

美元模式

设置页 · 用量统计

设置页概览

安装

方式 A:npm 一键安装(推荐,预构建)

dsh plugin --profile web add dsh-usage-billing

npm 包:https://www.npmjs.com/package/dsh-usage-billing

应用启动时通过本包的 dsh.bundle.patch(cordis.patch.yml)自动挂载,无需任何其他配置。

⚠ 不要直接修改官方 bundle(如 @deepseek-ai/dsh-web-app/cordis.patch.yml), 也不要把插件放进 npm-cache\_npx 缓存(npm reify 会随时重建并留下悬空链接)。

本地路径形式同样支持:dsh plugin --profile web add <本仓库路径>。

📌 link:/本地 link 开发安装的机器绑定说明:@deepseek-ai/dsh-tools 由宿主 dsh 提供(见 peerDependencies),npm 上暂无匹配版本,因此本地 link 安装时它解析自 宿主侧。若插件的 node_modules 中没有对应链接,可在插件目录建一个指向 dsh 农场的 junction(农场由当前活跃引擎自动维护,跟随引擎版本):

New-Item -ItemType Junction -Path "node_modules\@deepseek-ai\dsh-tools" `
  -Target "$env:USERPROFILE\.dsh\profiles\node_modules\@deepseek-ai\dsh-tools"

该 junction 与本机 ~/.dsh 绑定,换机器需重建(dsh plugin add 本地路径方式 不受影响);npm 方式安装(方式 A)完全无此问题。

方式 B:用户级补丁(不动 profile)

把本仓库根目录的 cordis.patch.yml 内容加入:

%USERPROFILE%\.dsh\cordis.patch.yml
- insert:
    - id: usage-billing
      name: 'dsh-usage-billing'

内置进打包部署(开箱即用)的完整方案见 PUBLISH.md。

数据与口径

数据位置 / 说明
统计文件写策略根目录下 .dsh-usage-billing.json(通常为用户主目录)
计费时段北京时间;调价边界 2026-08-17 00:00
计费单位元 / 百万 tokens

价格表(元 / 百万 tokens):

时段模型命中未命中输出
8/17 前flash0.0212
8/17 前v4-pro0.02536
8/17 后·空闲flash0.051.54.5
8/17 后·高峰flash0.103.09.0
8/17 后·空闲v4-pro0.154.513.5
8/17 后·高峰v4-pro0.309.027.0
9/10 12:00 后·空闲flash0.0214
9/10 12:00 后·高峰flash0.0428

模型按名称子串归类计价:名字含 flash(含新名 deepseek-flash 及旧名 deepseek-v4-flash、deepseek-v4-flash-vision-exp——旧名已下线、由 V4.1-Flash 服务并同价计费)按 flash 档,含 pro 按 pro 档,其余归入「未定价/免费」。

参考:DeepSeek API 定价

目录结构

.
├── lib/
│   ├── index.js     # Host 半体:llm/stream 监听、计费、回填、持久化、/usage-billing 路由、usage_billing 工具
│   └── client.js    # Client 半体:主界面入口 + 设置页面板(window.__ModuleLoader__ 打包格式,免构建)
├── assets/
│   └── screenshots/ # 界面预览截图(虚构演示数据,中/英)
├── cordis.patch.yml # bundle 补丁:声明挂载行(dsh.bundle.patch 机制)
├── package.json     # exports("." / "./client" / "./cordis.patch.yml")+ dsh.client / dsh.bundle 声明
├── PUBLISH.md       # 发布指南(GitHub / npm / 用户安装)
├── LICENSE
└── README.md

常见问题

  • 统计翻倍:老版本自动回填未先清空导致;v0.2.0 起用 schemaVersion 迁移标记,重启自动单次重建修正。
  • 面板不显示:客户端 bundle 由部署的 clientModules 服务发现;首次安装后需重启应用并刷新页面。
  • 两个实例同时运行:统计文件是共享资源,多实例同时写会互相覆盖,请保持单实例。
  • 升级被覆盖:部署目录升级会覆盖内置补丁行与包文件,重跑一遍安装步骤即可。

License

MIT