spoon-man569/dsh-token-price

spoon-man569★ 2TypeScriptLast synced: 2026-08-15

Open on GitHub

DSH 实时 Token 花费与账户余额显示插件(每轮花费 · 总花费 · 余额)

README excerpt

dsh-token-price English 汉语 Live token cost + account balance readouts for the DeepSeek Harness Web chat UI. What it shows - Per-turn cost — a ¥ figure after each assistant reply's stats line ( 01:27 · 用时 · 首 token · tok/s ), revealed on the same hover. - Total cost — the running session cost under the composer's stats line, summed per turn at each turn's own peak/off-peak rate. - Account balance — your DeepSeek account balance (CNY) from GET /user/balance . Prices are the official DeepSeek USD rates (peak/off-peak, cache-hit aware) bundled in src/prices.ts ; the browser converts to ¥ with a live USD→CNY rate. Install One command (requires pnpm): The package declares dsh.bundle + dsh.client , so this installs and activates both halves in one step: the host half (balance service + tokenCost projection) and the browser half (the readouts). Configuration balanceApiKeyEnv names the credential holding your DeepSeek API key (the same one the dsh-llm-deepseek adapter uses). The balance reads "未获取" until the key is set; failures are logged with ctx.logger . Pricing Per-model prices ( src/prices.ts / prices.json ) mirror the official page (Models & Pricing): - schema v2, USD per 1M tokens, w…

View full README on GitHub →
Tools / Devdsh-plugin

Category