Jolly-J/dsh-deepseek-billing 预览 preview

Jolly-J/dsh-deepseek-billing

DSH WebUI 插件:DeepSeek 余额显示与按会话费用估算

Project Overview项目介绍

This is a native plugin built exclusively for the web version of DeepSeek Harness (DSH). It adds a permanent balance card to the bottom of DSH's left sidebar that displays your DeepSeek account balance and the total cost accumulated in the current chat session. You don't need to navigate away from the DSH interface or open the official billing page to check your spending, you can monitor your costs at a glance directly within DSH. The card shows a compact summary by default, and clicking it expands to show additional details like token usage breakdown, cache hit rate, cost subtotals, and current DeepSeek pricing information.

There are three supported installation methods for this plugin. The most recommended way is to search for it directly in the DSH plugin market inside DSH web, click install, and restart dsh web after installation completes. You can also install it via a single command line: dsh plugin --profile web add https://github.com/Jolly-J/dsh-deepseek-billing.git, then restart dsh web. The third option is to send the repository link to your DSH agent and ask it to run the install command for you. After installation, the plugin auto-refreshes balance and usage data every 60 seconds, and you can manually refresh at any time via the refresh button on the card.

The plugin uses the same API key that you already have configured in DSH for DeepSeek calls, so no extra configuration is needed. It never stores or shares your API key; the key is only held temporarily in process memory when calling DeepSeek's official balance endpoint, and discarded immediately after the request. The session cost is calculated per request following DeepSeek's official pricing rules, including peak/off-peak pricing and model-specific rates. The displayed cost is an estimate for reference, and the official account balance is the source of truth. The plugin is open source under the MIT license, and currently only has a Chinese user interface.

这是一款专门为 DeepSeek Harness (DSH) 网页版开发的原生插件,用于在左侧边栏底部常驻显示 DeepSeek 账户余额以及当前会话的累计花费。用户无需跳转页面查询官方账单,就能一眼掌控自己的消费情况。插件默认显示一行简洁摘要,点击可展开查看充值余额、token 明细、缓存命中率、费用小计以及当前费率说明等详情。

面向关心 DeepSeek API 消费成本的 DSH 网页版用户,该插件提供三种安装方式:可在 DSH 插件市场搜索安装,可通过一行命令行安装,也可以直接让 DSH 智能体完成安装,安装后仅需重启 dsh web 即可使用。插件每 60 秒自动刷新一次数据,也支持手动点击刷新,切换会话时数据自动更新,侧边栏收起时会自动隐藏,不会占用界面空间干扰使用。

插件使用用户当前 DSH 配置的同一 API Key 调用官方接口获取余额,不会存储或泄露密钥,密钥仅临时存在进程内存中,不会落盘或出现在日志中。费用计算遵循 DeepSeek 官方分时段分模型的峰谷定价规则,逐条请求计价累加,为估算参考值,最终账单以官方余额为准。插件开源遵循 MIT 协议,目前仅支持中文界面,暂不汇总子代理会话费用。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
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 https://github.com/Jolly-J/dsh-deepseek-billing.git

把 Jolly-J/dsh-deepseek-billing 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-deepseek-billing

Awesome DSH Plugin

给 DeepSeek Harness(DSH)网页版装一个余额小卡片:左侧边栏底部常驻显示你的 DeepSeek 账户余额,以及当前会话花了多少钱。不用翻网页、不用开账单,一眼看住钱包。

效果图

DSH 余额卡片 封面图
实际页面截图 1 实际页面截图 2
实际页面截图 1 实际页面截图 2

卡片能做什么:

  • 一行摘要:状态点 · 余额:¥xx.xx元 · 会话:¥x.xxx · 刷新按钮 · 展开箭头;
  • 点击展开详情:充值/赠送余额、token 明细(输入/缓存命中/输出)、缓存命中率、输入与输出费用小计、当前费率说明(标注"估算,非账单");
  • 数字变化时是滚动动画;切换会话自动跟着变;
  • 侧边栏收起(窄栏)时自动隐藏,不挡东西;
  • 每 60 秒自动刷新一次,也可以随时点刷新按钮。

安装(选一种就行)

方式一:插件市场(最推荐)

在 DSH 网页版里打开插件市场(dsh-market),搜索 dsh-deepseek-billing,点安装。装完重启 dsh web 即可。

方式二:一条命令

dsh plugin --profile web add https://github.com/Jolly-J/dsh-deepseek-billing.git

装完重启 dsh web(lib/ 产物已随仓库提交,无需本地构建)。

方式三:让 AI 帮你装

把本仓库地址发给你的 DSH 智能体,对它说一句:

帮我把这个插件装到我的 DSH 里:<仓库地址>

智能体只需执行上面的官方 dsh plugin add 命令并提示你重启 dsh web,不需要修改 DSH 源码。

更新

dsh plugin --profile web update dsh-deepseek-billing

更新后重启 dsh web。

计费是怎么算的

卡片上的「会话费用」是逐条请求计价、滚动求和,而不是"把所有 token 加成一个总数,再乘以一个当前费率"。它也不保存按模型或时段的明细分桶,只给你一个会话总额——但总额的每一分钱,都来自对每条回复的独立计价。

每一条成功的助手回复,按它自己的三个属性计一次价:

  1. 模型家族:回复所用模型属于 Flash 系列(含 deepseek-flash 与仍在路由的旧名 deepseek-v4-flash、deepseek-v4-flash-vision-exp)就用 Flash 价表;其它模型(含无法识别的)按 Pro 价表计。官方自 2026-09-14 12:00(北京时间)起把 deepseek-v4-pro 的请求全部路由到 V4.1-Flash,插件从同一时刻起也改按 Flash 价表计它;
  2. 时间时段:按北京时间的官方调价节点分段——2026-08-17 00:00 之前按旧价表(不分峰谷);2026-08-17 00:00 起启用峰谷定价,高峰为 9:00–12:00、14:00–18:00,当时不分工作日与周末;2026-09-10 12:00 起 Flash 系列降价,高峰同时收窄为工作日的 9:00–12:00、14:00–18:00,周末与其余时段一律算空闲时段;
  3. Token 明细:缓存命中、未命中输入、输出三类 token 各用各的费率。

单条回复的计价公式:

费用 = (未命中输入 × 未命中费率 + 缓存命中 × 命中费率 + 输出 × 输出费率) ÷ 1,000,000

内置价表(元 / 百万 token,生效时间均为北京时间):

模型 生效时间 时段 缓存命中 未命中输入 输出
DeepSeek-V4.1-Flash 2026-09-10 12:00 起 空闲(含周末) 0.02 1.0 4.0
DeepSeek-V4.1-Flash 2026-09-10 12:00 起 高峰(工作日) 0.04 2.0 8.0
DeepSeek-V4-Flash 2026-08-17 00:00 起 空闲 0.05 1.5 4.5
DeepSeek-V4-Flash 2026-08-17 00:00 起 高峰(每天) 0.10 3.0 9.0
DeepSeek-V4-Flash 2026-08-17 之前 不分峰谷 0.02 1.0 2.0
DeepSeek-V4-Pro 2026-08-17 之前 不分峰谷 0.025 3.0 6.0
DeepSeek-V4-Pro 2026-08-17 00:00 起 空闲 0.15 4.5 13.5
DeepSeek-V4-Pro 2026-08-17 00:00 起 高峰(工作日) 0.30 9.0 27.0

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-specflow 下一个 Next apaper-plugin →