@kenz1117/dsh-ui-usage-billing 1.0.1 → 1.0.2
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.md +33 -25
- package/lib/client.js +943 -433
- package/lib/index.js +432 -5
- package/lib/types/client/vendor-logos.d.ts +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -142,31 +142,39 @@ cost(CNY)= (missInput × p_input + cacheHit × p_cacheHit + output × p_outp
|
|
|
142
142
|
|
|
143
143
|
统计中的 `input` 为总输入(cacheHit + cacheMiss),估算按命中 / 未命中分拆计价,避免重复计费。支持双档计费的模型按 `DEFAULT_PEAK_SHARE`(默认 0.5)混合高峰与低谷档;周末(北京时间周六 / 周日)全天按低谷价计费。
|
|
144
144
|
|
|
145
|
-
### 支持模型(2026-08
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
| OpenAI | GPT-5.6 Sol / Terra / Luna
|
|
164
|
-
| Google | Gemini 3.1 Pro、3.6 Flash
|
|
165
|
-
| xAI | Grok 4.6
|
|
166
|
-
| Meta | Llama 4 Maverick
|
|
167
|
-
|
|
|
168
|
-
|
|
169
|
-
|
|
145
|
+
### 支持模型(2026-08 主流阵容,OpenAI 兼容系列,共 73 款)
|
|
146
|
+
|
|
147
|
+
完整目录见费率 Tab 及源码 `src/client/pricing.ts` 的 `MODEL_CATALOG`,此处每厂商仅列代表型号。
|
|
148
|
+
|
|
149
|
+
| 厂商 | 代表模型 |
|
|
150
|
+
| -------- | -------------------------------------------- |
|
|
151
|
+
| DeepSeek | V4 Flash、V4 Pro(等 3 款;峰谷计费:工作日高峰 ×2、周末全天低谷) |
|
|
152
|
+
| 智谱 AI | GLM-5.3、GLM-5.2(等 10 款) |
|
|
153
|
+
| 阿里通义 | Qwen3.8 Max、Qwen3-Coder 480B(等 7 款) |
|
|
154
|
+
| 字节豆包 | Doubao Seed-2.1 Pro、Doubao-Seed-Evolving(等 8 款) |
|
|
155
|
+
| 月之暗面 | Kimi K3、Kimi K2.7 Code(等 9 款) |
|
|
156
|
+
| 小米 | MiMo V2.5(等 2 款)¹ |
|
|
157
|
+
| MiniMax | MiniMax-M3、MiniMax-M2.7(等 3 款) |
|
|
158
|
+
| 百度文心 | ERNIE-5.1、ERNIE-4.5 300B(等 2 款) |
|
|
159
|
+
| 腾讯混元 | 混元 T1、混元 Hy3(等 2 款) |
|
|
160
|
+
| Anthropic | Claude Opus 4.6、Claude Sonnet 4.6(等 5 款) |
|
|
161
|
+
| Mistral AI | Mistral Large 3、Mistral Small 4(等 3 款) |
|
|
162
|
+
| Cohere | Command A、Command R(等 2 款) |
|
|
163
|
+
| OpenAI | GPT-5.6 Sol / Terra / Luna(等 3 款) |
|
|
164
|
+
| Google | Gemini 3.1 Pro、Gemini 3.6 Flash(等 2 款) |
|
|
165
|
+
| xAI | Grok 4.6(等 2 款) |
|
|
166
|
+
| Meta | Llama 4 Maverick(等 2 款) |
|
|
167
|
+
| 美团 | LongCat 2.0(估算价) |
|
|
168
|
+
| 面壁智能 | MiniCPM-V 4.5(估算价) |
|
|
169
|
+
| 小红书 | Dots3-Note Preview(估算价) |
|
|
170
|
+
| 零一万物 | Yi-Lightning |
|
|
171
|
+
| 阶跃星辰 | Step 3.7 Flash |
|
|
172
|
+
| 科大讯飞 | Spark 4.0 Ultra(套餐制)¹ |
|
|
173
|
+
| 商汤 | SenseNova 6.5(公测中)¹ |
|
|
174
|
+
| 百川智能 | Baichuan M3-Plus |
|
|
175
|
+
| 其他 | 未收录模型的统一回退定价(费用记 0) |
|
|
176
|
+
|
|
177
|
+
> ¹ 讯飞、商汤、小米及美团 / 面壁智能 / 小红书等未公布官方按量单价的模型,表内为估算价(`estimated`);这些模型走订阅通道(coding / token plan / opencode)时费用记 0。订阅通道与 pi-ai 内置提供方对齐(kimi-coding、zai-coding-cn、opencode、opencode-go、qwen / xiaomi 的 token-plan 各区域变体),可按 `subscriptionProviders` 配置覆盖。
|
|
170
178
|
|
|
171
179
|
新增模型:在 `MODEL_CATALOG` 追加条目,并在 `src/client/pricing.ts` 的 `MODEL_KEY_ALIASES` 中映射真实模型 id(聚合层与客户端渲染共用同一张表)。
|
|
172
180
|
|