D
dsh-cost-gate
v0.1.0 · 0 天前发布
Spend gate for DeepSeek Harness: refuses over-budget model calls on the llm/stream waterfall, before they are billed. Auto-downgrade past a soft limit.
README
dsh-cost-gate
Spend enforcement for DeepSeek Harness — not another dashboard.
The dsh ecosystem has plenty of cost plugins. Every one of them measures:
ledgers, statistics, heatmaps, balance widgets. They tell you what you spent
after you spent it.
This one stops the call.
┌─ over budget? ──> throw, before a single token is billed
llm/stream waterfall ─┼─ past 80%? ────> silently route to the cheap model
└─ fine? ────────> pass through, then meter the usage chunk
llm/stream is a cordis waterfall — the decision happens before next()
runs, which is the only place enforcement can actually work.
Install
```sh
dsh plugin --profile web add github:frozo-ai/dsh-budget # npm: dsh-cost-ga
版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- dsh-cost-gate
- Repo
- git+https://github.com/frozo-ai/dsh-budget.git
- Engines
{"node":">=20"}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"}}