LightClear/dsh-token-pricing
DeepSeek Harness模型定价插件·配置token价格并显示会话费用 | DeepSeek Harness的Token定价插件——按模型设置token费率,并实时显示会话成本。
Project Overview项目介绍
dsh-token-pricing is a community-maintained unofficial native plugin built exclusively for DeepSeek Harness’s web interface. Its core function is to calculate and display token usage costs per model and provider, with configurable separate rates for cache miss input, cache hit input, and output tokens. It also supports custom peak pricing for multiple flexible time windows, and shows session costs across multiple different views for users to review. Before installation, you need to have Node.js 22 or newer, pnpm, and a working DSH installation set up on your machine. You can install it directly via the official DSH CLI to your web profile, or pull a specific branch or commit from the git repository for installation.
After installation, you can configure your model pricing in the Settings > Model Pricing page of DSH. Once configured, DSH will show the current session’s total cost at three different places: the bottom data bar of the dialog, a collapsible and draggable floating window, and a global cost dashboard accessible from the sidebar. The floating window supports two views: cost per turn and cost per model. The global dashboard covers all projects and conversations, not just the active session, and can group costs by project or by model, with full CSV export of any current view. All cost data is persisted with the session and retained after archiving, and any changes to pricing will automatically recalculate all historical session costs.
This plugin only declares two direct runtime dependencies, schemastery and zod. All other DSH-related dependencies are provided by the base DSH installation, so no extra internal packages are pulled during installation. The plugin does not modify any prompt content, tool schemas, or messages sent to the model, it only displays existing persistent usage data collected by DSH. It is released under the permissive open-source MIT license, and currently only supports pricing in USD. The project roadmap includes adding support for multiple currencies and automatic exchange rate conversion in future updates.
dsh-token-pricing 是一款由社区维护的非官方 DeepSeek Harness 原生插件,核心功能是为 DSH Web 界面提供按提供方和模型的 token 计价与会话费用统计。它支持配置未命中输入、缓存命中输入、输出三种 token 的基础价格,还可自定义多时段高峰定价规则,能从多个维度查看会话费用数据。
安装需要满足前置环境要求:Node.js ≥ 22、pnpm 以及已安装好的 DSH,可通过官方 DSH CLI 一键安装到 web profile,也支持从 git 源安装特定分支或提交。安装完成后可在「设置→模型定价」中配置各模型价格,对话时就能在界面查看实时费用统计。费用数据会随会话持久化存储,归档后也会保留,修改价格后会自动重算历史费用。
本插件提供三种费用展示入口:对话框底部数据栏、可折叠拖拽的浮窗(支持按轮和按模型两种计价视图),还有跨全部项目和对话的全局费用统计面板,支持 CSV 导出数据。插件仅依赖 schemastery 和 zod 两个运行时包,其余依赖由 DSH 本身提供,遵循 MIT 许可开源发布。目前仅支持美元计价,未来计划增加多货币和自动汇率功能。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-token-pricing(LightClear/dsh-token-pricing)
仓库:https://github.com/LightClear/dsh-token-pricing
本站详情页:https://www.yhbd.top/plugins/lightclear-dsh-token-pricing/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-25 · 主语言 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 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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-token-pricing
把 LightClear/dsh-token-pricing 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-token-pricing
中文 | English
dsh-token-pricing是一款第三方(非官方)插件,由社区维护,与 deepseek-ai 官方发布无关。
Web 界面的按提供方/模型 token 定价:按提供方/模型配置美元价格(未命中输入、缓存命中输入、输出,以及可在任意多个高峰时段内生效的高峰价格档),并在三个表面查看会话费用——底部数据栏,以及一个可折叠可拖拽的浮窗(「按轮计价」与「按模型计价」两种视图)。按轮用量由 tokenPricing 投影从会话日志派生,随会话持久化、随归档一并保留。node 半身注册设置命名空间与投影单元,其余全部复用现有 Host 服务。
安装
前置:Node ≥ 22、pnpm、可用的 dsh 安装(官方 CLI npm i -g @deepseek-ai/dsh,或源码启动 pnpm dsh)。
# 1. 安装到 web profile(自动初始化 profile、安装依赖、注册补丁层)
dsh plugin --profile web add dsh-token-pricing
# 2. 启动(已在运行则重启后生效)
dsh web
dsh plugin add 走官方插件机制:把本包装进 $DSH_HOME/profiles/web/ 的依赖 → 依据 dsh.bundle 声明加入 profile 补丁层 → 补丁层的一行 row 同时挂载 node 半身(Host)与浏览器半身(dsh.client 扫描)。本包只声明两个自用运行时依赖(schemastery、zod);其余 @deepseek-ai/dsh-* 由 dsh 安装本身提供(官方机制的双锚点解析),因此安装不会拉取任何内部包。
验证安装:启动后打开 设置 → 模型定价 配置价格;右下角出现费用小球,对话底部数据栏显示费用读数。
更新与卸载:
dsh plugin --profile web update dsh-token-pricing
dsh plugin --profile web remove dsh-token-pricing
npm 之外,也可用 git 源安装(装某个分支/提交;仓库内已提交构建好的 lib/):
dsh plugin --profile web add github:LightClear/dsh-token-pricing
注意事项:
- 若 profile 中已存在 id 为
token-pricing的插件行,安装后会产生冲突——移除其一即可。 - 若需要把插件直接编译进 harness 主仓库(开发/集成),见 INTEGRATION.md。
功能亮点
配置模型价格与高峰时段规则

设置 → 模型定价 把模型目录按提供方分组为卡片,每个模型带已配置/未配置圆点。展开某个模型打开编辑器,自动载入已存配置,可编辑三档基础费率——输入未命中、输入命中、输出(美元/每百万 token)——以及高峰期计价规则:启用高峰定价后,可按需增删任意多个高峰时段(添加高峰时段 / 删除时段),全部时段共享一套高峰费率。默认只有一段,时段支持跨午夜(22:00–08:00),当前时间落入任一时段即按高峰价计费。
会话底部数据栏的实时费用

对话框底部数据栏在出厂统计行旁显示会话的 输入 $X · 输出 $Y · 总计 $Z。每一步按自身时间、在其派发路由下计价,读数对每个已计价步骤求和,因此与浮窗总计永远一致;未配置计价路由的用量不计入该数字。
可折叠、可拖拽的费用浮窗

折叠态是小球形状,显示当前会话的累计费用;点击小球展开面板。

展开态面板包含两个视图切换页签与底部总计栏。标题栏(顶部)与总计栏(底部)都是拖拽区域。
按轮计价与按模型计价
悬浮窗提供两种计价方式:按对话轮数计价与按模型计价。

「按轮计价」按对话轮次列出每轮(轮次号与开始时间)使用的路由、token 数与费用;一轮中途切换模型时按路由拆分为多行。

「按模型计价」按会话中使用过的所有模型聚合 token 数与费用,按首次使用顺序排列。两种视图中,未配置计价规则的模型仍显示 token 数并提示 未设置计价。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Han-1413141/dsh-cost-meter
wssfk12138/dsh-damage-pulse
songoao25/dsh-bottom-info-bar
Phant0Meow/dsh-meow-cachebilling
Rianico/dsh-better-edit
Ghost011118/dsh-balance-meter
ai-shushu/dsh-quota-meter
TwotwoPiggy/dsh-balance