DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Cache Billing — DSH Plugin for DeepSeek Harness
← Plugins
C

dsh-cache-billing

Cache Billing

Cache Billing: Real-time billing in the context ring overlay—with separate details for the current step, current round, and session total; tokens and costs shown for cache hits, cache misses, and output; automatic peak/off-peak pricing; third-party relay usage is billed as usual. Addresses the issue

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:better-er/dsh-cache-billing#f2c77508732877428575d4aeb57704cc17b238d2
READMECompatibilityVersions

Description

Cache Billing: Real-time billing in the context ring overlay—with separate details for the current step, current round, and session total; tokens and costs shown for cache hits, cache misses, and output; automatic peak/off-peak pricing; third-party relay usage is billed as usual. Addresses the issue of “100% cache hit rate but increasing costs with continued use.”

Compatibility and provenance

Cache Billing is published as dsh-cache-billing and currently resolves to version 0.1.2. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/11/2026

Versions

0.1.2stable
9/11/2026
0.1.1stable
9/3/2026
0.1.0stable
8/28/2026

Related plugins

Loading related plugins…

Latest
0.1.2
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 6
Weekly downloads
0
Last push
9/11/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in models-usage.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with the current session provider's today usage on the sidebar entryWhale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinUsage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.

README

dsh·缓存账单插件

参考 dsh-meow-cachebilling 的思路重写,默认支持第三方中转与多级账单明细。

在上下文圆环弹层里实时算账,告诉你当前步、当前轮、整个会话各自花了多少钱,好让你知道什么时候该换窗口。

第三方中转照常记账,不限定 DeepSeek 官方路由。

引言

DSH 的上下文圆环是给「上下文用了多少」看的,可真正该看的是「这花了多少钱」。缓存命中率高是好事,但上下文越长,每轮带上的缓存前缀就越贵;到了换窗口的关口,旧窗口每动一次都是给缓存付费,还未必看得到数。

所以做了这个插件,把账算到明面上:当前步、当前轮、会话累计三块账,逐笔按各自时刻的峰谷费率累加,缓存命中、未命中、输出列得清清楚楚。心里有底,才知道窗口该不该换。

哦对了,这插件不挑路由——官方也罢、SiliconFlow 这种中转也罢,只要报用量,就照样记账。中转的价格表跟官方不一样时,模型名命中价目表就按估算金额显示,宁近似,不空转。

功能

  • 第三方中转也认:不限定 DeepSeek 官方路由,provider 非空即显示,模型名命中价目表就按估算金额计价。凭空 provider 的路由不会显示。
  • 三块计时级别:从上到下依次是当前步、当前轮、会话累计。当前步是单次 API 调用,当前轮是本轮内多步累加,会话累计带步数。每块一行标题带总额与总 token,下面缩进细列缓存命中、缓存未命中、输出三行,各带 token 数与金额。
  • 会话累计:整会话的累计花费,逐笔按各自事件时刻的峰谷费率累加,跨轮不比价。会话块还有缓存失效统计:缓存失效次数与完全失效次数,部分中转会报写入量,一并显示。
  • 峰谷计价自动判定:工作日高峰时段北京时间 09:00–12:00、14:00–18:00 按峰价,其余时段及周六日全天按谷半价。与系统时区无关,纯事件时刻换算。
  • 单一模型计价与显示:只按 DeepSeek-V4.1-Flash 计价,界面统一显示「按 DeepSeek-V4.1-Flash 计价」。模型名认官方现名 deepseek-flash、历史旧名 deepseek-v4-flash 与 deepseek-v4-flash-vision-exp、以及 deepseek-v4.1-flash 及其带后缀变体;没命中白名单的模型仍按 Flash 价估算并标注实际运行模型名。低谷价 缓存命中 0.02 / 未命中输入 1 / 输出 4 元每百万 token,高峰翻倍,价格写在 src/index.ts。
  • 金额精度分级别:步四位小数、轮三位、会话两位,尾零不省,便宜到 0.0001 也看得出不是零。

账单底部小字标注当前是峰价还是谷价,并附「按 DeepSeek-V4.1-Flash 计价」;模型名没命中白名单时小字改为「估算」并标注实际运行模型。

效果

点开输入框右侧的上下文圆环,弹层底部就是账单,跟「上下文用了多少」同屏对看:

效果预览

安装

从 GitHub 安装:源码在 src/,lib/ 不入仓库,安装时 npm 会触发 prepare 脚本现场构建。

dsh plugin --profile web add github:better-er/dsh-cache-billing

从 npm 安装:包内已含构建产物 lib/index.js 与 lib/client.js,安装时不再构建。

dsh plugin --profile web add dsh-cache-billing

两种方式装完都会自动挂载,重启 DSH web 后启用,无需手工编辑任何文件。

卸载

dsh plugin --profile web remove dsh-cache-billing

彻底移除,重启 DSH web 后不再加载。

要求与开发

  • 是标准形态的 dsh 主机加客户端双半身插件:host 投影层在服务端折叠事件记账,./client 把账单贴进官方上下文弹层。
  • host 侧用 sessionProjections 实现:会话内的步、轮、会话累计三级账目都由投影层按事件时刻的费率逐笔核算,apply 返回同一引用即无变化。
  • host 侧由 src/index.ts 经 esbuild 构建到 lib/index.js,client 侧由 src/client.ts 构建到 lib/client.js;package.json 声明 dsh.client.platform: "web"、exports["./client"] → ./lib/client.js,改源码后执行 npm run build 重建。
  • 账目只认 usage 的 input / cacheRead / cacheWrite / output 四类 token,本地估算,实际扣费以账单为准。
  • 价格、峰谷时段、模型名白名单与显示名都写在 src/index.ts 的 MODEL 常量里,调整后重建即可。

License

MIT