dsh-cost-chip
dsh profile plugin: /cost — cumulative token usage and estimated monetary cost for the current session, plus a floating web UI cost chip (peak/off-peak time-of-day pricing)
AI 분석
核心用途是实现会话级别的 Token 累计消耗与金额统计,支持北京时间高峰/空闲分时计价。适合需要精细化监控和管理大模型 API 账单开销的用户。
설치
검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 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)。