wei2yun/dsh-api-cost ↗★ 1

dsh-api-cost

Shows what a DeepSeek Harness session's API token usage costs, priced from the provider-reported usage of every settled model call. 适合需要监控和统计DSH会话中API调用Token消耗及费用的用户。

패키지
dsh-api-cost
호환성
미검증
버전
1.0.1
라이선스
MIT
최근 업데이트
2026. 10. 22.

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

설치

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

Configuration

Set the row's config in your profile's cordis.patch.yml (the Web profile reloads it live; other profiles apply it on restart):

- id: api-cost
  config:
    currency: CNY          # CNY (¥) | USD ($)
    peakPricing: auto      # auto | peak | offPeak
    prices:
      deepseek-flash:
        input: 1
        cacheRead: 0.02
        cacheWrite: 0
        output: 4
        peak:
          input: 2
          cacheRead: 0.04
          output: 8
FieldDefaultMeaning
currencyCNYSelects the built-in price book and the symbol.
peakPricingautoauto applies the Beijing peak windows; peak/offPeak bill every call at one rate.
offPeakDates[]Extra statutory-holiday dates (YYYY-MM-DD, Beijing time) billed at the off-peak rate; 2026 is built in.
prices{}Per-model overrides in the configured currency, per 1M tokens. A key is a bare model for any provider route, or provider/model for one exact route. An entry replaces that model's whole price set; a peak block overrides only the fields it sets, and the rest fall back to the entry's base price.

Overrides are how you track a promotional price, a self-hosted endpoint, or a provider the built-in book does not know. Prices and currency only affect presentation: changing them re-prices existing history, it does not rewrite it.