dsh-turn-cost
在每条已完成的对话下方显示本轮 token 用量、估算费用与 DeepSeek 余额 / Show per-turn token usage, estimated cost, and DeepSeek balance under every completed turn. 适合需要精确监控每轮对话成本、峰谷计价及DeepSeek余额的用户。
Other repositories with this package name
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:YuGaN525/DSH-token-adminREADME
Read the full README ↗配置
配置写在 cordis.patch.yml 的 config:,或安装后的 profile patch 里(按 id dsh-turn-cost 覆盖)。
| 键 | 默认 | 说明 |
|---|---|---|
refreshSeconds | 30 | 余额缓存时间(秒),也是浏览器刷新余额的 TTL |
balanceSource | auto | auto = 先账号后 API key;account / apikey 强制单路 |
pricing.currency | CNY | 费用显示币种;余额按接口返回币种单独显示 |
pricing.peakMultiplier | 2 | 峰时价格倍率 |
pricing.peakWindows | [[540,720],[840,1080]] | 峰时窗口(当地分钟数,09:00–12:00、14:00–18:00) |
pricing.weekendValley | true | 周末按谷时计价 |
pricing.holidays | 2026 法定节假日 | 节假日全天谷时;每年安排公布后补下一年的日期 |
pricing.timeZone | Asia/Shanghai | 判断峰谷用的 IANA 时区 |
pricing.defaultModel | flash | 未匹配到模型时使用的价位 |
pricing.models | flash / pro 两档 | 每档 cacheHit、cacheMiss、output,单位为 元/百万 token |
覆盖示例:
- id: dsh-turn-cost
config:
refreshSeconds: 60
pricing:
models:
flash:
cacheHit: 0.02
cacheMiss: 1
output: 4
pro:
cacheHit: 0.15
cacheMiss: 4.5
output: 13.5
只写一个字段也会与默认值合并,例如只改 flash.cacheHit 不会把 cacheMiss / output 清零。