@serviceme/devtools-shared 0.4.8 → 0.4.10

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 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. The earlier 2026-08-18 draft also mapped
572
- * `api.deepseek.com` to CNY, but that was wrong: DeepSeek's
573
- * international `.com` endpoint publishes USD prices for global
574
- * accounts (per https://api-docs.deepseek.com/quick_start/pricing/,
575
- * which lists both $ and ¥ on the same page, with the $ block
576
- * corresponding to the .com endpoint). The CNY-priced alternative
577
- * is the China-domestic region, not the international `.com`
578
- * host, so the currency now follows the project default (USD)
579
- * via the catch-all below.
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
 
@@ -600,7 +607,7 @@ declare function currencyForBaseUrl(baseUrl: string): "USD" | "CNY";
600
607
  * - agnes: OpenAI-compatible at `https://apihub.agnes-ai.com/v1`
601
608
  * → routed to OpenAIAdapter
602
609
  * - medalsoft: OpenAI-compatible internal gateway at
603
- * `https://llm.proxy.alio.wang/v1` → routed to OpenAIAdapter
610
+ * `https://nexus.servicemecloud.com/v1` → routed to OpenAIAdapter
604
611
  * (empty starter model list — populate via "Fetch from API")
605
612
  *
606
613
  * Earlier iterations of the minimax default 401'd on the team; do
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. The earlier 2026-08-18 draft also mapped
572
- * `api.deepseek.com` to CNY, but that was wrong: DeepSeek's
573
- * international `.com` endpoint publishes USD prices for global
574
- * accounts (per https://api-docs.deepseek.com/quick_start/pricing/,
575
- * which lists both $ and ¥ on the same page, with the $ block
576
- * corresponding to the .com endpoint). The CNY-priced alternative
577
- * is the China-domestic region, not the international `.com`
578
- * host, so the currency now follows the project default (USD)
579
- * via the catch-all below.
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
 
@@ -600,7 +607,7 @@ declare function currencyForBaseUrl(baseUrl: string): "USD" | "CNY";
600
607
  * - agnes: OpenAI-compatible at `https://apihub.agnes-ai.com/v1`
601
608
  * → routed to OpenAIAdapter
602
609
  * - medalsoft: OpenAI-compatible internal gateway at
603
- * `https://llm.proxy.alio.wang/v1` → routed to OpenAIAdapter
610
+ * `https://nexus.servicemecloud.com/v1` → routed to OpenAIAdapter
604
611
  * (empty starter model list — populate via "Fetch from API")
605
612
  *
606
613
  * Earlier iterations of the minimax default 401'd on the team; do
package/dist/index.js CHANGED
@@ -170,7 +170,7 @@ var PROVIDER_BASE_URL_PRESETS = {
170
170
  { label: "\u5168\u7403", baseUrl: "https://apihub.agnes-ai.com/v1" }
171
171
  ],
172
172
  // Medalsoft internal LLM gateway — single OpenAI-compatible endpoint.
173
- medalsoft: [{ label: "\u5185\u90E8\u7F51\u5173", baseUrl: "https://llm.proxy.alio.wang/v1" }],
173
+ medalsoft: [{ label: "\u5185\u90E8\u7F51\u5173", baseUrl: "https://nexus.servicemecloud.com/v1" }],
174
174
  "vscode-builtin": []
175
175
  };
176
176
  function getProviderBaseUrlPresets(type) {
@@ -190,7 +190,18 @@ var PROVIDER_CACHE_CONTROL_METADATA = {
190
190
  // OpenAI-compat prompt_cache_key
191
191
  },
192
192
  kimi: {},
193
- zhipu: {},
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/ and
268
- // https://new.qq.com/rain/a/20260813A0DROS00 (2026-08-13
269
- // announcement, effective 2026-08-17 00:00 Beijing): peak/
270
- // off-peak tiered pricing. Pinned the OFF-PEAK rate since
271
- // peak hours (01:00–04:00 + 06:00–10:00 UTC = 09:00–12:00 +
272
- // 14:00–18:00 Beijing) cover only 8 of 24 hours — most chat
273
- // sessions land off-peak. Peak is exactly off-peak per
274
- // the official page.
275
- // Off-peak: $0.007 cache hit / $0.22 input / $0.66 output
276
- // ¥0.05 cache hit / ¥1.5 input / ¥4.5 output
277
- // The pre-2026-08-17 rate was 1/3 of the current off-peak;
278
- // 8/17 调价 raised cache hit and output 2.25×.
279
- pricingUSD: { input: 0.22, output: 0.66, cacheRead: 7e-3 },
280
- pricingCNY: { input: 1.5, output: 4.5, cacheRead: 0.05 },
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
- // Per https://api-docs.deepseek.com/quick_start/pricing/ and
297
- // https://new.qq.com/rain/a/20260813A0DROS00 (2026-08-13
298
- // announcement, effective 2026-08-17 00:00 Beijing): peak/
299
- // off-peak tiered pricing. Pinned the OFF-PEAK rate (peak
300
- // hours are 8/24; most chat sessions land off-peak; peak is
301
- // exactly off-peak per the official page).
302
- // Off-peak: $0.022 cache hit / $0.66 input / $1.98 output
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-published USD price (Decrypt, 2026-08-14). Cache-hit price
515
- // has not been published the picker shows "(not published)" rather
516
- // than fabricating a number (the rate usually diverges 4–10× from
517
- // input, so a guess would mislead budget estimates).
518
- pricingUSD: { input: 1.4, output: 4.4, cacheRead: null },
519
- pricingCNY: { input: 10, output: 31, cacheRead: null },
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
- pricingUSD: { input: 0.6, output: 2.2, cacheRead: 0.11 },
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 列价:¥1.6 / ¥12.8 per 1M tokens
956
- pricingUSD: { input: 0.23, output: 1.83, cacheRead: null },
957
- pricingCNY: { input: 1.6, output: 12.8, cacheRead: null },
1020
+ // SiliconFlow 官方价格页(https://siliconflow.cn/pricing,
1021
+ // re-fetched 2026-08-20):¥1.8 input / ¥10.8 output per 1M
1022
+ // tokens,无缓存价格列。此前 ¥1.612.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
@@ -1437,7 +1518,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1437
1518
  // NOTE: models fetched from the gateway carry the upstream model
1438
1519
  // ids, so the curated metadata (pricing / thinking dropdown /
1439
1520
  // token caps) still resolves via `MODEL_METADATA` after the fetch.
1440
- baseUrl: "https://llm.proxy.alio.wang/v1",
1521
+ baseUrl: "https://nexus.servicemecloud.com/v1",
1441
1522
  models: []
1442
1523
  }
