doublemolu/dsh-costometer ↗★ 1

dsh-costometer

花知多少 · Cost-O-Meter — DeepSeek Harness cost & balance meter: account balance, recharge history, per-conversation spend/tokens, segmented progress bar, recharge button, low-balance guard, 8 languages & currencies. 核心用途是多币种、多维度的 API 费用审计。适合对预算控制要求高、使用多模型或跨国货币结算的用户。支持低余额警报与实时刷新。

Package
dsh-costometer
Compatibility
Unverified
Version
1.2.8
License
MIT
Last updated
Sep 1, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

Usage

Sidebar stateWhat you see
Wide sidebarFull card: balance, granted/topped-up split, latest call usage, conversation total, model-call count, segmented progress bar, recharge button
Collapsed rail (56px)Small status dot (green / amber / red) with a tooltip summary
  • Balance refreshes every 15s; conversation totals every 8s (cached fold of the session log). Use the ⟳ button on the card to refresh immediately.
  • Click 充值 ↗ to open .
  • Hover the progress bar to see 剩余 ¥xx / 充值 ¥xx; hover 本会话累计 to see per-model breakdown.
  • A ▼/▲ ¥xx indicator next to the balance shows recent changes; the card footer shows the last refresh time.

Configuration (v1.1.0+)

All tunables live in $DSH_HOME/dsh-costometer.json (auto-generated with defaults on first run). Edit and save — the plugin picks changes up within ~10s.

{
  "segmentBase": 50,
  "redThreshold": 15,
  "warnLow": 10,
  "warnDanger": 3,
  "fxCny": 7.1,
  "lang": "zh-CN",
  "currency": "CNY",
  "prices": {
    "deepseek-v4-flash": { "peak": { "in": 3.0, "inHit": 0.10, "out": 9.0 }, "off": { "in": 1.5, "inHit": 0.05, "out": 4.5 } },
    "deepseek-v4": { "peak": { "in": 3.0, "inHit": 0.10, "out": 9.0 }, "off": { "in": 1.5, "inHit": 0.05, "out": 4.5 } },
    "deepseek-chat": { "peak": { "in": 2.0, "inHit": 0.20, "out": 3.0 }, "off": { "in": 1.0, "inHit": 0.10, "out": 1.5 } },
    "deepseek-reasoner": { "peak": { "in": 4.0, "inHit": 1.0, "out": 16.0 }, "off": { "in": 2.0, "inHit": 0.5, "out": 8.0 } }
  }
}
KeyMeaningDefault
segmentBaseProgress-bar segment amount (yuan)50
redThresholdRightmost segment turns red below this (yuan)15
warnLow / warnDangerLow-balance alert thresholds (yuan)10 / 3
fxCnyOnly used for the secondary approximate USD figure of cost estimates (estUsd); costs themselves are priced directly in CNY7.1
langUI language: zh-CN / zh-TW / en-US / en-GB / de / ja / ko / ruzh-CN
currencyDisplay currency: CNY / TWD / USD / GBP / EUR / JPY / KRW / RUB (auto-updated rates against CNY)CNY
ratesBuilt-in fallback exchange rates (1 CNY → currency); live rates auto-fetch from a free API (multi-endpoint fallback), 6h cache, zero token costbuilt-in
pricesOfficial CNY peak/off-peak pricing per model, per million tokens (peak / off sets)official