SanChou0627/dsh-token-bill ↗★ 0

dsh-token-bill

Live DeepSeek balance plus per-hour token costing for DSH: two agent tools, hourly bar charts, and Markdown/HTML/JSON statements. 适合需要精确监控DeepSeek API余额及Token花费的用户。

패키지
dsh-token-bill
호환성
미검증
Harness peer 범위
*
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 9. 28.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SanChou0627/dsh-token-bill

Configuration

Add a config block to the plugin's row in your profile's cordis.patch.yml:

- id: token-bill
  name: dsh-token-bill
  config:
    costMode: ledger        # ledger | token | both
    decimals: 4             # decimals used in printed amounts
    chartWidth: 26          # bar width in terminal charts
    historyDays: 1          # days included in the per-day summary
    writeFiles: true        # set false to never write statements
    timeoutMs: 10000        # live balance request timeout
    outDir: !!js dshHomePath('token-bill')
    sessionsRoot: !!js dshHomePath('sessions')
    # Override or extend the price table (CNY per million tokens):
    # models:
    #   my-model: { hit: { off: 0.01, peak: 0.02 }, miss: { off: 1, peak: 2 }, out: { off: 4, peak: 8 } }
    # Extra statutory holidays, billed at the valley rate all day:
    # holidays: ['2027-01-01']
FieldDefaultMeaning
dshHome$DSH_HOME or ~/.dshDSH home directory.
profile$DSH_PROFILE or webProfile whose in-profile ledger path is also checked.
sessionsRoot/sessionsRoot of the session logs.
outDir$DSH_TOKEN_BILL_DIR or /token-billStatement output directory.
decimals4Decimal places in printed amounts.
chartWidth26Bar width for terminal charts.
costModeledgerMoney source, as above.
historyDays1Days in the per-day summary.
maxBytes134217728 (128 MB)Skip any single session log larger than this.
timeoutMs10000Balance request timeout.
writeFilestrueWhether statements may be written.
modelsbuilt-in tablePrice table override.
holidaysHOLIDAYS_2026Statutory holiday day keys billed at the valley rate.