boNeXY226/dsh-cost-chip0

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 账单开销的用户。

パッケージ
dsh-cost-chip
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/13

インストール

検証済み 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)。