dsh-cost-chip
DSH 配置插件:提供 /cost 命令统计当前会话 Token 消耗与估算费用,并带分时计价悬浮窗。
AI 分析
核心用途是实现会话级别的 Token 累计消耗与金额统计,支持北京时间高峰/空闲分时计价。适合需要精细化监控和管理大模型 API 账单开销的用户。
安裝
此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗
說明文件
閱讀完整 README ↗配置(全部可选)
在 profile 的 cordis.patch.yml 中按需覆盖:
- id: command-cost
config:
currencySymbol: '¥' # 默认 ¥
exchangeRate: 0.14 # 可选,填了额外显示 ≈ USD 行
timeZone: 'Asia/Shanghai' # 计费时段所用时区(北京时间)
peakRanges: [[9, 12], [14, 18]] # 高峰时段(小时,半开区间 [start, end))
peakEffectiveAt: '2026-08-17T00:00:00+08:00' # 分时价生效时刻(ISO 8601)
perMTok: # 覆盖 fallback 行(原价档)
input: 2
cacheRead: 0.5
output: 3
models: # 按 model id 或 provider 名精确匹配
deepseek-v4-pro:
input: 3
cacheRead: 0.025
output: 6
peak: { input: 9, cacheRead: 0.3, output: 27 }
offPeak: { input: 4.5, cacheRead: 0.15, output: 13.5 }
价格行解析顺序:models[model] → models[provider] → perMTok(fallback)。
某行缺 peak/offPeak 时该模型永远按原价计(如 deepseek-chat / reasoner)。