
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-usage-billing
Advanced tools
中文 | 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 价;插件保留路由开关供将来官方恢复路由时开启,当前关闭)))。法定节假日与调休上班的周末全天空闲计费(内置 2026 年国务院放假安排,可在设置中自行增补)。价格表见文末。
llm/stream,所有会话的每次模型调用都会被记录(输入/输出/缓存命中/未命中 tokens)usage_billing:模型可直接查询统计(“现在用了多少钱?”“今天呢?”——支持 today/month/all 范围).dsh-usage-billing.json,重启不丢(v0.5.4 前为 .dsh-usage-stats.json,升级后自动迁移)以下截图基于虚构演示数据。
统计弹窗 · 总览(主界面侧边栏卡片点开)

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

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

设置页 · 用量统计

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)完全无此问题。
把本仓库根目录的 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 前 | flash | 0.02 | 1 | 2 |
| 8/17 前 | v4-pro | 0.025 | 3 | 6 |
| 8/17 后·空闲 | flash | 0.05 | 1.5 | 4.5 |
| 8/17 后·高峰 | flash | 0.10 | 3.0 | 9.0 |
| 8/17 后·空闲 | v4-pro | 0.15 | 4.5 | 13.5 |
| 8/17 后·高峰 | v4-pro | 0.30 | 9.0 | 27.0 |
| 9/10 12:00 后·空闲 | flash | 0.02 | 1 | 4 |
| 9/10 12:00 后·高峰 | flash | 0.04 | 2 | 8 |
模型按名称子串归类计价:名字含
flash(含新名deepseek-flash及旧名deepseek-v4-flash、deepseek-v4-flash-vision-exp——旧名已下线、由 V4.1-Flash 服务并同价计费)按 flash 档,含pro按 pro 档,其余归入「未定价/免费」。
节假日计费:内置 2026 年国务院放假安排(国办发明电〔2025〕7号,含放假日期与调休上班日),命中即全天空闲;设置页「非高峰日」可编辑(每行一个
YYYY-MM-DD),2027 年安排公布后自行增补即可,无需等插件发版。
.
├── 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
schemaVersion 迁移标记,重启自动单次重建修正。clientModules 服务发现;首次安装后需重启应用并刷新页面。sessions.open 被移除,会话导航自动改走 uiWorkspace.openSession,旧运行时自动回退,无需区分版本安装)。MIT
FAQs
DeepSeek Harness 用量与消费统计插件:按 2026-08-17 调价前后峰谷价格计费,含主界面汇总面板、会话级明细与图表
The npm package dsh-usage-billing receives a total of 57 weekly downloads. As such, dsh-usage-billing popularity was classified as not popular.
We found that dsh-usage-billing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.