121212165/dsh-plugin-cache-guard ↗★ 0

dsh-plugin-cache-guard

dsh plugin: prefix-cache health guard. Separates prefix rewrites from ordinary context growth using the three disjoint usage buckets, and estimates the tokens re-billed at full price. 适合需要优化大模型上下文缓存和控制API成本的用户。

Package
dsh-plugin-cache-guard
Compatibility
Unverified
Cordis peer range
>=4.0.0
Version
0.2.0
License
MIT
Last updated
Oct 1, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:121212165/dsh-plugin-cache-guard

配置

字段默认说明
window8基线滑动窗口(同时也是"最近"的跨度)
factor2.5大小闸:未缓存基线倍数
floorTokens1500大小闸:绝对地板(正常增长不误报)
collapseRatio0.25形状闸:cacheRead 低于自身基线该比例算塌陷
collapseMinBaseline2000形状闸:基线低于此值不判塌陷(不报缓存的 provider 不误伤)
rebillShare0.6归因闸:重计量需达到上一步 prompt 的该比例
adviseModeltrue上下文内提醒