@kenz1117/dsh-ui-usage-billing 1.4.5 → 1.4.7

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 CHANGED
@@ -170,11 +170,11 @@ cost (CNY) = (missInput × p_input + cacheHit × p_cacheHit + output × p_output
170
170
  | Provider | Models |
171
171
  | -------- | ------------------------------------------------------------------------------------------- |
172
172
  | DeepSeek | V4.1 Flash, V4 Pro (priced per official change boundary: base tier → peak/off-peak v1 → weekend off-peak) |
173
- | 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 |
174
- | Aliyun | Qwen3.8 Max, Qwen3.7-Max, Qwen3.5-Plus, Qwen3.5-Flash |
173
+ | Zhipu AI | GLM-5.3, GLM-5.2, GLM-5.1, GLM-5, GLM-5-Turbo, GLM-4.7, GLM-4.6, GLM-4.5-Air, GLM-5V-Turbo |
174
+ | Aliyun | Qwen3.8 Max, Qwen3.7-Max, Qwen3.7-Plus, Qwen3.7-Flash, Qwen3.5-Plus, Qwen3.5-Flash, Qwen3-Coder 480B |
175
175
  | Doubao | Seed-2.0 Pro, Seed-2.0 Mini, Seed-1.6 |
176
176
  | Moonshot | Kimi K3, K2.7 Code, K2.7 Code HighSpeed, K2.6, K2.8 Preview |
177
- | Xiaomi | MiMo V2.5 (exempt when billed via a token-plan subscription channel)¹ |
177
+ | Xiaomi | MiMo V2.6 Pro, MiMo V2.6 Flash, MiMo V2.6 Pro UltraSpeed |
178
178
  | MiniMax | MiniMax-M3, MiniMax-M2.7, MiniMax-M2.7-highspeed |
179
179
  | Baidu | ERNIE-5.1 |
180
180
  | Tencent | Hunyuan T1, Hunyuan Hy3 |
@@ -185,13 +185,13 @@ cost (CNY) = (missInput × p_input + cacheHit × p_cacheHit + output × p_output
185
185
  | Baichuan | Baichuan M3-Plus |
186
186
  | OpenAI | GPT-6 Astra, GPT-5.6 Sol / Terra / Luna |
187
187
  | Google | Gemini 3.1 Pro, 3.6 Flash (Standard / Flex two-band, Flex = −50%) |
188
- | xAI | Grok 4.6, Grok 4.3 |
188
+ | xAI | Grok 4.7, Grok 4.6, Grok 4.3 |
189
189
  | Meta | Llama 4 Maverick, Scout |
190
190
  | Other | Unified fallback pricing for uncatalogued models |
191
191
 
192
- > ¹ iFlytek, SenseTime and Xiaomi have not published per-token prices — the table shows estimates; cost is 0 when these models go through a subscription channel (coding / token plan / opencode), and recalibrates automatically when official pricing is published. Subscription channels align with pi-ai built-in providers (kimi-coding, zai-coding-cn, opencode, opencode-go, qwen/xiaomi token-plan regional variants), overridable via `subscriptionProviders`.
192
+ > ¹ iFlytek and SenseTime have not published per-token prices — the table shows estimates; cost is 0 when these models go through a subscription channel (coding / token plan / opencode), and recalibrates automatically when official pricing is published. Subscription channels align with pi-ai built-in providers (kimi-coding, zai-coding-cn, opencode, opencode-go, qwen/xiaomi token-plan regional variants), overridable via `subscriptionProviders`.
193
193
 
194
- To add a model: append an entry to `MODEL_CATALOG` and map its real id in `MODEL_KEY_ALIASES` in `src/client/pricing.ts` (shared by the aggregation layer and the client renderer).
194
+ To add a model: append an entry to `BUILTIN_MODEL_CATALOG` in `src/builtin-catalog.ts` (key aliases live in `BUILTIN_MODEL_KEY_ALIASES` in the same file; the catalog is built only into the node half and served to the client from the host via `/api/billing/pricing`).
195
195
 
196
196
  ## 🔌 HTTP API
197
197
 
@@ -259,6 +259,8 @@ None. This plugin is a pure UI surface: it registers no tools, injects no system
259
259
 
260
260
  ## ❤️ Contributors
261
261
 
262
+ - [@lucagiftzek](https://github.com/lucagiftzek) — rate-table CSS polish (PR #59), `trustedHosts` reverse-proxy support (PR #60), currency preference persistence (PR #58), rate-table search (PR #67), peak/off-peak indicator dots with pin-to-composer (PR #68), and the EUR display currency with language decoupling (PR #70)
263
+ - [@hwangjunjie](https://github.com/hwangjunjie) — Tencent Cloud TokenHub / Token Plan subscription quota adaptation (`src/tc3.ts`), provider-first channel grouping with gateway badges, and the `routeAliases` / `modelKeyAliases` config (PR #35)
262
264
  - [@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)
263
265
  - [@fabulousyuann-tech](https://github.com/fabulousyuann-tech) — durable ledger that retains usage after session deletion (PR #8)
264
266
  - [@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)
package/README.md CHANGED
@@ -176,11 +176,11 @@ cost(CNY)= (missInput × p_input + cacheHit × p_cacheHit + output × p_outp
176
176
  | 厂商 | 代表模型 |
177
177
  | -------- | -------------------------------------------- |
178
178
  | DeepSeek | V4.1 Flash、V4 Pro(等 3 款;按官方变更节点分段计价:基础价 → 峰谷 v1 → 周末全谷) |
179
- | 智谱 AI | GLM-5.3、GLM-5.2(等 11 款) |
180
- | 阿里通义 | Qwen3.8 Max、Qwen3-Coder 480B(等 8 款) |
179
+ | 智谱 AI | GLM-5.3、GLM-5.2(等 12 款) |
180
+ | 阿里通义 | Qwen3.8 Max、Qwen3-Coder 480B(等 10 款) |
181
181
  | 字节豆包 | Doubao Seed-2.1 Pro、Doubao-Seed-Evolving(等 8 款) |
182
182
  | 月之暗面 | Kimi K3、Kimi K2.7 Code(等 10 款) |
183
- | 小米 | MiMo V2.5(等 2 款)¹ |
183
+ | 小米 | MiMo V2.6 Pro(等 4 款) |
184
184
  | MiniMax | MiniMax-M3、MiniMax-M2.7(等 3 款) |
185
185
  | 百度文心 | ERNIE-5.1、ERNIE-4.5 300B(等 2 款) |
186
186
  | 腾讯混元 | 混元 T1、混元 Hy3(等 2 款) |
@@ -189,7 +189,7 @@ cost(CNY)= (missInput × p_input + cacheHit × p_cacheHit + output × p_outp
189
189
  | Cohere | Command A、Command R(等 2 款) |
190
190
  | OpenAI | GPT-6 Astra、GPT-5.6 Sol / Terra / Luna(等 4 款) |
191
191
  | Google | Gemini 3.1 Pro、Gemini 3.6 Flash(等 2 款) |
192
- | xAI | Grok 4.6(等 2 款) |
192
+ | xAI | Grok 4.7(等 2 款) |
193
193
  | Meta | Llama 4 Maverick(等 2 款) |
194
194
  | 美团 | LongCat 2.0(估算价) |
195
195
  | 面壁智能 | MiniCPM-V 4.5(估算价) |
@@ -201,9 +201,9 @@ cost(CNY)= (missInput × p_input + cacheHit × p_cacheHit + output × p_outp
201
201
  | 百川智能 | Baichuan M3-Plus |
202
202
  | 其他 | 未收录模型的统一回退定价(费用记 0) |
203
203
 
204
- > ¹ 讯飞、商汤、小米及美团 / 面壁智能 / 小红书等未公布官方按量单价的模型,表内为估算价(`estimated`);这些模型走订阅通道(coding / token plan / opencode)时费用记 0。订阅通道与 pi-ai 内置提供方对齐(kimi-coding、zai-coding-cn、opencode、opencode-go、qwen / xiaomi 的 token-plan 各区域变体),可按 `subscriptionProviders` 配置覆盖。
204
+ > ¹ 讯飞、商汤及美团 / 面壁智能 / 小红书等未公布官方按量单价的模型,表内为估算价(`estimated`);这些模型走订阅通道(coding / token plan / opencode)时费用记 0。订阅通道与 pi-ai 内置提供方对齐(kimi-coding、zai-coding-cn、opencode、opencode-go、qwen / xiaomi 的 token-plan 各区域变体),可按 `subscriptionProviders` 配置覆盖。
205
205
 
206
- 新增模型:在 `MODEL_CATALOG` 追加条目,并在 `src/client/pricing.ts` 的 `MODEL_KEY_ALIASES` 中映射真实模型 id(聚合层与客户端渲染共用同一张表)。
206
+ 新增模型:在 `src/builtin-catalog.ts` 的 `BUILTIN_MODEL_CATALOG` 追加条目(别名表 `BUILTIN_MODEL_KEY_ALIASES` 同文件维护;目录只随 node 半构建,经 `/api/billing/pricing` 由宿主下发注入客户端)。
207
207
 
208
208
  ## 🔌 HTTP API
209
209
 
@@ -273,6 +273,7 @@ npm publish --access public
273
273
 
274
274
  ## ❤️ Contributors
275
275
 
276
+ - [@lucagiftzek](https://github.com/lucagiftzek) — 费率表 CSS 修整(PR #59)、`trustedHosts` 反代支持(PR #60)、币种偏好持久化(PR #58)、费率表搜索(PR #67)、峰谷指示点与固定到输入框(PR #68)、EUR 展示币种与界面语言解耦(PR #70)
276
277
  - [@hwangjunjie](https://github.com/hwangjunjie) — 腾讯云 TokenHub / Token Plan 订阅额度适配(`src/tc3.ts`)、提供商优先通道分组与网关徽标、`routeAliases` / `modelKeyAliases` 配置(PR #35)
277
278
  - [@ciphoo](https://github.com/ciphoo) — MiniMax 国内域 Token Plan 订阅额度支持(PR #5)、`minimax-cn` 订阅凭据接线(PR #12)、Windows 下账本并发写入 `MoveFileExW EPERM` 修复(PR #11)
278
279
  - [@fabulousyuann-tech](https://github.com/fabulousyuann-tech) — 会话删除后用量保留的持久 ledger 功能(PR #8)