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.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗Usage
| Sidebar state | What you see |
|---|---|
| Wide sidebar | Full 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
▼/▲ ¥xxindicator 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 } }
}
}
| Key | Meaning | Default |
|---|---|---|
segmentBase | Progress-bar segment amount (yuan) | 50 |
redThreshold | Rightmost segment turns red below this (yuan) | 15 |
warnLow / warnDanger | Low-balance alert thresholds (yuan) | 10 / 3 |
fxCny | Only used for the secondary approximate USD figure of cost estimates (estUsd); costs themselves are priced directly in CNY | 7.1 |
lang | UI language: zh-CN / zh-TW / en-US / en-GB / de / ja / ko / ru | zh-CN |
currency | Display currency: CNY / TWD / USD / GBP / EUR / JPY / KRW / RUB (auto-updated rates against CNY) | CNY |
rates | Built-in fallback exchange rates (1 CNY → currency); live rates auto-fetch from a free API (multi-endpoint fallback), 6h cache, zero token cost | built-in |
prices | Official CNY peak/off-peak pricing per model, per million tokens (peak / off sets) | official |