@kenz1117/dsh-ui-usage-billing 1.4.5 → 1.4.6
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 +8 -6
- package/README.md +7 -6
- package/lib/index.js +120 -5
- package/package.json +1 -1
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.
|
|
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
|
|
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 `
|
|
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(等
|
|
180
|
-
| 阿里通义 | Qwen3.8 Max、Qwen3-Coder 480B(等
|
|
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.
|
|
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.
|
|
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
|
-
> ¹
|
|
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
|
-
新增模型:在 `
|
|
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)
|
package/lib/index.js
CHANGED
|
@@ -1140,6 +1140,42 @@ const BUILTIN_MODEL_CATALOG = [
|
|
|
1140
1140
|
output: 100
|
|
1141
1141
|
}
|
|
1142
1142
|
},
|
|
1143
|
+
{
|
|
1144
|
+
key: "mimo-v2.6-pro",
|
|
1145
|
+
name: "MiMo V2.6 Pro",
|
|
1146
|
+
provider: "小米",
|
|
1147
|
+
colorVar: "dsw-static-green-400",
|
|
1148
|
+
price: {
|
|
1149
|
+
currency: "CNY",
|
|
1150
|
+
input: 3,
|
|
1151
|
+
cacheHit: .025,
|
|
1152
|
+
output: 6
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
key: "mimo-v2.6-flash",
|
|
1157
|
+
name: "MiMo V2.6 Flash",
|
|
1158
|
+
provider: "小米",
|
|
1159
|
+
colorVar: "dsw-static-green-400",
|
|
1160
|
+
price: {
|
|
1161
|
+
currency: "CNY",
|
|
1162
|
+
input: 1,
|
|
1163
|
+
cacheHit: .02,
|
|
1164
|
+
output: 2
|
|
1165
|
+
}
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
key: "mimo-v2.6-pro-ultraspeed",
|
|
1169
|
+
name: "MiMo V2.6 Pro UltraSpeed",
|
|
1170
|
+
provider: "小米",
|
|
1171
|
+
colorVar: "dsw-static-green-400",
|
|
1172
|
+
price: {
|
|
1173
|
+
currency: "CNY",
|
|
1174
|
+
input: 30,
|
|
1175
|
+
cacheHit: .25,
|
|
1176
|
+
output: 60
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1143
1179
|
{
|
|
1144
1180
|
key: "mimo-v2.5",
|
|
1145
1181
|
name: "MiMo V2.5",
|
|
@@ -1402,6 +1438,18 @@ const BUILTIN_MODEL_CATALOG = [
|
|
|
1402
1438
|
peakHours: GEMINI_PEAK_HOURS,
|
|
1403
1439
|
tierSemantics: "latency"
|
|
1404
1440
|
},
|
|
1441
|
+
{
|
|
1442
|
+
key: "grok-4.7",
|
|
1443
|
+
name: "Grok 4.7",
|
|
1444
|
+
provider: "xAI",
|
|
1445
|
+
colorVar: "dsw-static-neutral-bluish-700",
|
|
1446
|
+
price: {
|
|
1447
|
+
currency: "USD",
|
|
1448
|
+
input: 2,
|
|
1449
|
+
cacheHit: .5,
|
|
1450
|
+
output: 6
|
|
1451
|
+
}
|
|
1452
|
+
},
|
|
1405
1453
|
{
|
|
1406
1454
|
key: "grok",
|
|
1407
1455
|
name: "Grok 4.6",
|
|
@@ -1622,6 +1670,62 @@ const BUILTIN_MODEL_CATALOG = [
|
|
|
1622
1670
|
},
|
|
1623
1671
|
estimated: true
|
|
1624
1672
|
},
|
|
1673
|
+
{
|
|
1674
|
+
key: "qwen3.7-plus",
|
|
1675
|
+
name: "Qwen3.7 Plus",
|
|
1676
|
+
provider: "阿里通义",
|
|
1677
|
+
colorVar: "dsw-static-orange-500",
|
|
1678
|
+
price: {
|
|
1679
|
+
currency: "CNY",
|
|
1680
|
+
input: 2,
|
|
1681
|
+
cacheHit: .4,
|
|
1682
|
+
output: 8
|
|
1683
|
+
},
|
|
1684
|
+
extraRows: [
|
|
1685
|
+
{
|
|
1686
|
+
label: "显式缓存创建",
|
|
1687
|
+
input: 2.5
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
label: "显式缓存命中",
|
|
1691
|
+
input: .2
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
label: "Batch File",
|
|
1695
|
+
input: 1,
|
|
1696
|
+
output: 4,
|
|
1697
|
+
note: "长期半价"
|
|
1698
|
+
}
|
|
1699
|
+
]
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
key: "qwen3.7-flash",
|
|
1703
|
+
name: "Qwen3.7 Flash",
|
|
1704
|
+
provider: "阿里通义",
|
|
1705
|
+
colorVar: "dsw-static-orange-400",
|
|
1706
|
+
price: {
|
|
1707
|
+
currency: "CNY",
|
|
1708
|
+
input: .2,
|
|
1709
|
+
cacheHit: .02,
|
|
1710
|
+
output: .8
|
|
1711
|
+
},
|
|
1712
|
+
extraRows: [
|
|
1713
|
+
{
|
|
1714
|
+
label: "显式缓存创建",
|
|
1715
|
+
input: .25
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
label: "显式缓存命中",
|
|
1719
|
+
input: .02
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
label: "Batch File",
|
|
1723
|
+
input: .1,
|
|
1724
|
+
output: .4,
|
|
1725
|
+
note: "长期半价"
|
|
1726
|
+
}
|
|
1727
|
+
]
|
|
1728
|
+
},
|
|
1625
1729
|
{
|
|
1626
1730
|
key: "qwen3.6-max",
|
|
1627
1731
|
name: "Qwen3.6 Max",
|
|
@@ -1686,6 +1790,18 @@ const BUILTIN_MODEL_CATALOG = [
|
|
|
1686
1790
|
},
|
|
1687
1791
|
estimated: true
|
|
1688
1792
|
},
|
|
1793
|
+
{
|
|
1794
|
+
key: "glm-5",
|
|
1795
|
+
name: "GLM-5",
|
|
1796
|
+
provider: "智谱 AI",
|
|
1797
|
+
colorVar: "dsw-static-blue-400",
|
|
1798
|
+
price: {
|
|
1799
|
+
currency: "CNY",
|
|
1800
|
+
input: 4,
|
|
1801
|
+
cacheHit: 1,
|
|
1802
|
+
output: 18
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1689
1805
|
{
|
|
1690
1806
|
key: "glm-5.2-fast",
|
|
1691
1807
|
name: "GLM-5.2 Fast",
|
|
@@ -1693,11 +1809,10 @@ const BUILTIN_MODEL_CATALOG = [
|
|
|
1693
1809
|
colorVar: "dsw-static-blue-300",
|
|
1694
1810
|
price: {
|
|
1695
1811
|
currency: "CNY",
|
|
1696
|
-
input:
|
|
1697
|
-
cacheHit:
|
|
1698
|
-
output:
|
|
1699
|
-
}
|
|
1700
|
-
estimated: true
|
|
1812
|
+
input: 16,
|
|
1813
|
+
cacheHit: 4,
|
|
1814
|
+
output: 56
|
|
1815
|
+
}
|
|
1701
1816
|
},
|
|
1702
1817
|
{
|
|
1703
1818
|
key: "kimi-k3-fast",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenz1117/dsh-ui-usage-billing",
|
|
3
3
|
"description": "Usage billing dashboard for DeepSeek Harness: sidebar cost metrics plus a full dashboard modal, priced from a current multi-provider catalog with real usage aggregated from session logs.",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.6",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
7
7
|
"deepseek",
|