dsh-cost-saver
DeepSeek Harness 的省钱伴侣插件,提供峰谷时间建议、缓存命中分析、预算上限告警及实时成本面板。
AI 分析
核心用途是实时监控和控制 Token 消耗成本,支持单会话/每日/每月预算限制与告警。适合对 API 账单敏感、需要精细化管理大模型调用预算的个人或团队用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:iiiweiii/dsh-cost-saver說明文件
閱讀完整 README ↗配置
全部可选,编辑 ~/.dsh/profiles/web/cordis.patch.yml 中 cost-saver 一节的 config:
- insert:
- id: cost-saver
name: dsh-cost-saver
config:
currency: USD # USD | CNY
peakHours: [[9, 12], [14, 18]]
peakOffpeakRatio: 2 # 闲时价 = 高峰价 / 该比值
prices: # 覆盖模型价格(USD / 1M tokens)
deepseek/deepseek-v4-flash:
input: 0.15
output: 0.29
cacheRead: 0.02
cacheWrite: 0.15
budgets:
session: 10 # 单会话预算上限(USD)
daily: 50
monthly: 500
warnRatio: 0.8 # 达到预算 80% 时告警
overLimit: alert # alert | block
webhookUrl: "" # 可选告警 webhook(POST JSON)