1443
1524
  };
package/dist/index.mjs CHANGED
@@ -95,7 +95,7 @@ var PROVIDER_BASE_URL_PRESETS = {
95
95
  { label: "\u5168\u7403", baseUrl: "https://apihub.agnes-ai.com/v1" }
96
96
  ],
97
97
  // Medalsoft internal LLM gateway — single OpenAI-compatible endpoint.
98
- medalsoft: [{ label: "\u5185\u90E8\u7F51\u5173", baseUrl: "https://llm.proxy.alio.wang/v1" }],
98
+ medalsoft: [{ label: "\u5185\u90E8\u7F51\u5173", baseUrl: "https://nexus.servicemecloud.com/v1" }],
99
99
  "vscode-builtin": []
100
100
  };
101
101
  function getProviderBaseUrlPresets(type) {
@@ -115,7 +115,18 @@ var PROVIDER_CACHE_CONTROL_METADATA = {
115
115
  // OpenAI-compat prompt_cache_key
116
116
  },
117
117
  kimi: {},
118
- zhipu: {},
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/ and
193
- // https://new.qq.com/rain/a/20260813A0DROS00 (2026-08-13
194
- // announcement, effective 2026-08-17 00:00 Beijing): peak/
195
- // off-peak tiered pricing. Pinned the OFF-PEAK rate since
196
- // peak hours (01:00–04:00 + 06:00–10:00 UTC = 09:00–12:00 +
197
- // 14:00–18:00 Beijing) cover only 8 of 24 hours — most chat
198
- // sessions land off-peak. Peak is exactly off-peak per
199
- // the official page.
200
- // Off-peak: $0.007 cache hit / $0.22 input / $0.66 output
201
- // ¥0.05 cache hit / ¥1.5 input / ¥4.5 output
202
- // The pre-2026-08-17 rate was 1/3 of the current off-peak;
203
- // 8/17 调价 raised cache hit and output 2.25×.
204
- pricingUSD: { input: 0.22, output: 0.66, cacheRead: 7e-3 },
205
- pricingCNY: { input: 1.5, output: 4.5, cacheRead: 0.05 },
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
- // Per https://api-docs.deepseek.com/quick_start/pricing/ and
222
- // https://new.qq.com/rain/a/20260813A0DROS00 (2026-08-13
223
- // announcement, effective 2026-08-17 00:00 Beijing): peak/
224
- // off-peak tiered pricing. Pinned the OFF-PEAK rate (peak
225
- // hours are 8/24; most chat sessions land off-peak; peak is
226
- // exactly off-peak per the official page).
227
- // Off-peak: $0.022 cache hit / $0.66 input / $1.98 output
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-published USD price (Decrypt, 2026-08-14). Cache-hit price
440
- // has not been published the picker shows "(not published)" rather
441
- // than fabricating a number (the rate usually diverges 4–10× from
442
- // input, so a guess would mislead budget estimates).
443
- pricingUSD: { input: 1.4, output: 4.4, cacheRead: null },
444
- pricingCNY: { input: 10, output: 31, cacheRead: null },
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
- pricingUSD: { input: 0.6, output: 2.2, cacheRead: 0.11 },
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 列价:¥1.6 / ¥12.8 per 1M tokens
881
- pricingUSD: { input: 0.23, output: 1.83, cacheRead: null },
882
- pricingCNY: { input: 1.6, output: 12.8, cacheRead: null },
945
+ // SiliconFlow 官方价格页(https://siliconflow.cn/pricing,
946
+ // re-fetched 2026-08-20):¥1.8 input / ¥10.8 output per 1M
947
+ // tokens,无缓存价格列。此前 ¥1.612.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
@@ -1362,7 +1443,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1362
1443
  // NOTE: models fetched from the gateway carry the upstream model
1363
1444
  // ids, so the curated metadata (pricing / thinking dropdown /
1364
1445
  // token caps) still resolves via `MODEL_METADATA` after the fetch.
1365
- baseUrl: "https://llm.proxy.alio.wang/v1",
1446
+ baseUrl: "https://nexus.servicemecloud.com/v1",
1366
1447
  models: []
1367
1448
  }
1368
1449
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serviceme/devtools-shared",
3
- "version": "0.4.8",
3
+ "version": "0.4.10",
4
4
  "description": "Shared webview↔extension message contracts and cross-package data models used by SERVICEME.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {