bpc-oss/dsh-web-billing
人民币/美元 token 计费插件,适用于 DeepSeek Harness(dsh web):依据官方政策自动定价,支持高峰/低谷时段、每消息账本、账户余额及根据区域设置显示货币。
Project Overview项目介绍
This is a native billing plugin built specifically for DeepSeek Harness (DSH) web and desktop clients. It tracks token usage and calculates costs automatically based on up-to-date official DeepSeek pricing policies, including the new peak/off-peak pricing that went into effect in August 2026. It logs every completed message transaction locally, displays real-time account balance pulled directly from DeepSeek's official API, and renders a clean interactive cost overview in the browser with automatic currency switching for both RMB and USD. It also supports pricing for third-party coding plans from multiple popular providers that are available via DSH, and installs directly via DSH's plugin system with no extra dependencies.
This plugin is designed for any DSH user that calls DeepSeek models or third-party coding plan models through DSH, helping users keep track of their AI spending down to each individual request. After installation, the plugin starts logging usage automatically without any extra manual configuration from the user. Users can navigate to the billing settings page at any time to filter spending by custom date ranges, set a custom monthly budget, check how much of their budget they have used, view cost breakdowns grouped by provider and model, and export their full billing history as CSV or JSON for external reconciliation.
The plugin is released under the open-source MIT license, so it is free to use, modify, and distribute for any personal or commercial purpose. All billing data is stored locally on the user's machine in the DSH home directory, and the billing endpoint is restricted to localhost access by default to protect user privacy and sensitive API key information. It is important to note that this plugin only tracks usage captured locally by DSH after installation, so it does not replace DeepSeek's official account billing. For cross-API key usage reconciliation, users should always refer to the official usage data exported from DeepSeek's official web console.
这是一款专为 DeepSeek Harness(DSH)网页版和桌面版开发的原生 token 计费插件,它会按照 DeepSeek 官方定价政策自动计价,内置包含 2026 年 8 月生效的峰谷定价在内的完整价格时间表。插件会逐消息记录消费,实时展示账号余额,在浏览器端提供费用可视化界面,并且可以自动切换人民币和美元两种显示语言。
这款插件适合所有使用 DSH 调用 DeepSeek 官方模型及第三方编码套餐模型的用户,帮助用户清晰掌握每一笔 AI 调用开销,做到花销可见可控。用户安装后插件会自动开始记录本地消费,用户可以随时打开设置中的费用汇总页,按时间范围筛选查看花费明细,设置月度预算,监控剩余余额,还可以导出账单做进一步核对分析。
本插件采用 MIT 许可证开源免费使用,所有账单数据仅存储在本地,默认仅允许回环地址访问接口,保证用户数据安全。需要注意的是,该插件统计的是 DSH 本地安装后记录的消费,并非 DeepSeek 官方账号的权威对账单,跨 API 密钥的消费核对请以 DeepSeek 官方控制台导出的数据为准。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-web-billing(bpc-oss/dsh-web-billing)
仓库:https://github.com/bpc-oss/dsh-web-billing
本站详情页:https://www.yhbd.top/plugins/bpc-oss-dsh-web-billing/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 12 · 最近提交 2026-08-22 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 12 stars - an early-stage project星标 12,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-web-billing
把 bpc-oss/dsh-web-billing 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-web-billing
简体中文 · English
DeepSeek Harness(dsh web / 桌面版)的 人民币 / 美元 token 计费插件:按官方政策自动计价
(内置政策时间表,含 2026-08-17 起的峰谷定价),逐条消息记账,实时显示账号余额,浏览器端
展示费用(界面语言自动切换 ¥ / $)。
一句话:你的 AI 花销「看得见、算得清、省得下」——官方价自动跟随、本地/订阅/白嫖精细化分类、 历史一键重估、预算与余额可视。
⚠️ 这里的 token 与费用是 DSH 本地统计:只包含本插件安装后、当前
$DSH_HOME捕获到的已完成assistant/message事件。它不是 DeepSeek 账号的官方用量账单; 官方余额来自/user/balance,跨 API key / 应用的消费核对请以 DeepSeek 控制台 Usage 导出为准。
📸 界面一览
| 会话头部角标(悬停查看本会话明细) | 设置 → 费用 汇总页 |
|---|---|
![]() |
![]() |
| 费用页 · Provider 收费形式 | 费用页 · 来源分组(按来源着色 + 语义色条) |
|---|---|
![]() |
![]() |
✨ 核心特性
1. 官方政策自动计价(峰谷跟随)
lib/pricing.js 内置官方价格时间表(OFFICIAL_PRICING_POLICIES),每条政策有
生效时刻(since)与单价表:
| 生效时刻(北京) | 政策 | 模型单价(¥/1M,缓存命中 / 未命中 / 输出) |
|---|---|---|
| 2025-02-09 | deepseek-chat / deepseek-reasoner 标准价 | 0.5/2/8 · 1/4/16 |
| 2026-05-22 | V4 系列 75% 降价转永久 | v4-flash 0.02/1/2 · v4-pro 0.025/3/6 |
| 2026-08-17 | 峰谷定价(高峰 09:00-12:00 / 14:00-18:00 北京时间,空闲半价) | 见下表 |
峰谷价格(¥/1M):
| 模型 | 空闲(缓存命中 / 未命中 / 输出) | 高峰(缓存命中 / 未命中 / 输出) |
|---|---|---|
| deepseek-v4-flash | 0.05 / 1.5 / 4.5 | 0.10 / 3.0 / 9.0 |
| deepseek-v4-pro | 0.15 / 4.5 / 13.5 | 0.30 / 9.0 / 27.0 |
计价语义:
- 按消息时刻取价:每条消息按其完成时刻所属的政策与峰谷时段计费;新政策 生效后自动切换,无需改配置。
- 政策链继承:新政策未点名的模型沿用最近一次被点名的价格(下架模型的历史 账单与平台一致)。
- 改价自愈:政策表或配置变化后,重启时按当前规则重估全部存量记录(以每条 消息记录的 token 数为准,不丢失历史)。
- 用户覆盖:
prices中模型精确条目覆盖官方价;*只填补官方从未点名的 模型。officialPricing: off则完全使用用户价格表。 - 可扩展时间表:官方未来调价,通过
policyOverrides在配置里追加政策即可, 无需改代码(也欢迎向lib/pricing.js提交 PR)。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →




MeteorNOX/DeepSeek-Balance-Whale-Widget
edison7009/EchoBird
Han-1413141/dsh-cost-meter
wssfk12138/dsh-damage-pulse
zh667/TokenLedger
edonadei/caliper
Ychris12138/dsh-usage-stats
Aisland-SJL/dsh-usage