maxwell234smith/dsh-cost-meter ↗★ 0

dsh-cost-meter

实时统计并显示你自己的 DeepSeek API 费用:跨全部会话与实验性调用,按官方闲时/忙时价区分,人民币计价。 适合需要精确监控 DeepSeek API 消费额度的用户。

패키지
dsh-cost-meter
호환성
미검증
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 9. 29.

같은 패키지 이름의 다른 저장소

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:maxwell234smith/dsh-cost-meter

配置

在 profile 的 cordis.patch.yml 里按 id 覆盖,例如:

- id: dsh-cost-meter
  name: dsh-cost-meter
  config:
    # 覆盖/新增单价(人民币 / 百万 token,忙时价)
    prices:
      deepseek-flash:
        output: 8.0
      my-proxy-model:
        cacheHitInput: 0.1
        cacheMissInput: 3.0
        output: 12.0
    # 追加自定义放假日(公司假等),北京时间 YYYY-MM-DD
    extraHolidays:
      - 2026-12-31
    # 调休上班日是否按工作日计(默认 false)
    makeupWorkdaysArePeak: false
    # 账本路径,相对 $DSH_HOME
    ledgerPath: storages/cost-meter/ledger.json
    # 浏览器取数路由
    httpPath: /cost-meter/snapshot
    # 额外允许访问取数路由的 Host(默认只允许回环地址)
    allowHosts: []
    # 是否在挂载时回填历史会话(默认 true)
    backfill: true

其它可调项:saveDebounceMs、sessionKeepDays(默认 90)、sessionKeepMax(默认 60)、snapshotSessionLimit、liveBufferLimit。