
Security News
Rust 1.100 Will Add Dependency Cooldowns to Cargo
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.
dsh-cache-billing
Advanced tools
「DSH·缓存账单」:上下文圆环弹层里实时算账——当前步/当前轮/会话累计三块明细,缓存命中/未命中/输出各带 token 与金额,峰谷自动计价,第三方中转照常记账,专治『缓存命中率 100% 却越用越贵』
参考 dsh-meow-cachebilling 的思路重写,默认支持第三方中转与多级账单明细。
在上下文圆环弹层里实时算账,告诉你当前步、当前轮、整个会话各自花了多少钱,好让你知道什么时候该换窗口。
第三方中转照常记账,不限定 DeepSeek 官方路由。
DSH 的上下文圆环是给「上下文用了多少」看的,可真正该看的是「这花了多少钱」。缓存命中率高是好事,但上下文越长,每轮带上的缓存前缀就越贵;到了换窗口的关口,旧窗口每动一次都是给缓存付费,还未必看得到数。
所以做了这个插件,把账算到明面上:当前步、当前轮、会话累计三块账,逐笔按各自时刻的峰谷费率累加,缓存命中、未命中、输出列得清清楚楚。心里有底,才知道窗口该不该换。
哦对了,这插件不挑路由——官方也罢、SiliconFlow 这种中转也罢,只要报用量,就照样记账。中转的价格表跟官方不一样时,模型名命中价目表就按估算金额显示,宁近似,不空转。
deepseek-flash、历史旧名 deepseek-v4-flash 与 deepseek-v4-flash-vision-exp、以及 deepseek-v4.1-flash 及其带后缀变体;没命中白名单的模型仍按 Flash 价估算并标注实际运行模型名。低谷价 缓存命中 0.02 / 未命中输入 1 / 输出 4 元每百万 token,高峰翻倍,价格写在 src/index.ts。账单底部小字标注当前是峰价还是谷价,并附「按 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 后不再加载。
./client 把账单贴进官方上下文弹层。sessionProjections 实现:会话内的步、轮、会话累计三级账目都由投影层按事件时刻的费率逐笔核算,apply 返回同一引用即无变化。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 常量里,法定节假日表是同文件的 HOLIDAYS_2026,调整后重建即可。FAQs
「DSH·缓存账单」:上下文圆环弹层里实时算账——当前步/当前轮/会话累计三块明细,缓存命中/未命中/输出各带 token 与金额,峰谷自动计价,第三方中转照常记账,专治『缓存命中率 100% 却越用越贵』
We found that dsh-cache-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
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.