@serviceme/devtools-shared 0.4.8 → 0.4.9
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/dist/index.d.mts +16 -9
- package/dist/index.d.ts +16 -9
- package/dist/index.js +122 -41
- package/dist/index.mjs +122 -41
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -341,6 +341,12 @@ interface ProviderMutationPayload {
|
|
|
341
341
|
enabled?: boolean;
|
|
342
342
|
/** See {@link ProviderConfig.minimaxBillingType}. */
|
|
343
343
|
minimaxBillingType?: "token_plan" | "pay_as_you_go";
|
|
344
|
+
/**
|
|
345
|
+
* See {@link ProviderConfig.visionMode} (2026-08-20 — surfaced in
|
|
346
|
+
* the ProvidersTab form). Omit to leave unchanged on update /
|
|
347
|
+
* default to `"native"` on add.
|
|
348
|
+
*/
|
|
349
|
+
visionMode?: ProviderVisionMode;
|
|
344
350
|
}
|
|
345
351
|
/** Which vendor API to call for usage data. */
|
|
346
352
|
type ProviderUsageKind = "minimax" | "deepseek" | "kimi" | "zhipu" | "stepfun" | "siliconflow" | "openrouter" | "novita";
|
|
@@ -568,15 +574,16 @@ declare function lookupModelMetadata(modelId: string): CuratedModelMetadata | un
|
|
|
568
574
|
* platform), `api.minimax.io` maps to USD (the global platform),
|
|
569
575
|
* everything else falls back to USD (the global default). The
|
|
570
576
|
* match is exact-host so a typo in the hostname never silently
|
|
571
|
-
* flips currency.
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
577
|
+
* flips currency.
|
|
578
|
+
*
|
|
579
|
+
* `api.deepseek.com` maps to CNY (2026-08-20 product decision —
|
|
580
|
+
* user request). History: the 8/18 draft put it in CNY by mistake
|
|
581
|
+
* (per the $ block on the English pricing page), 8/19 moved it to
|
|
582
|
+
* the USD catch-all, and 8/20 moved it BACK to CNY deliberately —
|
|
583
|
+
* our user base bills in ¥ on this endpoint (the official zh-cn
|
|
584
|
+
* page publishes the ¥ table for it), and the picker should show
|
|
585
|
+
* the price those users actually pay. The DeepSeek entries pin the
|
|
586
|
+
* PEAK tier (conservative worst-case; off-peak is exactly half).
|
|
580
587
|
*/
|
|
581
588
|
declare function currencyForBaseUrl(baseUrl: string): "USD" | "CNY";
|
|
582
589
|
|
package/dist/index.d.ts
CHANGED
|
@@ -341,6 +341,12 @@ interface ProviderMutationPayload {
|
|
|
341
341
|
enabled?: boolean;
|
|
342
342
|
/** See {@link ProviderConfig.minimaxBillingType}. */
|
|
343
343
|
minimaxBillingType?: "token_plan" | "pay_as_you_go";
|
|
344
|
+
/**
|
|
345
|
+
* See {@link ProviderConfig.visionMode} (2026-08-20 — surfaced in
|
|
346
|
+
* the ProvidersTab form). Omit to leave unchanged on update /
|
|
347
|
+
* default to `"native"` on add.
|
|
348
|
+
*/
|
|
349
|
+
visionMode?: ProviderVisionMode;
|
|
344
350
|
}
|
|
345
351
|
/** Which vendor API to call for usage data. */
|
|
346
352
|
type ProviderUsageKind = "minimax" | "deepseek" | "kimi" | "zhipu" | "stepfun" | "siliconflow" | "openrouter" | "novita";
|
|
@@ -568,15 +574,16 @@ declare function lookupModelMetadata(modelId: string): CuratedModelMetadata | un
|
|
|
568
574
|
* platform), `api.minimax.io` maps to USD (the global platform),
|
|
569
575
|
* everything else falls back to USD (the global default). The
|
|
570
576
|
* match is exact-host so a typo in the hostname never silently
|
|
571
|
-
* flips currency.
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
577
|
+
* flips currency.
|
|
578
|
+
*
|
|
579
|
+
* `api.deepseek.com` maps to CNY (2026-08-20 product decision —
|
|
580
|
+
* user request). History: the 8/18 draft put it in CNY by mistake
|
|
581
|
+
* (per the $ block on the English pricing page), 8/19 moved it to
|
|
582
|
+
* the USD catch-all, and 8/20 moved it BACK to CNY deliberately —
|
|
583
|
+
* our user base bills in ¥ on this endpoint (the official zh-cn
|
|
584
|
+
* page publishes the ¥ table for it), and the picker should show
|
|
585
|
+
* the price those users actually pay. The DeepSeek entries pin the
|
|
586
|
+
* PEAK tier (conservative worst-case; off-peak is exactly half).
|
|
580
587
|
*/
|
|
581
588
|
declare function currencyForBaseUrl(baseUrl: string): "USD" | "CNY";
|
|
582
589
|
|
package/dist/index.js
CHANGED
|
@@ -190,7 +190,18 @@ var PROVIDER_CACHE_CONTROL_METADATA = {
|
|
|
190
190
|
// OpenAI-compat prompt_cache_key
|
|
191
191
|
},
|
|
192
192
|
kimi: {},
|
|
193
|
-
|
|
193
|
+
// 2026-08-20 — Zhipu joins the cache-aware set (learnings doc §9
|
|
194
|
+
// task #6). Zhipu's OpenAI-compatible endpoint performs automatic
|
|
195
|
+
// prefix caching on stable request prefixes; the `prompt_cache_key`
|
|
196
|
+
// header the OpenAI adapter writes for cache-aware types gives the
|
|
197
|
+
// upstream a stable per-conversation bucket (mirrors the reference's
|
|
198
|
+
// Coding-Plan prompt-cache behaviour). The Anthropic-protocol
|
|
199
|
+
// `/api/anthropic` routes are unaffected — that path uses the
|
|
200
|
+
// AnthropicAdapter's own 4-breakpoint `cache_control` logic and
|
|
201
|
+
// ignores this flag.
|
|
202
|
+
zhipu: {
|
|
203
|
+
supportsCacheControl: true
|
|
204
|
+
},
|
|
194
205
|
stepfun: {},
|
|
195
206
|
siliconflow: {},
|
|
196
207
|
openrouter: {},
|
|
@@ -264,20 +275,20 @@ var PRIMARY_METADATA = {
|
|
|
264
275
|
detail: "Fast, general-purpose model",
|
|
265
276
|
imageInput: true,
|
|
266
277
|
toolCalling: true,
|
|
267
|
-
// Per https://api-docs.deepseek.com/quick_start/pricing
|
|
268
|
-
//
|
|
269
|
-
//
|
|
270
|
-
//
|
|
271
|
-
//
|
|
272
|
-
// 14:00–18:00 Beijing)
|
|
273
|
-
//
|
|
274
|
-
//
|
|
275
|
-
//
|
|
276
|
-
//
|
|
277
|
-
//
|
|
278
|
-
//
|
|
279
|
-
pricingUSD: { input: 0.
|
|
280
|
-
pricingCNY: { input:
|
|
278
|
+
// Per https://api-docs.deepseek.com/zh-cn/quick_start/pricing
|
|
279
|
+
// (re-fetched 2026-08-20): peak/off-peak tiered pricing since
|
|
280
|
+
// the 2026-08-17 调价. Pinned the PEAK rate (2026-08-20 product
|
|
281
|
+
// decision — user request): DeepSeek is surfaced as a CNY
|
|
282
|
+
// provider for China accounts, whose working hours
|
|
283
|
+
// (09:00–12:00 + 14:00–18:00 Beijing) fall entirely inside
|
|
284
|
+
// the peak window — peak is the conservative worst-case
|
|
285
|
+
// estimate (cost never exceeds it; off-peak turns are billed
|
|
286
|
+
// at exactly half).
|
|
287
|
+
// Peak: $0.014 cache hit / $0.44 input / $1.32 output
|
|
288
|
+
// ¥0.1 cache hit / ¥3 input / ¥9 output
|
|
289
|
+
// Off-peak: exactly 1/2 of peak (¥1.5 / ¥4.5 / ¥0.05).
|
|
290
|
+
pricingUSD: { input: 0.44, output: 1.32, cacheRead: 0.014 },
|
|
291
|
+
pricingCNY: { input: 3, output: 9, cacheRead: 0.1 },
|
|
281
292
|
priceCategory: "low",
|
|
282
293
|
// Official docs (api-docs.deepseek.com/quick_start/pricing, fetched
|
|
283
294
|
// 2026-07-27): "THINKING MODE: Supports both non-thinking and
|
|
@@ -293,20 +304,13 @@ var PRIMARY_METADATA = {
|
|
|
293
304
|
detail: "Most capable reasoning model",
|
|
294
305
|
imageInput: true,
|
|
295
306
|
toolCalling: true,
|
|
296
|
-
//
|
|
297
|
-
//
|
|
298
|
-
//
|
|
299
|
-
//
|
|
300
|
-
//
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
// ¥0.15 cache hit / ¥4.5 input / ¥13.5 output
|
|
304
|
-
// The 8/17 调价 raised cache hit 6× (¥0.025 → ¥0.15),
|
|
305
|
-
// input 1.5×, and output 2.25×. The pre-08-17 USD values
|
|
306
|
-
// (0.435/0.87/0.003625) and CNY values (2.1/4.2/0.025) did
|
|
307
|
-
// not correspond to any DeepSeek-published rate; corrected.
|
|
308
|
-
pricingUSD: { input: 0.66, output: 1.98, cacheRead: 0.022 },
|
|
309
|
-
pricingCNY: { input: 4.5, output: 13.5, cacheRead: 0.15 },
|
|
307
|
+
// Same source + same PEAK-tier decision as deepseek-v4-flash
|
|
308
|
+
// (2026-08-20): conservative worst-case estimate; off-peak is
|
|
309
|
+
// exactly half (¥4.5 / ¥13.5 / ¥0.15).
|
|
310
|
+
// Peak: $0.044 cache hit / $1.32 input / $3.96 output
|
|
311
|
+
// ¥0.3 cache hit / ¥9 input / ¥27 output
|
|
312
|
+
pricingUSD: { input: 1.32, output: 3.96, cacheRead: 0.044 },
|
|
313
|
+
pricingCNY: { input: 9, output: 27, cacheRead: 0.3 },
|
|
310
314
|
priceCategory: "low",
|
|
311
315
|
thinkingSchema: "thinkingEnabled",
|
|
312
316
|
maxInputTokens: 655360,
|
|
@@ -511,12 +515,15 @@ var PRIMARY_METADATA = {
|
|
|
511
515
|
// `docs/references/GLM-for-copilot-main/src/consts.ts`.
|
|
512
516
|
thinkingSchema: "reasoningEffort",
|
|
513
517
|
supportsReasoningEffort: true,
|
|
514
|
-
// Vendor
|
|
515
|
-
//
|
|
516
|
-
//
|
|
517
|
-
//
|
|
518
|
-
|
|
519
|
-
|
|
518
|
+
// Vendor pricing (corrected 2026-08-20): bigmodel.cn/pricing
|
|
519
|
+
// now lists GLM-5.3 at the SAME rate as GLM-5.2 —
|
|
520
|
+
// ¥8 input / ¥28 output / ¥2 cache hit per 1M tokens
|
|
521
|
+
// The previous CNY 10/31 was a mis-read of the Decrypt launch
|
|
522
|
+
// article (2026-08-14). USD comes from Z.ai's independently-
|
|
523
|
+
// set international list ($1.4 / $4.4 / $0.26 — not the ×0.14
|
|
524
|
+
// CNY mirror), matching the reference consts.ts USD block.
|
|
525
|
+
pricingUSD: { input: 1.4, output: 4.4, cacheRead: 0.26 },
|
|
526
|
+
pricingCNY: { input: 8, output: 28, cacheRead: 2 },
|
|
520
527
|
priceCategory: "high",
|
|
521
528
|
maxInputTokens: 1e6,
|
|
522
529
|
maxOutputTokens: 128e3
|
|
@@ -536,8 +543,10 @@ var PRIMARY_METADATA = {
|
|
|
536
543
|
thinkingSchema: "reasoningEffort",
|
|
537
544
|
// Mirrors GLM-5.1 [0, 32K) tier per bigmodel.cn/pricing 2026-08-18.
|
|
538
545
|
// TileRT is a serving-side optim; the per-token rate is the same
|
|
539
|
-
// architecture as the base model.
|
|
540
|
-
|
|
546
|
+
// architecture as the base model. USD = the standard ×0.14 mirror
|
|
547
|
+
// of 6/24/1.3 (2026-08-20 — fixed a copy-paste slip that had
|
|
548
|
+
// cloned glm-4.6's 0.6/2.2/0.11 USD block here, a ×0.10 rate).
|
|
549
|
+
pricingUSD: { input: 0.84, output: 3.36, cacheRead: 0.182 },
|
|
541
550
|
pricingCNY: { input: 6, output: 24, cacheRead: 1.3 },
|
|
542
551
|
priceCategory: "medium",
|
|
543
552
|
maxInputTokens: 2e5,
|
|
@@ -800,6 +809,62 @@ var PRIMARY_METADATA = {
|
|
|
800
809
|
maxInputTokens: 128e3,
|
|
801
810
|
maxOutputTokens: 8192
|
|
802
811
|
},
|
|
812
|
+
// GLM-4.6V-Flash — the FULLY-FREE vision model on
|
|
813
|
+
// bigmodel.cn/pricing's 视觉理解 tab (every column 免费,
|
|
814
|
+
// 2026-08-18 snapshot). This is the exact model the GLM-for-
|
|
815
|
+
// copilot reference uses as its transparent vision proxy
|
|
816
|
+
// (`DEFAULT_GLM_VISION_MODEL_ID` in its consts.ts — "the
|
|
817
|
+
// extension accepts images for text models through the
|
|
818
|
+
// GLM-4.6V-Flash vision proxy"). Zero cost makes it the
|
|
819
|
+
// natural candidate for our future ProxyVisionAdapter (v2).
|
|
820
|
+
// Token caps mirror the reference's entry (96K input + 32K
|
|
821
|
+
// output = the 128K shared window). Not in the zhipu preset —
|
|
822
|
+
// multimodal models aren't exposed via the public
|
|
823
|
+
// `/v1/chat/completions` models list (same trim rationale as
|
|
824
|
+
// glm-5v-turbo / glm-4.5v); users add it by hand.
|
|
825
|
+
"glm-4.6v-flash": {
|
|
826
|
+
detail: "GLM-4.6V Flash \u2014 \u5B8C\u5168\u514D\u8D39\u89C6\u89C9\u7406\u89E3\u6A21\u578B",
|
|
827
|
+
imageInput: true,
|
|
828
|
+
// Reference consts.ts declares GLM_TOOLS_LIMIT (128) tool
|
|
829
|
+
// calling for this model — the flash vision tier keeps the
|
|
830
|
+
// full function-call surface.
|
|
831
|
+
toolCalling: true,
|
|
832
|
+
// Thinking switch (auto-think family per the reference's
|
|
833
|
+
// `requiresThinkingParam: true`; no reasoning_effort —
|
|
834
|
+
// 4.6 < 5.2 threshold).
|
|
835
|
+
thinkingSchema: "reasoningEffort",
|
|
836
|
+
// Free tier — input / output / cache hit all 0 per
|
|
837
|
+
// bigmodel.cn 2026-08-18. USD mirrors CNY at 0 rather than
|
|
838
|
+
// inventing a rate.
|
|
839
|
+
pricingUSD: { input: 0, output: 0, cacheRead: 0 },
|
|
840
|
+
pricingCNY: { input: 0, output: 0, cacheRead: 0 },
|
|
841
|
+
priceCategory: "low",
|
|
842
|
+
maxInputTokens: 98304,
|
|
843
|
+
maxOutputTokens: 32768
|
|
844
|
+
},
|
|
845
|
+
// GLM-4.6V-FlashX — the 快速版 (quick) paid sibling of the free
|
|
846
|
+
// glm-4.6v-flash. Per bigmodel.cn/pricing 视觉理解 tab
|
|
847
|
+
// (2026-08-18):
|
|
848
|
+
// [0, 32K) — ¥0.15 input / ¥1.5 output / ¥0.03 cache hit
|
|
849
|
+
// [32K, 128K) — ¥0.3 input / ¥3 output / ¥0.03 cache hit
|
|
850
|
+
// The LOWER tier is pinned per the project's multi-tier
|
|
851
|
+
// convention. Not in the zhipu preset (same multimodal trim
|
|
852
|
+
// rationale as glm-4.6v-flash). Token caps are a best-guess
|
|
853
|
+
// from sibling glm-4.6v (128K context / 8K output) — Zhipu
|
|
854
|
+
// publishes no dedicated spec for the flashx vision tier.
|
|
855
|
+
"glm-4.6v-flashx": {
|
|
856
|
+
detail: "GLM-4.6V FlashX \u2014 \u5FEB\u901F\u7248\u89C6\u89C9\u7406\u89E3\uFF082-tier pricing\uFF09",
|
|
857
|
+
imageInput: true,
|
|
858
|
+
// 快速版 convention: the flashx siblings (glm-4.7-flashx,
|
|
859
|
+
// glm-4.5-airx) drop tool calling.
|
|
860
|
+
toolCalling: false,
|
|
861
|
+
thinkingSchema: "reasoningEffort",
|
|
862
|
+
pricingUSD: { input: 0.021, output: 0.21, cacheRead: 42e-4 },
|
|
863
|
+
pricingCNY: { input: 0.15, output: 1.5, cacheRead: 0.03 },
|
|
864
|
+
priceCategory: "low",
|
|
865
|
+
maxInputTokens: 128e3,
|
|
866
|
+
maxOutputTokens: 8192
|
|
867
|
+
},
|
|
803
868
|
"glm-5v-turbo": {
|
|
804
869
|
detail: "GLM-5V Turbo \u2014 \u591A\u6A21\u6001 Coding \u6A21\u578B\uFF082-tier pricing\uFF09",
|
|
805
870
|
imageInput: true,
|
|
@@ -952,9 +1017,13 @@ var PRIMARY_METADATA = {
|
|
|
952
1017
|
detail: "Qwen3.6-35B-A3B \u2014 35B MoE (3B \u6FC0\u6D3B)\uFF0C\u601D\u8003/\u975E\u601D\u8003\u53CC\u6A21\uFF0C256K \u4E0A\u4E0B\u6587",
|
|
953
1018
|
imageInput: true,
|
|
954
1019
|
toolCalling: true,
|
|
955
|
-
// SiliconFlow
|
|
956
|
-
|
|
957
|
-
|
|
1020
|
+
// SiliconFlow 官方价格页(https://siliconflow.cn/pricing,
|
|
1021
|
+
// re-fetched 2026-08-20):¥1.8 input / ¥10.8 output per 1M
|
|
1022
|
+
// tokens,无缓存价格列。此前 ¥1.6/¥12.8 来自发布新闻稿,
|
|
1023
|
+
// 已过时(输入上调、输出下调)。USD = CNY ÷7 镜像取两位
|
|
1024
|
+
// 小数(0.26 / 1.54)。
|
|
1025
|
+
pricingUSD: { input: 0.26, output: 1.54, cacheRead: null },
|
|
1026
|
+
pricingCNY: { input: 1.8, output: 10.8, cacheRead: null },
|
|
958
1027
|
priceCategory: "low",
|
|
959
1028
|
// Qwen3.6-35B-A3B 官方 256K context;output 上限按同代 27B
|
|
960
1029
|
// 同样 32K 取值(Qwen3.6 系列 max output 未单独公布)。
|
|
@@ -1024,7 +1093,19 @@ function currencyForBaseUrl(baseUrl) {
|
|
|
1024
1093
|
// don't surface it in the baseUrl dropdown, but a user
|
|
1025
1094
|
// may paste it from a saved settings.json, so the
|
|
1026
1095
|
// currency has to match (CNY, same as the new host).
|
|
1027
|
-
hostname === "dev.bigmodel.cn")
|
|
1096
|
+
hostname === "dev.bigmodel.cn" || // DeepSeek — 2026-08-20 product decision (user request):
|
|
1097
|
+
// surface the domestic ¥ prices. The `.com` endpoint
|
|
1098
|
+
// serves both regions, but our user base bills in CNY on
|
|
1099
|
+
// it (the official zh-cn pricing page publishes the ¥
|
|
1100
|
+
// table for this endpoint), so the picker now shows the
|
|
1101
|
+
// CNY block. This REVERSES the 2026-08-19 mapping that
|
|
1102
|
+
// left it in the USD catch-all ("$ block corresponds to
|
|
1103
|
+
// the .com endpoint") — with a CNY-billed user base, the
|
|
1104
|
+
// ¥ block is the relevant one. The pricingCNY block in
|
|
1105
|
+
// MODEL_METADATA pins the PEAK tier for these entries
|
|
1106
|
+
// (conservative worst-case; see the deepseek-v4-flash
|
|
1107
|
+
// comment).
|
|
1108
|
+
hostname === "api.deepseek.com") {
|
|
1028
1109
|
return "CNY";
|
|
1029
1110
|
}
|
|
1030
1111
|
if (hostname === "api.minimax.io" || hostname === "api.minimaxi.io" || hostname === "api.siliconflow.cn" || hostname === "api.siliconflow.com" || hostname === "api.stepfun.com" || hostname === "openrouter.ai" || hostname === "api.novita.ai" || // Z.ai / Zhipu international. Billed in USD per the
|
package/dist/index.mjs
CHANGED
|
@@ -115,7 +115,18 @@ var PROVIDER_CACHE_CONTROL_METADATA = {
|
|
|
115
115
|
// OpenAI-compat prompt_cache_key
|
|
116
116
|
},
|
|
117
117
|
kimi: {},
|
|
118
|
-
|
|
118
|
+
// 2026-08-20 — Zhipu joins the cache-aware set (learnings doc §9
|
|
119
|
+
// task #6). Zhipu's OpenAI-compatible endpoint performs automatic
|
|
120
|
+
// prefix caching on stable request prefixes; the `prompt_cache_key`
|
|
121
|
+
// header the OpenAI adapter writes for cache-aware types gives the
|
|
122
|
+
// upstream a stable per-conversation bucket (mirrors the reference's
|
|
123
|
+
// Coding-Plan prompt-cache behaviour). The Anthropic-protocol
|
|
124
|
+
// `/api/anthropic` routes are unaffected — that path uses the
|
|
125
|
+
// AnthropicAdapter's own 4-breakpoint `cache_control` logic and
|
|
126
|
+
// ignores this flag.
|
|
127
|
+
zhipu: {
|
|
128
|
+
supportsCacheControl: true
|
|
129
|
+
},
|
|
119
130
|
stepfun: {},
|
|
120
131
|
siliconflow: {},
|
|
121
132
|
openrouter: {},
|
|
@@ -189,20 +200,20 @@ var PRIMARY_METADATA = {
|
|
|
189
200
|
detail: "Fast, general-purpose model",
|
|
190
201
|
imageInput: true,
|
|
191
202
|
toolCalling: true,
|
|
192
|
-
// Per https://api-docs.deepseek.com/quick_start/pricing
|
|
193
|
-
//
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
-
//
|
|
197
|
-
// 14:00–18:00 Beijing)
|
|
198
|
-
//
|
|
199
|
-
//
|
|
200
|
-
//
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
pricingUSD: { input: 0.
|
|
205
|
-
pricingCNY: { input:
|
|
203
|
+
// Per https://api-docs.deepseek.com/zh-cn/quick_start/pricing
|
|
204
|
+
// (re-fetched 2026-08-20): peak/off-peak tiered pricing since
|
|
205
|
+
// the 2026-08-17 调价. Pinned the PEAK rate (2026-08-20 product
|
|
206
|
+
// decision — user request): DeepSeek is surfaced as a CNY
|
|
207
|
+
// provider for China accounts, whose working hours
|
|
208
|
+
// (09:00–12:00 + 14:00–18:00 Beijing) fall entirely inside
|
|
209
|
+
// the peak window — peak is the conservative worst-case
|
|
210
|
+
// estimate (cost never exceeds it; off-peak turns are billed
|
|
211
|
+
// at exactly half).
|
|
212
|
+
// Peak: $0.014 cache hit / $0.44 input / $1.32 output
|
|
213
|
+
// ¥0.1 cache hit / ¥3 input / ¥9 output
|
|
214
|
+
// Off-peak: exactly 1/2 of peak (¥1.5 / ¥4.5 / ¥0.05).
|
|
215
|
+
pricingUSD: { input: 0.44, output: 1.32, cacheRead: 0.014 },
|
|
216
|
+
pricingCNY: { input: 3, output: 9, cacheRead: 0.1 },
|
|
206
217
|
priceCategory: "low",
|
|
207
218
|
// Official docs (api-docs.deepseek.com/quick_start/pricing, fetched
|
|
208
219
|
// 2026-07-27): "THINKING MODE: Supports both non-thinking and
|
|
@@ -218,20 +229,13 @@ var PRIMARY_METADATA = {
|
|
|
218
229
|
detail: "Most capable reasoning model",
|
|
219
230
|
imageInput: true,
|
|
220
231
|
toolCalling: true,
|
|
221
|
-
//
|
|
222
|
-
//
|
|
223
|
-
//
|
|
224
|
-
//
|
|
225
|
-
//
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
// ¥0.15 cache hit / ¥4.5 input / ¥13.5 output
|
|
229
|
-
// The 8/17 调价 raised cache hit 6× (¥0.025 → ¥0.15),
|
|
230
|
-
// input 1.5×, and output 2.25×. The pre-08-17 USD values
|
|
231
|
-
// (0.435/0.87/0.003625) and CNY values (2.1/4.2/0.025) did
|
|
232
|
-
// not correspond to any DeepSeek-published rate; corrected.
|
|
233
|
-
pricingUSD: { input: 0.66, output: 1.98, cacheRead: 0.022 },
|
|
234
|
-
pricingCNY: { input: 4.5, output: 13.5, cacheRead: 0.15 },
|
|
232
|
+
// Same source + same PEAK-tier decision as deepseek-v4-flash
|
|
233
|
+
// (2026-08-20): conservative worst-case estimate; off-peak is
|
|
234
|
+
// exactly half (¥4.5 / ¥13.5 / ¥0.15).
|
|
235
|
+
// Peak: $0.044 cache hit / $1.32 input / $3.96 output
|
|
236
|
+
// ¥0.3 cache hit / ¥9 input / ¥27 output
|
|
237
|
+
pricingUSD: { input: 1.32, output: 3.96, cacheRead: 0.044 },
|
|
238
|
+
pricingCNY: { input: 9, output: 27, cacheRead: 0.3 },
|
|
235
239
|
priceCategory: "low",
|
|
236
240
|
thinkingSchema: "thinkingEnabled",
|
|
237
241
|
maxInputTokens: 655360,
|
|
@@ -436,12 +440,15 @@ var PRIMARY_METADATA = {
|
|
|
436
440
|
// `docs/references/GLM-for-copilot-main/src/consts.ts`.
|
|
437
441
|
thinkingSchema: "reasoningEffort",
|
|
438
442
|
supportsReasoningEffort: true,
|
|
439
|
-
// Vendor
|
|
440
|
-
//
|
|
441
|
-
//
|
|
442
|
-
//
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
// Vendor pricing (corrected 2026-08-20): bigmodel.cn/pricing
|
|
444
|
+
// now lists GLM-5.3 at the SAME rate as GLM-5.2 —
|
|
445
|
+
// ¥8 input / ¥28 output / ¥2 cache hit per 1M tokens
|
|
446
|
+
// The previous CNY 10/31 was a mis-read of the Decrypt launch
|
|
447
|
+
// article (2026-08-14). USD comes from Z.ai's independently-
|
|
448
|
+
// set international list ($1.4 / $4.4 / $0.26 — not the ×0.14
|
|
449
|
+
// CNY mirror), matching the reference consts.ts USD block.
|
|
450
|
+
pricingUSD: { input: 1.4, output: 4.4, cacheRead: 0.26 },
|
|
451
|
+
pricingCNY: { input: 8, output: 28, cacheRead: 2 },
|
|
445
452
|
priceCategory: "high",
|
|
446
453
|
maxInputTokens: 1e6,
|
|
447
454
|
maxOutputTokens: 128e3
|
|
@@ -461,8 +468,10 @@ var PRIMARY_METADATA = {
|
|
|
461
468
|
thinkingSchema: "reasoningEffort",
|
|
462
469
|
// Mirrors GLM-5.1 [0, 32K) tier per bigmodel.cn/pricing 2026-08-18.
|
|
463
470
|
// TileRT is a serving-side optim; the per-token rate is the same
|
|
464
|
-
// architecture as the base model.
|
|
465
|
-
|
|
471
|
+
// architecture as the base model. USD = the standard ×0.14 mirror
|
|
472
|
+
// of 6/24/1.3 (2026-08-20 — fixed a copy-paste slip that had
|
|
473
|
+
// cloned glm-4.6's 0.6/2.2/0.11 USD block here, a ×0.10 rate).
|
|
474
|
+
pricingUSD: { input: 0.84, output: 3.36, cacheRead: 0.182 },
|
|
466
475
|
pricingCNY: { input: 6, output: 24, cacheRead: 1.3 },
|
|
467
476
|
priceCategory: "medium",
|
|
468
477
|
maxInputTokens: 2e5,
|
|
@@ -725,6 +734,62 @@ var PRIMARY_METADATA = {
|
|
|
725
734
|
maxInputTokens: 128e3,
|
|
726
735
|
maxOutputTokens: 8192
|
|
727
736
|
},
|
|
737
|
+
// GLM-4.6V-Flash — the FULLY-FREE vision model on
|
|
738
|
+
// bigmodel.cn/pricing's 视觉理解 tab (every column 免费,
|
|
739
|
+
// 2026-08-18 snapshot). This is the exact model the GLM-for-
|
|
740
|
+
// copilot reference uses as its transparent vision proxy
|
|
741
|
+
// (`DEFAULT_GLM_VISION_MODEL_ID` in its consts.ts — "the
|
|
742
|
+
// extension accepts images for text models through the
|
|
743
|
+
// GLM-4.6V-Flash vision proxy"). Zero cost makes it the
|
|
744
|
+
// natural candidate for our future ProxyVisionAdapter (v2).
|
|
745
|
+
// Token caps mirror the reference's entry (96K input + 32K
|
|
746
|
+
// output = the 128K shared window). Not in the zhipu preset —
|
|
747
|
+
// multimodal models aren't exposed via the public
|
|
748
|
+
// `/v1/chat/completions` models list (same trim rationale as
|
|
749
|
+
// glm-5v-turbo / glm-4.5v); users add it by hand.
|
|
750
|
+
"glm-4.6v-flash": {
|
|
751
|
+
detail: "GLM-4.6V Flash \u2014 \u5B8C\u5168\u514D\u8D39\u89C6\u89C9\u7406\u89E3\u6A21\u578B",
|
|
752
|
+
imageInput: true,
|
|
753
|
+
// Reference consts.ts declares GLM_TOOLS_LIMIT (128) tool
|
|
754
|
+
// calling for this model — the flash vision tier keeps the
|
|
755
|
+
// full function-call surface.
|
|
756
|
+
toolCalling: true,
|
|
757
|
+
// Thinking switch (auto-think family per the reference's
|
|
758
|
+
// `requiresThinkingParam: true`; no reasoning_effort —
|
|
759
|
+
// 4.6 < 5.2 threshold).
|
|
760
|
+
thinkingSchema: "reasoningEffort",
|
|
761
|
+
// Free tier — input / output / cache hit all 0 per
|
|
762
|
+
// bigmodel.cn 2026-08-18. USD mirrors CNY at 0 rather than
|
|
763
|
+
// inventing a rate.
|
|
764
|
+
pricingUSD: { input: 0, output: 0, cacheRead: 0 },
|
|
765
|
+
pricingCNY: { input: 0, output: 0, cacheRead: 0 },
|
|
766
|
+
priceCategory: "low",
|
|
767
|
+
maxInputTokens: 98304,
|
|
768
|
+
maxOutputTokens: 32768
|
|
769
|
+
},
|
|
770
|
+
// GLM-4.6V-FlashX — the 快速版 (quick) paid sibling of the free
|
|
771
|
+
// glm-4.6v-flash. Per bigmodel.cn/pricing 视觉理解 tab
|
|
772
|
+
// (2026-08-18):
|
|
773
|
+
// [0, 32K) — ¥0.15 input / ¥1.5 output / ¥0.03 cache hit
|
|
774
|
+
// [32K, 128K) — ¥0.3 input / ¥3 output / ¥0.03 cache hit
|
|
775
|
+
// The LOWER tier is pinned per the project's multi-tier
|
|
776
|
+
// convention. Not in the zhipu preset (same multimodal trim
|
|
777
|
+
// rationale as glm-4.6v-flash). Token caps are a best-guess
|
|
778
|
+
// from sibling glm-4.6v (128K context / 8K output) — Zhipu
|
|
779
|
+
// publishes no dedicated spec for the flashx vision tier.
|
|
780
|
+
"glm-4.6v-flashx": {
|
|
781
|
+
detail: "GLM-4.6V FlashX \u2014 \u5FEB\u901F\u7248\u89C6\u89C9\u7406\u89E3\uFF082-tier pricing\uFF09",
|
|
782
|
+
imageInput: true,
|
|
783
|
+
// 快速版 convention: the flashx siblings (glm-4.7-flashx,
|
|
784
|
+
// glm-4.5-airx) drop tool calling.
|
|
785
|
+
toolCalling: false,
|
|
786
|
+
thinkingSchema: "reasoningEffort",
|
|
787
|
+
pricingUSD: { input: 0.021, output: 0.21, cacheRead: 42e-4 },
|
|
788
|
+
pricingCNY: { input: 0.15, output: 1.5, cacheRead: 0.03 },
|
|
789
|
+
priceCategory: "low",
|
|
790
|
+
maxInputTokens: 128e3,
|
|
791
|
+
maxOutputTokens: 8192
|
|
792
|
+
},
|
|
728
793
|
"glm-5v-turbo": {
|
|
729
794
|
detail: "GLM-5V Turbo \u2014 \u591A\u6A21\u6001 Coding \u6A21\u578B\uFF082-tier pricing\uFF09",
|
|
730
795
|
imageInput: true,
|
|
@@ -877,9 +942,13 @@ var PRIMARY_METADATA = {
|
|
|
877
942
|
detail: "Qwen3.6-35B-A3B \u2014 35B MoE (3B \u6FC0\u6D3B)\uFF0C\u601D\u8003/\u975E\u601D\u8003\u53CC\u6A21\uFF0C256K \u4E0A\u4E0B\u6587",
|
|
878
943
|
imageInput: true,
|
|
879
944
|
toolCalling: true,
|
|
880
|
-
// SiliconFlow
|
|
881
|
-
|
|
882
|
-
|
|
945
|
+
// SiliconFlow 官方价格页(https://siliconflow.cn/pricing,
|
|
946
|
+
// re-fetched 2026-08-20):¥1.8 input / ¥10.8 output per 1M
|
|
947
|
+
// tokens,无缓存价格列。此前 ¥1.6/¥12.8 来自发布新闻稿,
|
|
948
|
+
// 已过时(输入上调、输出下调)。USD = CNY ÷7 镜像取两位
|
|
949
|
+
// 小数(0.26 / 1.54)。
|
|
950
|
+
pricingUSD: { input: 0.26, output: 1.54, cacheRead: null },
|
|
951
|
+
pricingCNY: { input: 1.8, output: 10.8, cacheRead: null },
|
|
883
952
|
priceCategory: "low",
|
|
884
953
|
// Qwen3.6-35B-A3B 官方 256K context;output 上限按同代 27B
|
|
885
954
|
// 同样 32K 取值(Qwen3.6 系列 max output 未单独公布)。
|
|
@@ -949,7 +1018,19 @@ function currencyForBaseUrl(baseUrl) {
|
|
|
949
1018
|
// don't surface it in the baseUrl dropdown, but a user
|
|
950
1019
|
// may paste it from a saved settings.json, so the
|
|
951
1020
|
// currency has to match (CNY, same as the new host).
|
|
952
|
-
hostname === "dev.bigmodel.cn")
|
|
1021
|
+
hostname === "dev.bigmodel.cn" || // DeepSeek — 2026-08-20 product decision (user request):
|
|
1022
|
+
// surface the domestic ¥ prices. The `.com` endpoint
|
|
1023
|
+
// serves both regions, but our user base bills in CNY on
|
|
1024
|
+
// it (the official zh-cn pricing page publishes the ¥
|
|
1025
|
+
// table for this endpoint), so the picker now shows the
|
|
1026
|
+
// CNY block. This REVERSES the 2026-08-19 mapping that
|
|
1027
|
+
// left it in the USD catch-all ("$ block corresponds to
|
|
1028
|
+
// the .com endpoint") — with a CNY-billed user base, the
|
|
1029
|
+
// ¥ block is the relevant one. The pricingCNY block in
|
|
1030
|
+
// MODEL_METADATA pins the PEAK tier for these entries
|
|
1031
|
+
// (conservative worst-case; see the deepseek-v4-flash
|
|
1032
|
+
// comment).
|
|
1033
|
+
hostname === "api.deepseek.com") {
|
|
953
1034
|
return "CNY";
|
|
954
1035
|
}
|
|
955
1036
|
if (hostname === "api.minimax.io" || hostname === "api.minimaxi.io" || hostname === "api.siliconflow.cn" || hostname === "api.siliconflow.com" || hostname === "api.stepfun.com" || hostname === "openrouter.ai" || hostname === "api.novita.ai" || // Z.ai / Zhipu international. Billed in USD per the
|
package/package.json
CHANGED