@kenz1117/dsh-ui-usage-billing 1.1.14 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +42 -24
- package/README.md +37 -32
- package/lib/client.js +5 -5
- package/lib/index.js +556 -59
- package/lib/types/aggregate.d.ts +96 -33
- package/lib/types/client/PerfPanel.d.ts +10 -8
- package/lib/types/client/TokenPanel.d.ts +51 -3
- package/lib/types/client/apply.d.ts +10 -3
- package/lib/types/client/budget-store.d.ts +1 -1
- package/lib/types/client/completion-notify.d.ts +2 -2
- package/lib/types/client/live-cost.d.ts +19 -9
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/client/pricing.d.ts +60 -8
- package/lib/types/client/provider-display.d.ts +7 -0
- package/lib/types/client/usage-billing-settings.d.ts +42 -0
- package/lib/types/index.d.ts +25 -1
- package/lib/types/subscriptions.d.ts +2 -0
- package/lib/types/tc3.d.ts +60 -0
- package/package.json +50 -24
package/README.en.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<a href="https://github.com/kenz1117/dsh-ui-usage-billing/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/kenz1117/dsh-ui-usage-billing?logo=github"></a>
|
|
9
9
|
<a href="https://www.npmjs.com/package/@kenz1117/dsh-ui-usage-billing"><img alt="npm version" src="https://img.shields.io/npm/v/@kenz1117/dsh-ui-usage-billing?logo=npm"></a>
|
|
10
10
|
<a href="https://www.npmjs.com/package/@kenz1117/dsh-ui-usage-billing"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@kenz1117/dsh-ui-usage-billing?logo=npm"></a>
|
|
11
|
+
<a href="https://github.com/kenz1117/dsh-ui-usage-billing/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/kenz1117/dsh-ui-usage-billing/actions/workflows/ci.yml/badge.svg"></a>
|
|
11
12
|
<a href="https://github.com/kenz1117/dsh-ui-usage-billing/blob/main/LICENSE"><img alt="License MIT" src="https://img.shields.io/github/license/kenz1117/dsh-ui-usage-billing"></a>
|
|
12
13
|
<a href="https://github.com/kenz1117/dsh-ui-usage-billing/pulls"><img alt="PRs welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen"></a>
|
|
13
14
|
<a href="https://github.com/kenz1117/dsh-ui-usage-billing"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/kenz1117/dsh-ui-usage-billing?logo=github"></a>
|
|
@@ -21,12 +22,6 @@
|
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
24
|
-
> **Rate-table display update (2026-08-27)**: the models.dev supplement is **no longer rendered in full** — the rate table previously listed all ~5900 models from 158 gateway providers, drowning out the ones actually in use. The table now contains only the built-in catalog plus probed (configured and reachable) models. Billing is unaffected: models outside the catalog but priced on models.dev are still estimated at their official USD prices when hit; they just no longer appear in the table.
|
|
25
|
-
|
|
26
|
-
> **Qwen family pricing update (2026-08-27)**: aligned with the latest Alibaba Cloud Model Studio list prices — **Qwen3.7-Max** corrected to official list price (input ¥12 / explicit-cache hit ¥1.2 / output ¥36, previously recorded at the discounted promo rate). The current official 50%-off promotion has **no announced end date**: the rate table shows the discounted price with a red promo badge (hover for details), and resumes list-price display once an end date is filled in after the announcement. The Qwen family also gains **supplementary pricing reference rows** (Batch File standing half-price tier, Batch Chat, explicit-cache create/hit — display-only, excluded from estimation); Qwen3-Coder Plus officially does not support batch inference, so only the explicit-cache rows are listed.
|
|
27
|
-
|
|
28
|
-
> **Peak/off-peak pricing update (from 2026-08-23 (Sun) 00:00 Beijing)**: DeepSeek models follow the new official rule — **weekdays (Mon–Fri)** keep the original peak/off-peak split (peak 09:00–12:00 / 14:00–18:00, ×2); **weekends (Sat/Sun)** are no longer split and are billed at the **off-peak price** all day. The plugin's billing engine, rate table and per-turn peak/off-peak bands all reflect this.
|
|
29
|
-
|
|
30
25
|
<div align="center">
|
|
31
26
|
<img src="screenshots/demo.png" alt="dsh-ui-usage-billing — billing dashboard overview" width="80%">
|
|
32
27
|
</div>
|
|
@@ -40,26 +35,38 @@
|
|
|
40
35
|
- **Real usage, no fabricated samples** — the server aggregates from persisted session logs and estimates against live multi-provider official prices; it shows an empty snapshot until real data arrives.
|
|
41
36
|
- **Everything on one screen** — a sidebar trigger card plus a full dashboard (Overview / Trends / Providers / Stats / Rates / Settings) across six tabs: month / today / projection / heatmap / trend.
|
|
42
37
|
- **Subscriptions · balance · quota · reconcile** — plan quota, multi-provider balance, relay-station quota, declared endpoints and balance-delta reconciliation form a cross-verifiable billing loop.
|
|
43
|
-
- **Peak/off-peak pricing + switch alerts** — weekday peak split and weekend all-day off-peak, with a popover / system notification before a tier switch, configurable lead time.
|
|
38
|
+
- **Peak/off-peak pricing + switch alerts** — weekday peak split and weekend all-day off-peak, **priced per official change boundary** (base price before 08-17, weekend peak hours 08-17~08-23, weekend all-day off-peak from 08-23), with a popover / system notification before a tier switch, configurable lead time.
|
|
44
39
|
- **Offline & self-contained** — no chart library, no external CDN, pure design tokens; lightweight and ready to use.
|
|
45
40
|
- **Multi-language + dual currency** — Chinese / English, ¥/$ toggle that only affects this plugin.
|
|
46
41
|
|
|
42
|
+
## ⚖️ How it differs from similar plugins
|
|
43
|
+
|
|
44
|
+
Peer plugins (cost-meter, usage-stats, dsh-bill, …) each have their strengths; this plugin's positioning:
|
|
45
|
+
|
|
46
|
+
- **Live pricing sources** — a real-time models.dev catalog + a built-in catalog of 73 models across 24 vendors + user-defined prices in the settings panel (bindable per relay origin); new models don't wait for a hand-edited price table.
|
|
47
|
+
- **History is never recomputed** — every call is priced at its own moment, segmented by official change boundaries (base price before 08-17 → peak/off-peak v1 → weekend all-day off-peak from 08-23); pre-install history is backfilled from existing session logs, and later price changes never rewrite old bills.
|
|
48
|
+
- **Not just "how much" but "on what"** — input split by cache hit/miss (including reasoning), official vs third-party buckets, drill-down by workspace/session/relay site, per-turn cost-spike attribution; plus a performance panel few peers offer (per-model TTFT mean/P50/P90 and generation speed).
|
|
49
|
+
- **Subscription & balance loop** — 7 official provider balances + Coding Plan quotas + relay-station balances and rolling quota windows + self-declared endpoints + cross-reconciliation between official balance deltas and the local ledger.
|
|
50
|
+
- **Uncatalogued models stay visible** — they are explicitly marked "uncatalogued" and counted in the Hero hint; a custom price takes effect immediately instead of silently billing 0 or charging the wrong model's rate.
|
|
51
|
+
- **The model can check for itself** — an optional `usage_stats` tool lets the model answer "what did I spend today" or "which site used the most".
|
|
52
|
+
|
|
47
53
|
## 📊 Dashboard
|
|
48
54
|
|
|
49
55
|
- **Sidebar entry**: a dashboard-style trigger card above the Settings button — month cost as the headline number (monospace) with a 7-day sparkline mini-trend, second line "Today / This week"; collapses to an icon button; hover reveals a quick-look card.
|
|
50
|
-
- **Billing dashboard (tabbed)**: Overview / Trends / Providers / Stats / Rates / Settings — hero figures + YoY/DoD + month projection + KPI×4 + heatmap; 7/30-day trend (switches between Cost / Tokens); provider billing & subscriptions; export / cost breakdown / workspaces / session detail; model rate table; budget & peak alerts. Restrained tones, `--dsw-*` tokens, dark/light adaptive.
|
|
56
|
+
- **Billing dashboard (tabbed)**: Overview / Trends / Providers / Stats / Rates / Settings — hero figures + YoY/DoD + month projection + KPI×4 + heatmap; 7/30-day trend (switches between Cost / Tokens); provider (channel) billing & subscriptions; export / cost breakdown / workspaces / session detail; model rate table; budget & peak alerts. Restrained tones, `--dsw-*` tokens, dark/light adaptive.
|
|
51
57
|
|
|
52
58
|

