boNeXY226/dsh-cost-chip ↗★ 3

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) 核心用途是实现会话级别的 Token 累计消耗与金额统计,支持北京时间高峰/空闲分时计价。适合需要精细化监控和管理大模型 API 账单开销的用户。

Package
dsh-cost-chip
Compatibility
Unverified
Cordis peer range
^4.0.0
Version
0.1.0
License
MIT
Last updated
Aug 13, 2026

Other repositories with this package name

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full 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)。