
Security News
GitHub to Block pull_request_target Workflows by Default Starting December 2
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.
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 价;插件保留路由开关供将来官方恢复路由时开启,当前关闭)))。价格表见文末。
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 <本仓库路径>。
把本仓库根目录的 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 档,其余归入「未定价/免费」。
.
├── 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 服务发现;首次安装后需重启应用并刷新页面。MIT
FAQs
DeepSeek Harness 用量与消费统计插件:按 2026-08-17 调价前后峰谷价格计费,含主界面汇总面板、会话级明细与图表
The npm package dsh-usage-billing receives a total of 0 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
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.

Security News
/Application Security
A practical guide to securing GitHub Actions against supply chain attacks, covering malicious pull requests, credential theft, dependency risks, and release pipelines.

Security News
Composer 2.11 adds dependency cooldowns, joining package managers that delay new releases to reduce supply chain risks while allowing urgent security updates.