|
|
53
|
-
- **Live cost bar**: below the composer, persistent "This turn ¥x · Session ¥y" plus the peak/off-peak tier & switch countdown and subscription low-quota chips (≤20% appear, ≤10% red).
|
|
59
|
+
- **Live cost bar**: below the composer, persistent "This turn ¥x · Session ¥y" plus the peak/off-peak tier & switch countdown and subscription low-quota chips (≤20% appear, ≤10% red); the whole capsule can be hidden via the settings-tab "Live cost capsule" toggle (display-only preference persisted locally; stats and alerts are unaffected).
|
|
54
60
|
- **Peak/off-peak switch alert**: a popover before a tier switch plus an optional system notification (lead time / position / mode / preview configurable), distinguishing "About to enter peak ×2 — can wait" / "About to enter off-peak, price halves".
|
|
55
61
|
- **Plugin info card**: a persistent "About" card in the Settings tab — name, description, author (jump to GitHub), source repo, npm, MIT license, version (read server-side from the package's `package.json`, single source of truth, correct on publish).
|
|
56
62
|
|
|
57
63
|
## 💰 Billing engine
|
|
58
64
|
|
|
65
|
+
- **Provider-first grouping**: the billing section groups usage by the llm entry the calls actually went through (channel) — Tencent Cloud TokenHub / Token Plan / DeepSeek official / direct:<route> / unknown routes; the model brand remains as the row logo + sub-line. Official-channel judgement follows the channel origin (`api.deepseek.com`) instead of the route name, so gateway routes named `deepseek-*` no longer count as official traffic. `routeAliases` relocates renamed/deleted historical routes; `modelKeyAliases` binds uncatalogued model ids to catalog keys (date-stamped `deepseek-v4-flash-202605`, org-prefixed `deepseek/deepseek-v4-flash` and the TokenHub short id `hy3` are recognized out of the box).
|
|
59
66
|
- **Live-priced rate table**: models.dev fetched pricing + live-model alignment — the models actually configured are all included; peak/off-peak split (weekdays 9-12 / 14-18 peak ×2, weekends off-peak all day) plus a live USD→CNY rate, refreshed every 6 hours.
|
|
60
67
|
|
|
61
68
|

|
|
62
|
-
- **Official vs third-party buckets**: the detail cost column is split by official DeepSeek direct / third-party relay ("official x / third y" when mixed); the Stats tab has an official/third-party summary card.
|
|
69
|
+
- **Official vs third-party buckets**: the detail cost column is split by official DeepSeek direct / third-party relay ("official x / third y" when mixed); the Stats tab has an official/third-party summary card. Official judgement is channel-origin based (`api.deepseek.com`); web-search assist calls count as official.
|
|
63
70
|
- **Monthly budget + tier alerts**: a budget bar (on/off / amount / progress, ≥80% amber, over red pulse); notifies once per tier crossing 50/80/100%.
|
|
64
71
|
- **Cost-spike attribution**: per-turn cost bars (last 40 turns, amount at bar top, peak/off-peak background bands, >2× spike flagged with attribution).
|
|
65
72
|
|
|
@@ -76,8 +83,8 @@
|
|
|
76
83
|
## 📈 Usage visualizations
|
|
77
84
|
|
|
78
85
|
- **Session detail + cost spikes + heatmap**: sessions sorted by cost (title / project / calls / cost / last active); per-turn cost bars (peak/off-peak background bands, >2× spike flagged with attribution); month / year calendar heatmap (5-color scale, hover detail; the year view is ~52 weeks, GitHub-style), with active-day and streak counts on top.
|
|
79
|
-
- **Performance metrics**: per-model first-token latency (TTFT) mean / P50 / P90, generation speed (tokens/s), total-latency mean
|
|
80
|
-
- **Token insights**: a dedicated "Tokens" tab — daily token
|
|
86
|
+
- **Performance metrics**: per-model first-token latency (TTFT) mean / P50 / P90, generation speed (tokens/s), total-latency mean; per-hour × per-model comparison curve — metric tabs (TTFT / tok/s), clickable model chips (top-5 by samples lit by default, one-click select-all), hover snapping to the nearest hour with a crosshair and per-model tooltip, broken lines for missing-sample hours (never fabricated); view preferences persist locally.
|
|
87
|
+
- **Token insights**: a dedicated "Tokens" tab — the daily token chart switches between two views: "Structure" stacks "input (cache miss) / input (cache hit) / output" (including reasoning), while "By model" stacks each day by model (same per-model colors as the trends tab; the toggle hides itself when the snapshot carries no per-day-per-model detail); the hover tooltip shows the day's exact breakdown (per-bucket in structure view, per-model "hit / miss / output" in model view, thousand-separated); clicking a legend swatch or a model-table row focuses that model (other segments dim, y-axis unchanged, click again to release); per-model totals and share, structural KPIs (cache-hit rate / reasoning share / input-output ratio / peak day); per-day token CSV and JSON export (JSON includes the per-day-per-model detail).
|
|
81
88
|
|
|
82
89
|

|
|
83
90
|
- **Export + offline self-contained**: the Stats tab exports daily / per-session / per-site CSV and full JSON; cost breakdown / workspaces / session-detail sections are drillable (click a project row to expand its sessions); no chart library, no external CDN, pure design tokens.
|
|
@@ -95,7 +102,21 @@
|
|
|
95
102
|
|
|
96
103
|
## 🚀 Quick start
|
|
97
104
|
|
|
98
|
-
|
|
105
|
+
Check your host generation first (`dsh --version`), then pick the matching install command — **a mismatched line is rejected by the DSH Store via the `engines.dsh` declaration** (declared since v1.0.41). Note that `dsh plugin add` requires an explicit `--profile` (otherwise it fails with `required option '--profile <name>' not specified`), and prefer **pinning an exact version** over `@latest` (pnpm's `minimumReleaseAge` cooldown skips freshly published versions and may fall back to the other line):
|
|
106
|
+
|
|
107
|
+
- **DSH 0.1.2 ~ 0.1.5 era** (0.1.2-alpha.1 and later; npm `latest` currently at 0.1.5-rc.1; `npm ls -g @deepseek-ai/dsh` shows 0.1.2-* ~ 0.1.5-*):
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
dsh plugin --profile web add npm:@kenz1117/dsh-ui-usage-billing@latest
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- **DSH 0.1.0-rc.8 ~ 0.1.1-rc.2** (legacy hosts):
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
dsh plugin --profile web add npm:@kenz1117/dsh-ui-usage-billing@stable
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Alternatively, add it to the host `cordis.patch.yml` by hand:
|
|
99
120
|
|
|
100
121
|
```yaml
|
|
101
122
|
- insert:
|
|
@@ -103,12 +124,6 @@ Add to the host `cordis.patch.yml`:
|
|
|
103
124
|
name: '@kenz1117/dsh-ui-usage-billing'
|
|
104
125
|
```
|
|
105
126
|
|
|
106
|
-
Or install via a package manager:
|
|
107
|
-
|
|
108
|
-
```sh
|
|
109
|
-
npm install @kenz1117/dsh-ui-usage-billing
|
|
110
|
-
```
|
|
111
|
-
|
|
112
127
|
After the host starts, the billing entry appears above the sidebar Settings. No extra configuration is needed; when `sessionPersistence` is available it aggregates real usage automatically.
|
|
113
128
|
|
|
114
129
|
## ⚙️ How it works
|
|
@@ -150,7 +165,7 @@ cost (CNY) = (missInput × p_input + cacheHit × p_cacheHit + output × p_output
|
|
|
150
165
|
|
|
151
166
|
| Provider | Models |
|
|
152
167
|
| -------- | ------------------------------------------------------------------------------------------- |
|
|
153
|
-
| DeepSeek | V4 Flash, V4 Flash Vision (Exp), V4 Pro (
|
|
168
|
+
| DeepSeek | V4 Flash, V4 Flash Vision (Exp), V4 Pro (priced per official change boundary: base tier → peak/off-peak v1 → weekend off-peak) |
|
|
154
169
|
| Zhipu AI | GLM-5.3, GLM-5.2, GLM-5.1, GLM-5-Turbo, GLM-4.7, GLM-4.6, GLM-4.5-Air, GLM-5V-Turbo |
|
|
155
170
|
| Aliyun | Qwen3.8 Max, Qwen3.7-Max, Qwen3.5-Plus, Qwen3.5-Flash |
|
|
156
171
|
| Doubao | Seed-2.0 Pro, Seed-2.0 Mini, Seed-1.6 |
|
|
@@ -185,7 +200,9 @@ The public HTTP endpoints and field definitions are documented in source: `GET /
|
|
|
185
200
|
| `statsPath` | unset | Absolute path to a fallback `.dsh-usage-stats.json` (used when `sessionPersistence` is unavailable) |
|
|
186
201
|
| `ledgerPath` | `~/.dsh/.dsh-usage-ledger.json` | Independent durable ledger path; stores folded metrics only (no message bodies or session titles), so deletion does not erase recorded usage |
|
|
187
202
|
| `balanceApiKeyEnv` | `DEEPSEEK_API_KEY` | Credential ref for the DeepSeek balance query; only used as a fallback when llm-pi-ai has no `apiKeyEnv` for deepseek |
|
|
188
|
-
| `subscriptionProviders` |
|
|
203
|
+
| `subscriptionProviders` | 11 built-ins (incl. `tencent-token-plan`) | Subscription (coding / token plan) provider id list — tokens counted, cost 0; aligned with the subscription-card recognition |
|
|
204
|
+
| `routeAliases` | not set | Historical route aliases (old provider route name -> current route): renamed/deleted routes relocate into their channel instead of the "unknown" bucket. Example: `{ "deepseek-official": "tencent" }` |
|
|
205
|
+
| `modelKeyAliases` | not set | User model aliases (log model id -> billing catalog key, value must be an existing `MODEL_CATALOG` key): bind uncatalogued ids without waiting for a release. Example: `{ "hy4-preview": "hunyuan" }` |
|
|
189
206
|
| `monthlyBudget` | unset | Default monthly budget (CNY); sent with usage-stats as the budget bar's initial amount (user UI settings take precedence and persist locally) |
|
|
190
207
|
| `lowBalanceThreshold` | `50` | Low-balance alert threshold (CNY); sent with usage-stats, alerts once a day when any provider's CNY balance is below it |
|
|
191
208
|
| `subscriptionPlans` | auto-detect | Subscription quota adapter whitelist (`{ provider, baseUrl?, region? }`); when unset, auto-detects all subscription providers from `llm-pi-ai` (queries those with a quota API, marks the rest) |
|
|
@@ -216,7 +233,7 @@ The host discovers the browser side automatically via the `dsh.client` declarati
|
|
|
216
233
|
|
|
217
234
|
- **Permission level: high**: reads durable session logs (files), calls official multi-vendor / subscription / balance / pricing APIs (network), reads `apiKeyEnv` via the credentials seam (credentials), writes the ledger under `~/.dsh` (persistent state); **no** command execution / shell.
|
|
218
235
|
- **Update channel: `user-reviewed`**: with file / network / credential capabilities, DSH STORE requires local manual confirmation on every install; review the repo, pinned commit, lifecycle scripts, and impact scope before installing.
|
|
219
|
-
- **Compatibility**:
|
|
236
|
+
- **Compatibility**: the preview line (npm `latest`/`alpha`, 1.2.x — kept above the stable line to kill the version inversion) targets DSH `0.1.2` ~ `0.1.5` (host `latest` currently at 0.1.5-rc.1, verified on real hardware); the stable line (npm `stable`, 1.1.x) targets legacy hosts `0.1.0-rc.8` ~ `0.1.1-rc.2`. Per-version declarations live in `package.json` under `dsh.compatibility`; the two-line mapping and monitoring mechanism are documented in [COMPATIBILITY.md](COMPATIBILITY.md). Node.js `^22.19.0 || >=24.0.0`.
|
|
220
237
|
- **Lifecycle**: no `preinstall` / `install` / `postinstall` / `prepare` (ready on install).
|
|
221
238
|
- **No impersonation**: adds only its own entry id `ui-usage-billing`; `@deepseek-ai/dsh-*` packages are `peerDependencies` only (no reinstall / replace / shadowing of official components); the package uses the third-party namespace `@kenz1117/*`.
|
|
222
239
|
- **Build artifacts**: runtime files `lib/*` and `cordis.patch.yml` are committed at the pinned commit and declared in `files`.
|
|
@@ -228,7 +245,7 @@ None. This plugin is a pure UI surface: it registers no tools, injects no system
|
|
|
228
245
|
|
|
229
246
|
## ⚠️ Known Limitations and Deferred Work
|
|
230
247
|
|
|
231
|
-
- **Balance queries cover DeepSeek / Moonshot (Kimi) / StepFun / SiliconFlow / xAI / Zhipu GLM (Z.ai CN region)**:
|
|
248
|
+
- **Balance queries cover DeepSeek / Moonshot (Kimi) / StepFun / SiliconFlow / xAI / Zhipu GLM (Z.ai CN region) / Tencent Cloud TokenHub (token-plan quota)**: the first six use a standard Bearer API key; Tencent Cloud uses the cloud-API key pair (`<SecretId>:<SecretKey>`, TC3-signed management API). Other providers expose no public balance API or need non-Bearer auth (Xiaomi MiMo via console Cookie, SenseTime via AccessKey signing, MiniMax/Doubao via quota or AK/SK), so they currently show "not configured"; the extension point is `src/balance.ts` (add a querier per provider balance API).
|
|
232
249
|
- **Relay quota depends on upstream private schemas**: New API / Sub2API interface fields are not public, so an unreadable station is labeled "no quota" rather than fabricating an amount; if a station's response fields differ, extend the parsers in `src/relay.ts`. An "unknown route" means that route no longer exists in the current provider config (renamed / deleted); historical call data is not lost — re-adding the same-named route restores attribution automatically.
|
|
233
250
|
- **Overspend notifications rely on the browser Notification API**: when permission is denied or the platform lacks support, only the in-UI red-pulse fallback remains — no host-level notification channel; notifications are capped at once per day.
|
|
234
251
|
- **Session rows are not navigable**: clicking a session row does not open that session (cross-plugin navigation needs a host session-selection channel); sessions are capped at 100 rows and the panel shows the top 20.
|
|
@@ -237,8 +254,9 @@ None. This plugin is a pure UI surface: it registers no tools, injects no system
|
|
|
237
254
|
|
|
238
255
|
## ❤️ Contributors
|
|
239
256
|
|
|
240
|
-
- [@ciphoo](https://github.com/ciphoo) — MiniMax CN Token Plan quota support (PR #5)
|
|
257
|
+
- [@ciphoo](https://github.com/ciphoo) — MiniMax CN Token Plan quota support (PR #5), `minimax-cn` subscription key wiring (PR #12), a concurrent-ledger-write `MoveFileExW EPERM` fix on Windows (PR #11)
|
|
241
258
|
- [@fabulousyuann-tech](https://github.com/fabulousyuann-tech) — durable ledger that retains usage after session deletion (PR #8)
|
|
259
|
+
- [@hi-fangj](https://github.com/hi-fangj) — hover tooltip with the exact per-day token breakdown on the token daily chart (PR #21), the live-cost capsule toggle (PR #22), the per-model view and legend focus for the token daily chart (PR #23), and the per-model comparison curve in the perf panel (PR #24)
|
|
242
260
|
|
|
243
261
|
## 📄 License
|
|
244
262
|
|
package/README.md
CHANGED
|
@@ -21,12 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
> **费率表展示规则更新(2026-08-27)**:models.dev 聚合的补充价目**不再整表渲染**——此前费率表会把 158 个网关厂商的全部约 5900 个模型一并铺出,淹没实际在用的条目;现在表格只包含内置目录与系统探活命中的模型。计费能力不受影响:目录外但 models.dev 有价的模型命中时仍按其官方 USD 价正常估算,只是不再出现在表格里。
|
|
25
|
-
|
|
26
|
-
> **千问(Qwen)系列价格更新(2026-08-27)**:对齐阿里云百炼最新官方刊例——**Qwen3.7-Max** 更正为官方原价(输入 ¥12 / 显式缓存命中 ¥1.2 / 输出 ¥36,此前误录活动折后价),当前官方限时 5 折且**未公布截止时间**,费率表按折后价显示并挂红色促销徽章(悬停提示活动性质),公告截止后补填日期即自动恢复原价展示;Qwen 全系补充**附加计价参考行**(Batch File 长期半价档、Batch Chat、显式缓存创建/命中,纯展示不参与估算计费);Qwen3-Coder Plus 官方明确不支持批量推理,仅列显式缓存两行。
|
|
27
|
-
|
|
28
|
-
> **峰谷计费规则更新(自 2026-08-23(周日)00:00 起)**:DeepSeek 模型按官方新规计费——**工作日(周一至周五)** 继续执行原峰谷分段计费(高峰 09:00–12:00 / 14:00–18:00,×2);**周末(周六、周日)** 全天不再区分峰谷时段,统一按**低谷价**计费。插件计费引擎、费率表与每轮费用峰谷分带均已同步生效。
|
|
29
|
-
|
|
30
24
|
<div align="center">
|
|
31
25
|
<img src="screenshots/demo.png" alt="dsh-ui-usage-billing — 计费仪表盘总览" width="80%">
|
|
32
26
|
</div>
|
|
@@ -38,35 +32,48 @@
|
|
|
38
32
|
## ✨ 核心亮点
|
|
39
33
|
|
|
40
34
|
- **真实用量,不伪造样本** — 服务端从持久化会话日志实时聚合,按实时多厂商官方价估算;数据到达前显示空快照,绝不展示假数据。
|
|
41
|
-
- **一屏看懂一切** — 侧边栏触发卡 + 全屏仪表盘(概览 /
|
|
35
|
+
- **一屏看懂一切** — 侧边栏触发卡 + 全屏仪表盘(概览 / Token / 用量 / 趋势 / 费率 / 设置)六区,本月/今日/预计/热力图/趋势全在。
|
|
42
36
|
- **订阅 · 余额 · 额度 · 对账** — 订阅套餐额度、多厂商余额、中转站额度、声明端点、余额差对账,形成可交叉验证的计费闭环。
|
|
43
|
-
- **峰谷计价 + 切换提醒** —
|
|
37
|
+
- **峰谷计价 + 切换提醒** — 工作日峰谷分时、周末全天低谷,**按官方变更节点分段计价**(8-17 前基础价、8-17~8-23 周末计峰、8-23 起周末全谷),切档前弹窗/系统通知,提前量可配。
|
|
44
38
|
- **离线自包含** — 无图表库、无外部 CDN、纯设计令牌;依赖极轻,随装随用。
|
|
45
39
|
- **多语种 + 双币种** — 中文/English、¥/≈$ 切换,只对本插件生效。
|
|
46
40
|
|
|
41
|
+
## ⚖️ 与同类计费插件的差异
|
|
42
|
+
|
|
43
|
+
同类插件(cost-meter、usage-stats、dsh-bill 等)各有所长,本插件的定位差异如下:
|
|
44
|
+
|
|
45
|
+
- **价格来源是活的** — models.dev 实时目录 + 内置 24 厂商 73 款模型目录 + 设置面板自定义单价(可按中转站来源绑定同模型不同价),新模型无需等待手填价表。
|
|
46
|
+
- **历史永不重算** — 费用按事件发生时刻的价格计价,并按官方变更节点分段(8-17 前基础价 → 峰谷 v1 → 8-23 起周末全谷);安装前的历史用量从既有会话日志自动回填,价格调整不回写旧账。
|
|
47
|
+
- **不止「花了多少」,还答「花在哪」** — 输入按缓存命中/未命中分桶(含 reasoning)、官方/三方分桶、按工作区/会话/中转站下钻、每轮成本突增归因;还有同类少有的性能面板(各模型 TTFT 均值/P50/P90 与生成速度)。
|
|
48
|
+
- **订阅与余额闭环** — 7 家官方余额 + Coding Plan 额度 + 中转站余额与滚动额度窗口 + 自声明端点 + 官方余额变动与本地账本的交叉对账。
|
|
49
|
+
- **目录外模型不静默** — 未收录模型显著标注「未收录」并在 Hero 区提示数量,自定义单价填入即生效,不会被静默计 0 或错按其他模型价格。
|
|
50
|
+
- **模型可自查** — 可选的 `usage_stats` 工具让模型直接回答「今天花了多少」「哪个站点用得最多」。
|
|
51
|
+
|
|
47
52
|
## 📊 仪表盘
|
|
48
53
|
|
|
49
54
|
- **侧边栏入口**:设置按钮上方的仪表盘式触发卡——本月费用主数字(等宽字体)+ 近 7 天 sparkline 迷你趋势,副行「今日 / 本周」;折叠栏自动切为图标钮;悬停浮现速览卡。
|
|
50
|
-
- **计费仪表盘(分区 Tab)**:概览 / 趋势 / 明细 / 统计 / 费率 / 设置 六区——Hero 大数字 + 本年/今日环比 + 本月预计 + KPI×4 + 热力图;趋势图 7/30 天(可切费用 / Token
|
|
55
|
+
- **计费仪表盘(分区 Tab)**:概览 / 趋势 / 明细 / 统计 / 费率 / 设置 六区——Hero 大数字 + 本年/今日环比 + 本月预计 + KPI×4 + 热力图;趋势图 7/30 天(可切费用 / Token);提供商计费与订阅(按调用通道分组);导出 / 费用构成 / 工作区 / 会话明细;模型单价表;预算与峰谷提醒。克制冷调、`--dsw-*` 令牌、深浅主题自适应。
|
|
51
56
|
|
|
52
57
|

|
|
53
|
-
- **即时代费用条**:输入框下方常驻「本轮 ¥x · 会话 ¥y」+ 峰谷档位与切换倒计时 + 订阅额度预警 chips(≤20% 浮现、≤10%
|
|
58
|
+
- **即时代费用条**:输入框下方常驻「本轮 ¥x · 会话 ¥y」+ 峰谷档位与切换倒计时 + 订阅额度预警 chips(≤20% 浮现、≤10% 红);可在设置 Tab 以「平价消耗胶囊」开关整条隐藏(显示偏好本地持久化,统计与提醒不受影响)。
|
|
54
59
|
- **峰/谷切换提醒**:切档前弹窗 + 可选系统通知(提前量 / 位置 / 模式 / 预览可配),区分「即将进峰时 ×2 可稍等」/「即将进平价 价格减半」。
|
|
55
60
|
- **插件信息卡**:设置 Tab 常驻「关于」卡——插件名、描述、作者(可跳 GitHub)、源码仓库、npm、许可证 MIT、版本号(服务端读自包 `package.json`,单一来源,发布自动正确)。
|
|
56
61
|
|
|
57
62
|
## 💰 计费引擎
|
|
58
63
|
|
|
59
|
-
-
|
|
64
|
+
- **提供商优先分组**:计费区块按调用实际发生的 llm 入口(通道)分组——腾讯云 TokenHub / 腾讯云 Token Plan / DeepSeek 官方 / 直连·路由名 / 未知路由,模型品牌只是行内徽标 + 副标;官方判定按通道 origin(`api.deepseek.com`)而非路由名,名为 `deepseek-*` 的网关路由不再被误算官方流量。`routeAliases` 可把改名/删除的历史路由归位,`modelKeyAliases` 可把目录外模型 id 绑定到计费键(日期后缀 `deepseek-v4-flash-202605`、组织前缀 `deepseek/deepseek-v4-flash`、TokenHub 短 id `hy3` 已内置识别)。
|
|
65
|
+
- **实时定价费率表**:models.dev 抓价 + 探活模型对标——系统实际配置模型全纳入;峰谷分时(工作日 9-12 / 14-18 高峰 ×2,周末全天低谷;历史费用按官方变更节点分段计价,见下方「计费细节」)+ 实时汇率(USD→CNY),每 6 小时刷新。
|
|
66
|
+
- **自定义单价**:设置面板为未收录或变价模型填入实付价(未命中 / 缓存命中 / 输出,可选 USD 与低谷价三栏),总览与日趋势按用户价重估显示;支持按中转站来源绑定同模型不同价(origin 规范化宽松匹配),目录外模型填价即生效。
|
|
60
67
|
|
|
61
68
|

|
|
62
|
-
- **官方 vs 三方分桶**:明细费用列按官方 DeepSeek 直连 / 第三方中转分解(混合时「官 x / 三 y」),统计 Tab
|
|
69
|
+
- **官方 vs 三方分桶**:明细费用列按官方 DeepSeek 直连 / 第三方中转分解(混合时「官 x / 三 y」),统计 Tab 有「官方/三方」汇总卡;官方判定以通道 origin 为准(`api.deepseek.com`),联网搜索辅助请求计入官方。
|
|
63
70
|
- **月度预算 + 分档提醒**:预算条(开关 / 金额 / 进度,≥80% 琥珀、超支红脉);跨 50 / 80 / 100% 各提醒一次;余额折算 CNY 低于阈值每天提醒一次。
|
|
64
71
|
- **成本突增归因**:每轮费用柱状图(最近 40 轮、金额贴柱顶、峰谷背景分带、超 2 倍红标归因)。
|
|
65
72
|
|
|
66
73
|
## 🔌 订阅与余额
|
|
67
74
|
|
|
68
75
|
- **订阅套餐额度**:识别 `llm-pi-ai` 里的订阅类 provider(Kimi / Z.ai / OpenCode Go / MiniMax / OpenRouter / 小米 / 火山…),有额度 API 的实时显示剩余%与重置时间、用尽标红,无 API 标「未接入」;订阅通道模型费用记 0。档位月费与周期额度口径由内置知识库自动识别(如 OpenCode Go $10/月 + 周 $30 额度)。**MiniMax 用户注意**:国内开发者环境请用 `minimax-token-plan-cn`(自动对接 `https://api.minimaxi.com`);国际保留 `minimax` / `minimax-token-plan`(默认 `https://www.minimaxi.com`);需要自配中转或 staging 时可在该 provider 设置里覆盖 `baseUrl`。
|
|
69
|
-
- **多厂商余额**:DeepSeek / Kimi / 阶跃星辰 / 硅基流动 / xAI / 智谱 GLM(Z.ai 国内域)内置官方余额,余额列按近 7 天日均折算「约可撑 N
|
|
76
|
+
- **多厂商余额**:DeepSeek / Kimi / 阶跃星辰 / 硅基流动 / xAI / 智谱 GLM(Z.ai 国内域)内置官方余额,余额列按近 7 天日均折算「约可撑 N 天」;**腾讯云 TokenHub Token Plan** 余量已接入(云 API 管控面,TC3 签名)——凭据值填 `<SecretId>:<SecretKey>`(云 API 密钥对,非 TokenHub 推理 key),推理路由命名为 `tencent-tokenhub` / `tokenhub` / `tencent` / `tencentcloud` 任一即可命中;订阅卡的 **腾讯云 Token Plan** 额度适配器走同一条 TC3 管控面链路(`src/tc3.ts`,`DescribeTokenPlanList → DescribeTokenPlan`)——把 `tencent-token-plan` 路由的 `apiKeyEnv` 凭据设为云 API 密钥对即可实时显示余量/重置,剩余与总额度都可解析时产出百分比窗口(绝不猜总额度),订阅通道模型行同时显示「订阅包含 ≈目录价预估」。
|
|
70
77
|
- **自定义 Provider 余额**:配置任意 HTTP 端点查余额(`extract` 支持常量 / 点路径 / add-subtract / divide,请求头 `{{ENV}}` 经凭据 seam)。
|
|
71
78
|
- **声明端点 + 余额对账**:**声明端点**(`declaredEndpoints`)为内置表没有的供应商自声明余额/额度接口——只写「数字在哪里」的点路径、无表达式;请求由匹配到同源 provider 的 origin 构造,安全边界(单斜杠绝对路径、仅 GET、拒跨源重定向、响应体/超时上限、凭据只取匹配 provider 自有 `apiKeyEnv`)由 `src/declarative.ts` 强制执行,取错路径在界面标注 `declared` 与 reason。**余额差对账**(`reconcilePath`)用官方(仅 DeepSeek 官方方向)余额当日变动与本地账本当日的官方渠道费用交叉校验,偏差超阈值(0.3 元且 >15%)时提示核对价格表或近期账单;充值 / 授信 / 币种变化重置基准而非告警、余额未减少(走订阅扣费)静默。
|
|
72
79
|
- **中转站归组与额度**:按 provider 的 `baseURL` 归一化 origin 归组——同一中转站的多把 key 合并成一行,站名即域名;对配了 `baseURL` 的路由自动识别 New API 系(`/api/status`)与 Sub2API(`/v1/usage`)的**余额与滚动额度窗口**,读不出标「未读出额度」,剩余 <20% 标红;识别结果有 5 分钟指纹缓存(同站多把 key 独立熔断),`relay-quotas` 端点附 `diagnostics` 供「我的中转站为什么不显示」自查。项目归属优先用工作区标题命名。**未计价的模型**(目录外/无价)费用按 0 计,Hero 下会提示「N 个模型未收录计价」。
|
|
@@ -76,8 +83,8 @@
|
|
|
76
83
|
## 📈 用量可视化
|
|
77
84
|
|
|
78
85
|
- **会话明细 + 成本突增 + 热力图**:按会话费用倒序(标题 / 项目 / 调用 / 费用 / 最后活跃);每轮费用柱状图(峰谷背景分带、超 2 倍红标归因);月 / 年日历热力图(5 档色阶、悬停明细;年视图近 52 周、GitHub 风格),头部显示活跃天数 / 连续使用天数。
|
|
79
|
-
- **性能指标**:每个模型首字延时(TTFT)均值 / P50 / P90、生成速度(tokens/s
|
|
80
|
-
- **Token 统计洞察**:独立「Token」分区——每日 token
|
|
86
|
+
- **性能指标**:每个模型首字延时(TTFT)均值 / P50 / P90、生成速度(tokens/s)、总延迟均值;按小时×模型对比曲线——指标 tab 切换(首字延时 / 生成速度),模型 chip 点击开/关曲线(默认点亮样本数前 5,全选一键),悬停吸附最近小时显示十字线与逐模型数值,缺失样本小时断线不造假;视图偏好本地持久化。
|
|
87
|
+
- **Token 统计洞察**:独立「Token」分区——每日 token 堆叠双视角切换:「按结构」按「输入(缓存未命中)/ 输入(缓存命中)/ 输出」三桶分色(含 reasoning 思考),「按模型」每天按模型堆叠(分色与趋势页一致,旧快照缺按日×模型明细时自动隐藏切换);悬停柱状图显示当日精确明细(结构视角给三桶逐项,模型视角给逐模型「命中/未命中/输出」,千分位不缩写);点击图例色块或模型 Token 表行可聚焦单个模型(其余段弱化、y 轴不变,再点解除),模型 token 总量与占比,结构 KPI(缓存命中率 / 思考占比 / 输入输出比 / 峰值日);按日 token CSV 与 JSON 导出(JSON 含按日×模型明细)。
|
|
81
88
|
|
|
82
89
|

|
|
83
90
|
- **数据导出 + 离线自包含**:统计 Tab 导出按日 / 按会话 / 按站点 CSV 与全量 JSON;费用构成 / 工作区 / 会话明细分区可下钻(点项目行展开该项目的会话);无图表库、无外部 CDN、纯设计令牌。
|
|
@@ -93,26 +100,20 @@
|
|
|
93
100
|
- **数据导出防注入**:按日 / 按会话 / 按站点 CSV 对以 `=` / `+` / `-` / `@` 开头的单元格前置单引号,并完整转义逗号 / 引号 / 换行 / 回车,防止在 Excel / WPS 中被当作公式执行。
|
|
94
101
|
- **隐私底线**:纯 UI surface,不注册工具、不注入系统提示、不向会话日志写入模型可见事件;仅从既有会话日志聚合,日志内容由其他包负责。
|
|
95
102
|
|
|
96
|
-
## 📌 版本兼容
|
|
97
|
-
|
|
98
|
-
- **v1.1.x(本线)**:面向 DSH 正式版(`0.1.0-rc.8` ~ `0.1.1-rc.2`)的稳定兼容线,100% 可用。
|
|
99
|
-
- **v1.0.12 ~ v1.0.15**:0.1.2 迁移中间态,**低版本宿主请勿使用**(已知会导致 web 启动卡死,见 issue #25),已标记 deprecated。
|
|
100
|
-
- **v1.0.16+ / 2.0.0-alpha(npm `alpha` 标签)**:需要 DSH `0.1.2-alpha.1`+。本插件发布策略锚定官方正式版:正式版兼容优先 100% 保证,预览版宿主适配随 alpha 线提供、不作稳定承诺。
|
|
101
|
-
|
|
102
103
|
## 🚀 快速开始
|
|
103
104
|
|
|
104
|
-
先确认宿主代际(`dsh --version`),再按代际选安装命令——**装错线会在市场侧被 `engines.dsh` 声明拦截**(v1.
|
|
105
|
+
先确认宿主代际(`dsh --version`),再按代际选安装命令——**装错线会在市场侧被 `engines.dsh` 声明拦截**(v1.0.41 起声明生效)。注意 `dsh plugin add` 需要显式 `--profile`(缺省会报 `required option '--profile <name>' not specified`),且建议**钉具体版本号**而非 `@latest`(pnpm 的 `minimumReleaseAge` 冷静期会让刚发布的版本被跳过、回退到旧线):
|
|
105
106
|
|
|
106
|
-
- **DSH 0.1.0-
|
|
107
|
+
- **DSH 0.1.2 ~ 0.1.5 系**(0.1.2-alpha.1 起,现行 latest 为 0.1.5-rc.1;`npm ls -g @deepseek-ai/dsh` 显示 0.1.2-* ~ 0.1.5-*):
|
|
107
108
|
|
|
108
109
|
```sh
|
|
109
|
-
dsh plugin --profile web add npm:@kenz1117/dsh-ui-usage-billing@
|
|
110
|
+
dsh plugin --profile web add npm:@kenz1117/dsh-ui-usage-billing@latest
|
|
110
111
|
```
|
|
111
112
|
|
|
112
|
-
- **DSH 0.1.
|
|
113
|
+
- **DSH 0.1.0-rc.8 ~ 0.1.1-rc.2**(旧宿主):
|
|
113
114
|
|
|
114
115
|
```sh
|
|
115
|
-
dsh plugin --profile web add npm:@kenz1117/dsh-ui-usage-billing@
|
|
116
|
+
dsh plugin --profile web add npm:@kenz1117/dsh-ui-usage-billing@stable
|
|
116
117
|
```
|
|
117
118
|
|
|
118
119
|
也可以在宿主 `cordis.patch.yml` 中手动加入:
|
|
@@ -170,7 +171,7 @@ cost(CNY)= (missInput × p_input + cacheHit × p_cacheHit + output × p_outp
|
|
|
170
171
|
|
|
171
172
|
| 厂商 | 代表模型 |
|
|
172
173
|
| -------- | -------------------------------------------- |
|
|
173
|
-
| DeepSeek | V4 Flash、V4 Pro(等 3
|
|
174
|
+
| DeepSeek | V4 Flash、V4 Pro(等 3 款;按官方变更节点分段计价:基础价 → 峰谷 v1 → 周末全谷) |
|
|
174
175
|
| 智谱 AI | GLM-5.3、GLM-5.2(等 10 款) |
|
|
175
176
|
| 阿里通义 | Qwen3.8 Max、Qwen3-Coder 480B(等 7 款) |
|
|
176
177
|
| 字节豆包 | Doubao Seed-2.1 Pro、Doubao-Seed-Evolving(等 8 款) |
|
|
@@ -211,7 +212,9 @@ cost(CNY)= (missInput × p_input + cacheHit × p_cacheHit + output × p_outp
|
|
|
211
212
|
| `statsPath` | 未设置 | 回退统计文件 `.dsh-usage-stats.json` 的绝对路径(`sessionPersistence` 不可用时生效) |
|
|
212
213
|
| `ledgerPath` | `~/.dsh/.dsh-usage-ledger.json` | 独立持久用量账本的绝对路径;只保存折叠后的统计(不保存消息正文或会话标题),永久删除会话不会删除已记录的费用与 token |
|
|
213
214
|
| `balanceApiKeyEnv` | `DEEPSEEK_API_KEY` | DeepSeek 余额查询的凭据引用;仅在 llm-pi-ai 未配置 deepseek 的 `apiKeyEnv` 时兜底使用 |
|
|
214
|
-
| `subscriptionProviders` | `
|
|
215
|
+
| `subscriptionProviders` | 内置 11 项(含 `tencent-token-plan`) | 订阅制(coding / token 套餐)provider id 列表,照常统计 token、费用记 0;与订阅卡识别口径对齐 |
|
|
216
|
+
| `routeAliases` | 未设置 | 历史路由别名(旧 provider 路由名 → 当前路由名):改名/删除过的路由,其历史用量原落「未知路由」桶且订阅/官方判定失效;配置后按目标路由归位。例:`{ "deepseek-official": "tencent", "tencent-cloud": "tencent" }` |
|
|
217
|
+
| `modelKeyAliases` | 未设置 | 用户自定义模型别名(真实日志 model id → 计费目录键,值须为 `MODEL_CATALOG` 既有 key):目录外新模型无需等发版,配一条别名即完成识别与计价。例:`{ "hy4-preview": "hunyuan" }` |
|
|
215
218
|
| `monthlyBudget` | 未设置 | 月度预算默认金额(人民币元);随 usage-stats 下发,作为仪表盘预算条的初始金额(用户在界面上的设置优先并本地持久化) |
|
|
216
219
|
| `lowBalanceThreshold` | `50` | 余额不足告警阈值(人民币元);随 usage-stats 下发,任一厂商余额折算人民币低于此值时每天提醒一次 |
|
|
217
220
|
| `subscriptionPlans` | 自动识别 | 订阅额度适配器白名单(`{ provider, baseUrl?, region? }`);缺省时自动从 `llm-pi-ai` 设置识别所有订阅类 provider(有额度 API 的查额度,无 API 的仅标识) |
|
|
@@ -243,11 +246,11 @@ npm publish --access public
|
|
|
243
246
|
|
|
244
247
|
- **权限等级:high**:读取持久会话日志(文件)、访问多厂商官方 / 订阅 / 余额 / 定价 API(网络)、经凭据 seam 读取 `apiKeyEnv`(凭据)、写入 `~/.dsh` 账本(持久状态);**不含**命令执行 / Shell。
|
|
245
248
|
- **更新通道:`user-reviewed`**:本插件具备文件 / 网络 / 凭据能力,DSH STORE 采用每次安装需本机人工确认的通道;安装前请复核仓库、固定 Commit、生命周期脚本与影响范围。
|
|
246
|
-
-
|
|
249
|
+
- **兼容范围**:预览线(npm `latest`/`alpha`,1.2.x,自 v1.2.0 起恒高于稳定线以消除版本号倒挂)适配 DSH `0.1.2` ~ `0.1.5` 系(宿主 `latest` 现指向 0.1.5-rc.1,已真机验证);稳定线(npm `stable`,1.1.x)适配旧宿主 `0.1.0-rc.8` ~ `0.1.1-rc.2`。逐版本声明见 `package.json` 的 `dsh.compatibility`,双线对照与监控机制见 [COMPATIBILITY.md](COMPATIBILITY.md)。Node.js `^22.19.0 || >=24.0.0`。
|
|
247
250
|
- **生命周期**:无 `preinstall` / `install` / `postinstall` / `prepare`(安装即用)。
|
|
248
251
|
- **不冒用官方**:仅新增自有 entry id `ui-usage-billing`;对 `@deepseek-ai/dsh-*` 仅为 `peerDependencies` 依赖(不重复安装 / 不替换 / 不遮蔽官方组件),包名使用第三方命名空间 `@kenz1117/*`。
|
|
249
252
|
- **打包产物**:运行文件 `lib/*` 与 `cordis.patch.yml` 已随固定 Commit 提交并声明在 `files`。
|
|
250
|
-
- **源码锚点**:源码以 GitHub 默认分支上的固定 Commit 锁定并可追溯;例如 v1.0.
|
|
253
|
+
- **源码锚点**:源码以 GitHub 默认分支上的固定 Commit 锁定并可追溯;例如 v1.0.13 对应 `efd67dea133a4fee0aacfee8dff416f1ce418b14`。DSH STORE 自动化每约 8 小时重新读取默认分支 HEAD 作为新的固定 Commit,并按 SemVer 变更判定是否重新审查。
|
|
251
254
|
|
|
252
255
|
## 🤖 Model Experience
|
|
253
256
|
|
|
@@ -255,7 +258,7 @@ npm publish --access public
|
|
|
255
258
|
|
|
256
259
|
## ⚠️ Known Limitations and Deferred Work
|
|
257
260
|
|
|
258
|
-
- **余额查询已接入 DeepSeek / 月之暗面(Kimi)/ 阶跃星辰(StepFun)/ 硅基流动 / xAI / 智谱 GLM(Z.ai
|
|
261
|
+
- **余额查询已接入 DeepSeek / 月之暗面(Kimi)/ 阶跃星辰(StepFun)/ 硅基流动 / xAI / 智谱 GLM(Z.ai 国内域)/ 腾讯云 TokenHub(Token Plan 余量)**:前六家用标准 Bearer API key,腾讯云用云 API 密钥对(TC3 签名)。其余厂商因无公开余额接口或需非 Bearer 鉴权(小米 MiMo 走控制台 Cookie、商汤走 AccessKey 签名、MiniMax/字节豆包走额度制或 AK/SK),暂显示「未配置」;扩展点在 `src/balance.ts`(按厂商余额 API 增加查询器)。
|
|
259
262
|
- **中转站额度依赖上游私有 schema**:New API / Sub2API 的接口字段未公开,读不出时标「未读出额度」而非臆造金额;若某中转站响应字段不同,需按 `src/relay.ts` 的解析器扩展。未知路由表示该路由在当前 provider 配置里已不存在(改过名 / 删除过),历史调用数据未丢,重新配置同名路由即可自动归位。
|
|
260
263
|
- **超支通知依赖浏览器 Notification**:权限被拒绝或平台不支持时只有界面红色脉冲兜底,没有宿主级通知通道;通知上限为每天一次。
|
|
261
264
|
- **会话明细不可跳转**:点击会话行不会打开对应会话(跨插件导航需要宿主会话选择通道);会话数封顶 100 行、面板只显示前 20 行。
|
|
@@ -264,8 +267,10 @@ npm publish --access public
|
|
|
264
267
|
|
|
265
268
|
## ❤️ Contributors
|
|
266
269
|
|
|
267
|
-
- [@
|
|
270
|
+
- [@hwangjunjie](https://github.com/hwangjunjie) — 腾讯云 TokenHub / Token Plan 订阅额度适配(`src/tc3.ts`)、提供商优先通道分组与网关徽标、`routeAliases` / `modelKeyAliases` 配置(PR #35)
|
|
271
|
+
- [@ciphoo](https://github.com/ciphoo) — MiniMax 国内域 Token Plan 订阅额度支持(PR #5)、`minimax-cn` 订阅凭据接线(PR #12)、Windows 下账本并发写入 `MoveFileExW EPERM` 修复(PR #11)
|
|
268
272
|
- [@fabulousyuann-tech](https://github.com/fabulousyuann-tech) — 会话删除后用量保留的持久 ledger 功能(PR #8)
|
|
273
|
+
- [@hi-fangj](https://github.com/hi-fangj) — Token 每日图悬停精确明细(PR #21)、平价消耗胶囊开关(PR #22)、Token 每日图按模型视角与图例聚焦(PR #23)、性能面板按模型对比曲线(PR #24)
|
|
269
274
|
|
|
270
275
|
## 📄 许可证
|
|
271
276
|
|