@serviceme/devtools-shared 0.4.7 → 0.4.8

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.js CHANGED
@@ -29,8 +29,12 @@ __export(index_exports, {
29
29
  GetCachedServerUrl: () => GetCachedServerUrl,
30
30
  GetServerProxyState: () => GetServerProxyState,
31
31
  GetUtilityModels: () => GetUtilityModels,
32
+ LISTABLE_PRESET_MODELS: () => LISTABLE_PRESET_MODELS,
32
33
  LogLevel: () => LogLevel,
33
34
  MODEL_METADATA: () => MODEL_METADATA,
35
+ NAMESPACE_ALIASES: () => NAMESPACE_ALIASES,
36
+ NAMESPACE_ALIAS_FAMILY: () => NAMESPACE_ALIAS_FAMILY,
37
+ PRESET_MODEL_FAMILIES: () => PRESET_MODEL_FAMILIES,
34
38
  PROVIDER_BASE_URL_PRESETS: () => PROVIDER_BASE_URL_PRESETS,
35
39
  PROVIDER_CACHE_CONTROL_METADATA: () => PROVIDER_CACHE_CONTROL_METADATA,
36
40
  ServerProxyStateResponse: () => ServerProxyStateResponse,
@@ -43,6 +47,7 @@ __export(index_exports, {
43
47
  __internal: () => __internal,
44
48
  asAbortSignal: () => asAbortSignal,
45
49
  buildGitHubLocalEmail: () => buildGitHubLocalEmail,
50
+ buildPresetModel: () => buildPresetModel,
46
51
  checkGitHubOrgMembership: () => checkGitHubOrgMembership,
47
52
  createConsoleLogger: () => createConsoleLogger,
48
53
  currencyForBaseUrl: () => currencyForBaseUrl,
@@ -50,10 +55,12 @@ __export(index_exports, {
50
55
  fetchGitHubUser: () => fetchGitHubUser,
51
56
  getBuiltinProviderPreset: () => getBuiltinProviderPreset,
52
57
  getGitHubOrgMembership: () => getGitHubOrgMembership,
58
+ getPresetModelDisplayName: () => getPresetModelDisplayName,
53
59
  getProviderBaseUrlPresets: () => getProviderBaseUrlPresets,
54
60
  isGitHubLocalEmail: () => isGitHubLocalEmail,
55
61
  isProviderCacheControlAware: () => isProviderCacheControlAware,
56
62
  isValidCanonicalSlug: () => isValidCanonicalSlug,
63
+ listPresetModelGroups: () => listPresetModelGroups,
57
64
  lookupModelMetadata: () => lookupModelMetadata,
58
65
  normalizeCanonicalSlug: () => normalizeCanonicalSlug,
59
66
  normalizeErrorForLog: () => normalizeErrorForLog,
@@ -61,7 +68,8 @@ __export(index_exports, {
61
68
  parsePayload: () => parsePayload,
62
69
  protocolForBaseUrl: () => protocolForBaseUrl,
63
70
  resolvePrimaryEmail: () => resolvePrimaryEmail,
64
- safeJson: () => safeJson
71
+ safeJson: () => safeJson,
72
+ unionProviderModelWithPreset: () => unionProviderModelWithPreset
65
73
  });
66
74
  module.exports = __toCommonJS(index_exports);
67
75
 
@@ -117,8 +125,14 @@ var PROVIDER_BASE_URL_PRESETS = {
117
125
  // pasted `open.bigmodel.cn/api/paas/v4` into a Coding Plan
118
126
  // key, and Z.ai users had no preset to pick.
119
127
  // ── 国内 (open.bigmodel.cn — CNY) ───────────────────────
120
- { label: "\u56FD\u5185 \xB7 \u6807\u51C6 API", baseUrl: "https://open.bigmodel.cn/api/paas/v4" },
121
- { label: "\u56FD\u5185 \xB7 Coding Plan", baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4" },
128
+ {
129
+ label: "\u56FD\u5185 \xB7 \u6807\u51C6 API",
130
+ baseUrl: "https://open.bigmodel.cn/api/paas/v4"
131
+ },
132
+ {
133
+ label: "\u56FD\u5185 \xB7 Coding Plan",
134
+ baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4"
135
+ },
122
136
  // 重要:Anthropic 协议端点 **复用** Coding Plan 的 key(与
123
137
  // `/api/coding/paas/v4` 共用同一凭证;不是 Standard API key,
124
138
  // 也没有独立的 "Anthropic API key")。
@@ -135,8 +149,14 @@ var PROVIDER_BASE_URL_PRESETS = {
135
149
  },
136
150
  // ── 国际 (api.z.ai — USD) ───────────────────────────────
137
151
  { label: "\u56FD\u9645 \xB7 \u6807\u51C6 API", baseUrl: "https://api.z.ai/api/paas/v4" },
138
- { label: "\u56FD\u9645 \xB7 Coding Plan", baseUrl: "https://api.z.ai/api/coding/paas/v4" },
139
- { label: "\u56FD\u9645 \xB7 Coding Plan \xB7 Anthropic \u534F\u8BAE", baseUrl: "https://api.z.ai/api/anthropic" }
152
+ {
153
+ label: "\u56FD\u9645 \xB7 Coding Plan",
154
+ baseUrl: "https://api.z.ai/api/coding/paas/v4"
155
+ },
156
+ {
157
+ label: "\u56FD\u9645 \xB7 Coding Plan \xB7 Anthropic \u534F\u8BAE",
158
+ baseUrl: "https://api.z.ai/api/anthropic"
159
+ }
140
160
  ],
141
161
  stepfun: [{ label: "\u5B98\u65B9", baseUrl: "https://api.stepfun.com/v1" }],
142
162
  siliconflow: [
@@ -149,6 +169,8 @@ var PROVIDER_BASE_URL_PRESETS = {
149
169
  { label: "\u56FD\u5185", baseUrl: "https://api.agnes-ai.cn/v1" },
150
170
  { label: "\u5168\u7403", baseUrl: "https://apihub.agnes-ai.com/v1" }
151
171
  ],
172
+ // Medalsoft internal LLM gateway — single OpenAI-compatible endpoint.
173
+ medalsoft: [{ label: "\u5185\u90E8\u7F51\u5173", baseUrl: "https://llm.proxy.alio.wang/v1" }],
152
174
  "vscode-builtin": []
153
175
  };
154
176
  function getProviderBaseUrlPresets(type) {
@@ -176,6 +198,12 @@ var PROVIDER_CACHE_CONTROL_METADATA = {
176
198
  agnes: {
177
199
  supportsCacheControl: true
178
200
  },
201
+ // Medalsoft internal gateway — OpenAI-compatible pass-through; the
202
+ // upstream's prompt-cache behaviour is unknown from outside, so we
203
+ // don't declare support (no `prompt_cache_key` header is written).
204
+ // Flip to `supportsCacheControl: true` once the gateway is verified
205
+ // to honour stable prompt caching.
206
+ medalsoft: {},
179
207
  "vscode-builtin": {}
180
208
  };
181
209
  function isProviderCacheControlAware(type) {
@@ -321,6 +349,44 @@ var PRIMARY_METADATA = {
321
349
  maxInputTokens: 934976,
322
350
  maxOutputTokens: 65536
323
351
  },
352
+ "agnes-2.5-pro": {
353
+ detail: "Paid reasoning model \u2014 commercial stable of 2.5 Pro Alpha (advanced coding, scientific reasoning, long context, multimodal). 1M context / 65K max output",
354
+ imageInput: true,
355
+ toolCalling: true,
356
+ // Official pricing per https://wiki.agnes-ai.com/en/docs/agnes-25-pro.md
357
+ // (fetched 2026-08-19) — identical to 2.5 Pro Alpha:
358
+ // $0.45 input / $0.0038 cache read / $0.90 output per 1M tokens.
359
+ // No separate CNY tier is published, so pricingCNY mirrors USD.
360
+ pricingUSD: { input: 0.45, output: 0.9, cacheRead: 38e-4 },
361
+ pricingCNY: { input: 0.45, output: 0.9, cacheRead: 38e-4 },
362
+ priceCategory: "medium",
363
+ // Same binary Thinking on/off switch as the other Agnes models
364
+ // (`chat_template_kwargs.enable_thinking` on the OpenAI wire).
365
+ thinkingSchema: "thinkingEnabled",
366
+ // Same published window as 2.5 Pro Alpha: 1M context /
367
+ // 65536 max output — input cap mirrors the alpha entry.
368
+ maxInputTokens: 934976,
369
+ maxOutputTokens: 65536
370
+ },
371
+ "agnes-2.5-flash": {
372
+ detail: "GA upgrade of Agnes 2.0 Flash \u2014 stronger coding, agent workflows, tool calling, image understanding (512K context)",
373
+ imageInput: true,
374
+ toolCalling: true,
375
+ // Standard (post-promo) pricing per
376
+ // https://wiki.agnes-ai.com/en/docs/agnes-25-flash.md (fetched
377
+ // 2026-08-19) — same list price as 2.0 Flash ($0.03 / $0.15 per
378
+ // 1M tokens); the temporary $0 / $0 promo is ignored per the
379
+ // same policy as the 2.0 Flash entry. No separate CNY tier is
380
+ // published, so pricingCNY mirrors the USD numbers.
381
+ pricingUSD: { input: 0.03, output: 0.15, cacheRead: null },
382
+ pricingCNY: { input: 0.03, output: 0.15, cacheRead: null },
383
+ priceCategory: "low",
384
+ // Same binary Thinking on/off switch as 2.0 Flash
385
+ // (`chat_template_kwargs.enable_thinking` on the OpenAI wire).
386
+ thinkingSchema: "thinkingEnabled",
387
+ maxInputTokens: 512e3,
388
+ maxOutputTokens: 65536
389
+ },
324
390
  // ── Kimi (月之暗面 / Moonshot AI) ────────────────────────────────
325
391
  // Source: https://platform.kimi.com/docs/pricing/chat-k3,
326
392
  // chat-k27-code, chat-k26 (fetched 2026-07-27). Prices are per 1M
@@ -409,6 +475,13 @@ var PRIMARY_METADATA = {
409
475
  detail: "GLM-5.2 \u2014 1M \u4E0A\u4E0B\u6587\uFF0C\u6700\u5927\u8F93\u51FA 128K\uFF08\u5355\u6863 pricing\uFF09",
410
476
  imageInput: false,
411
477
  toolCalling: true,
478
+ // Thinking-mode dropdown + `reasoning_effort`. Zhipu official
479
+ // OpenAPI (fetched 2026-08-19): "仅 GLM-5.2 及其以上模型支持"
480
+ // reasoning_effort; for 5.2 the server maps none/minimal → give
481
+ // up thinking, low/medium → high, xhigh → max (we only send the
482
+ // native high/max so no client-side aliasing is needed).
483
+ thinkingSchema: "reasoningEffort",
484
+ supportsReasoningEffort: true,
412
485
  // Single rate (no input-length tier split) per
413
486
  // bigmodel.cn/pricing 2026-08-18:
414
487
  // ¥8 input / ¥28 output / ¥2 cache hit per 1M tokens
@@ -430,6 +503,14 @@ var PRIMARY_METADATA = {
430
503
  detail: "GLM-5.3 \u2014 1M \u4E0A\u4E0B\u6587\uFF0C\u540E\u8BAD\u7EC3\u589E\u5F3A\u4EE3\u7801 / \u7F51\u7EDC\u5B89\u5168",
431
504
  imageInput: false,
432
505
  toolCalling: true,
506
+ // Thinking-mode dropdown (思考模式 停用/标准/深度) + the
507
+ // `reasoning_effort` field. Zhipu official OpenAPI (fetched
508
+ // 2026-08-19): GLM-5.3 restricts `thinking.type` to "enabled"
509
+ // and controls depth via `reasoning_effort` (low/high/max
510
+ // only). Mirrors `supportsReasoningEffort: true` in
511
+ // `docs/references/GLM-for-copilot-main/src/consts.ts`.
512
+ thinkingSchema: "reasoningEffort",
513
+ supportsReasoningEffort: true,
433
514
  // Vendor-published USD price (Decrypt, 2026-08-14). Cache-hit price
434
515
  // has not been published — the picker shows "(not published)" rather
435
516
  // than fabricating a number (the rate usually diverges 4–10× from
@@ -451,6 +532,8 @@ var PRIMARY_METADATA = {
451
532
  detail: "GLM-5.1 HighSpeed \u2014 400 TPS \u9AD8\u541E\u5410\u751F\u4EA7\u53D8\u4F53\uFF08[0, 32K) tier \u955C\u50CF GLM-5.1\uFF09",
452
533
  imageInput: false,
453
534
  toolCalling: true,
535
+ // Thinking switch (no reasoning_effort — 5.1 < 5.2 threshold).
536
+ thinkingSchema: "reasoningEffort",
454
537
  // Mirrors GLM-5.1 [0, 32K) tier per bigmodel.cn/pricing 2026-08-18.
455
538
  // TileRT is a serving-side optim; the per-token rate is the same
456
539
  // architecture as the base model.
@@ -470,6 +553,8 @@ var PRIMARY_METADATA = {
470
553
  detail: "GLM-4.7 Flash \u2014 \u5B8C\u5168\u514D\u8D39\uFF08200K \u4E0A\u4E0B\u6587\uFF09",
471
554
  imageInput: false,
472
555
  toolCalling: true,
556
+ // Thinking switch (no reasoning_effort — 4.7 < 5.2 threshold).
557
+ thinkingSchema: "reasoningEffort",
473
558
  // Free tier — input / output / cache hit all 0 (bigmodel.cn
474
559
  // 2026-08-18 lists "免费" for every column). USD mirrors CNY
475
560
  // rather than inventing a rate.
@@ -483,6 +568,9 @@ var PRIMARY_METADATA = {
483
568
  detail: "GLM-4.7 \u2014 200K \u4E0A\u4E0B\u6587\uFF0C\u5DE5\u5177\u8C03\u7528\uFF083-tier pricing\uFF09",
484
569
  imageInput: false,
485
570
  toolCalling: true,
571
+ // Thinking switch (GLM-4.7 forces thinking when enabled per the
572
+ // official ChatThinking doc; no reasoning_effort — 4.7 < 5.2).
573
+ thinkingSchema: "reasoningEffort",
486
574
  // Pinned the LOWEST tier per bigmodel.cn/pricing 2026-08-18:
487
575
  // [0, 32K) input × [0, 0.2K) output — ¥2 / ¥8 / ¥0.4 cache hit
488
576
  // [0, 32K) input × [0.2K+) output — ¥3 / ¥14 / ¥0.6 cache hit
@@ -500,6 +588,8 @@ var PRIMARY_METADATA = {
500
588
  detail: "GLM-5.1 \u2014 200K \u4E0A\u4E0B\u6587\uFF0C\u6700\u5927\u8F93\u51FA 128K\uFF082-tier pricing\uFF09",
501
589
  imageInput: false,
502
590
  toolCalling: true,
591
+ // Thinking switch (no reasoning_effort — 5.1 < 5.2 threshold).
592
+ thinkingSchema: "reasoningEffort",
503
593
  // Pinned the LOWER tier per bigmodel.cn/pricing 2026-08-18:
504
594
  // [0, 32K) — ¥6 input / ¥24 output / ¥1.3 cache hit
505
595
  // [32K+) — ¥8 input / ¥28 output / ¥2 cache hit
@@ -515,6 +605,8 @@ var PRIMARY_METADATA = {
515
605
  detail: "GLM-5 \u2014 200K \u4E0A\u4E0B\u6587\uFF0CAgentic \u5DE5\u5177\u8C03\u7528\uFF0C\u6700\u5927\u8F93\u51FA 128K\uFF082-tier pricing\uFF09",
516
606
  imageInput: false,
517
607
  toolCalling: true,
608
+ // Thinking switch (no reasoning_effort — 5 < 5.2 threshold).
609
+ thinkingSchema: "reasoningEffort",
518
610
  // Pinned the LOWER tier per bigmodel.cn/pricing 2026-08-18:
519
611
  // [0, 32K) — ¥4 input / ¥18 output / ¥1 cache hit
520
612
  // [32K+) — ¥6 input / ¥22 output / ¥1.5 cache hit
@@ -528,6 +620,9 @@ var PRIMARY_METADATA = {
528
620
  detail: "GLM-5 Turbo \u2014 200K \u4E0A\u4E0B\u6587\uFF0C\u6700\u5927\u8F93\u51FA 128K\uFF082-tier pricing\uFF09",
529
621
  imageInput: false,
530
622
  toolCalling: true,
623
+ // Thinking switch (listed in the official ChatThinking doc's
624
+ // auto-think family; no reasoning_effort — 5-Turbo < 5.2).
625
+ thinkingSchema: "reasoningEffort",
531
626
  // Pinned the LOWER tier per bigmodel.cn/pricing 2026-08-18:
532
627
  // [0, 32K) — ¥5 input / ¥22 output / ¥1.2 cache hit
533
628
  // [32K+) — ¥7 input / ¥26 output / ¥1.8 cache hit
@@ -541,6 +636,8 @@ var PRIMARY_METADATA = {
541
636
  detail: "GLM-4.7 FlashX \u2014 \u5FEB\u901F\u7248",
542
637
  imageInput: false,
543
638
  toolCalling: false,
639
+ // Thinking switch (4.7 family; no reasoning_effort).
640
+ thinkingSchema: "reasoningEffort",
544
641
  // ¥0.5 input / ¥3 output / ¥0.1 cache hit per 1M tokens
545
642
  pricingUSD: { input: 0.07, output: 0.42, cacheRead: 0.014 },
546
643
  pricingCNY: { input: 0.5, output: 3, cacheRead: 0.1 },
@@ -552,6 +649,9 @@ var PRIMARY_METADATA = {
552
649
  detail: "GLM-4.6 \u2014 \u5DE5\u5177\u8C03\u7528",
553
650
  imageInput: false,
554
651
  toolCalling: true,
652
+ // Thinking switch (auto-think family per the official
653
+ // ChatThinking doc; no reasoning_effort — 4.6 < 5.2).
654
+ thinkingSchema: "reasoningEffort",
555
655
  pricingUSD: { input: 0.6, output: 2.2, cacheRead: 0.11 },
556
656
  pricingCNY: { input: 4.3, output: 15.7, cacheRead: 0.79 },
557
657
  priceCategory: "medium",
@@ -573,6 +673,9 @@ var PRIMARY_METADATA = {
573
673
  detail: "GLM-4.5 \u2014 \u5DE5\u5177\u8C03\u7528\uFF08\u88F8\u540D\uFF1BZhipu /v1/models \u66B4\u9732\u7684 legacy alias\uFF09",
574
674
  imageInput: false,
575
675
  toolCalling: true,
676
+ // Thinking switch (4.5 generation is the thinking-param floor
677
+ // per the official ChatThinking doc; no reasoning_effort).
678
+ thinkingSchema: "reasoningEffort",
576
679
  pricingUSD: { input: 0, output: 0, cacheRead: null },
577
680
  pricingCNY: { input: 0, output: 0, cacheRead: null },
578
681
  priceCategory: "low",
@@ -583,6 +686,8 @@ var PRIMARY_METADATA = {
583
686
  detail: "GLM-4.5 Air \u2014 \u5DE5\u5177\u8C03\u7528\uFF083-tier pricing\uFF09",
584
687
  imageInput: false,
585
688
  toolCalling: true,
689
+ // Thinking switch (4.5 family; no reasoning_effort).
690
+ thinkingSchema: "reasoningEffort",
586
691
  // Pinned the LOWEST tier per bigmodel.cn/pricing 2026-08-18:
587
692
  // [0, 32K) × [0, 0.2K) output — ¥0.8 / ¥2 / ¥0.16 cache hit
588
693
  // [0, 32K) × [0.2K+) output — ¥0.8 / ¥6 / ¥0.16 cache hit
@@ -599,6 +704,8 @@ var PRIMARY_METADATA = {
599
704
  detail: "GLM-4.5 AirX \u2014 \u5FEB\u901F\u7248\uFF08\xA510/M \u5355\u6863\uFF09",
600
705
  imageInput: false,
601
706
  toolCalling: false,
707
+ // Thinking switch (4.5 family; no reasoning_effort).
708
+ thinkingSchema: "reasoningEffort",
602
709
  // ¥10 / M tokens (single rate, input == output) per
603
710
  // bigmodel.cn/pricing 2026-08-18 — listed under the "模型推理
604
711
  // → Language Models" sub-tab, NOT the flagship text section.
@@ -647,6 +754,9 @@ var PRIMARY_METADATA = {
647
754
  detail: "GLM-4.5V \u89C6\u89C9\u63A8\u7406\u6A21\u578B \u2014 \u56FE\u50CF/\u89C6\u9891/\u6587\u6863/GUI\uFF082-tier pricing\uFF09",
648
755
  imageInput: true,
649
756
  toolCalling: true,
757
+ // Thinking switch (official ChatThinking doc: GLM-4.5V 为强制
758
+ // 思考 when enabled; no reasoning_effort).
759
+ thinkingSchema: "reasoningEffort",
650
760
  // Pinned the LOWER tier per bigmodel.cn/pricing 2026-08-18:
651
761
  // [0, 32K) — ¥2 input / ¥6 output / ¥0.4 cache hit
652
762
  // [32, 64K) — ¥4 input / ¥12 output / ¥0.8 cache hit
@@ -656,10 +766,47 @@ var PRIMARY_METADATA = {
656
766
  maxInputTokens: 64e3,
657
767
  maxOutputTokens: 8192
658
768
  },
769
+ // GLM-4.6V (2026 H1) — 视觉推理模型 (paid version, 2-tier
770
+ // pricing). Distinct from `glm-4.6v-flash` (免费版, 0/0/0) and
771
+ // `glm-4.6v-flashx` (快速版, ¥0.15/¥1.5/¥0.03). Per
772
+ // bigmodel.cn/pricing 2026-08-18 (the same snapshot the
773
+ // §7 table in `byom-glm-learnings.md` was sourced from, where
774
+ // this row was first documented but never landed in
775
+ // MODEL_METADATA until 2026-08-19):
776
+ // [0, 32K) — ¥1 input / ¥3 output / ¥0.2 cache hit
777
+ // [32, 128K) — ¥2 input / ¥6 output / ¥0.4 cache hit
778
+ // The lower tier is pinned per the project's "multi-tier →
779
+ // lowest tier" convention (most prompts < 32K input × < 0.2K
780
+ // output). 4.6V sits between glm-4.5v (¥2/¥6/¥0.4) and the
781
+ // flashx variant — the 4.6 generation is meaningfully cheaper
782
+ // per the 2026 mid-year price reset.
783
+ "glm-4.6v": {
784
+ detail: "GLM-4.6V \u89C6\u89C9\u63A8\u7406\u6A21\u578B \u2014 \u56FE\u50CF/\u89C6\u9891/\u6587\u6863/GUI\uFF082-tier pricing\uFF09",
785
+ imageInput: true,
786
+ toolCalling: true,
787
+ // Thinking switch (same auto-think family as glm-4.5v;
788
+ // 4.6 < 5.2 threshold, so no reasoning_effort).
789
+ thinkingSchema: "reasoningEffort",
790
+ // Pinned the LOWER tier [0, 32K) per bigmodel.cn/pricing
791
+ // 2026-08-18. USD mirrors the CNY/7 ratio with 2-decimal
792
+ // rounding (matches glm-4.5v's USD rounding style).
793
+ pricingUSD: { input: 0.14, output: 0.42, cacheRead: 0.028 },
794
+ pricingCNY: { input: 1, output: 3, cacheRead: 0.2 },
795
+ // Tier boundary is 128K (vs glm-4.5v's 64K), so a
796
+ // `medium` tier tag is still appropriate — the 4.6V is
797
+ // cheaper than glm-4.5v but not a "low" tier like the
798
+ // 0.5/3/0.1 flashx family.
799
+ priceCategory: "medium",
800
+ maxInputTokens: 128e3,
801
+ maxOutputTokens: 8192
802
+ },
659
803
  "glm-5v-turbo": {
660
804
  detail: "GLM-5V Turbo \u2014 \u591A\u6A21\u6001 Coding \u6A21\u578B\uFF082-tier pricing\uFF09",
661
805
  imageInput: true,
662
806
  toolCalling: true,
807
+ // Thinking switch (listed in the official ChatThinking doc's
808
+ // auto-think family; no reasoning_effort).
809
+ thinkingSchema: "reasoningEffort",
663
810
  // Pinned the LOWER tier per bigmodel.cn/pricing 2026-08-18:
664
811
  // [0, 32K) — ¥5 input / ¥22 output / ¥1.2 cache hit
665
812
  // [32K+) — ¥7 input / ¥26 output / ¥1.8 cache hit
@@ -838,6 +985,20 @@ var NAMESPACE_ALIASES = {
838
985
  // from the curated detail / pricing / capability columns.
839
986
  "glm-4-flashx-250414": "glm-4-flashx"
840
987
  };
988
+ var NAMESPACE_ALIAS_FAMILY = {
989
+ // SiliconFlow
990
+ "deepseek-ai/DeepSeek-V4-Pro": "SiliconFlow (aggregator)",
991
+ "deepseek-ai/DeepSeek-V4-Flash": "SiliconFlow (aggregator)",
992
+ "zai-org/GLM-5.2": "SiliconFlow (aggregator)",
993
+ "Qwen/Qwen3.6-35B-A3B": "SiliconFlow (aggregator)",
994
+ "moonshotai/Kimi-K2.7-Code": "SiliconFlow (aggregator)",
995
+ // Novita
996
+ "deepseek/deepseek-v4-pro": "Novita (aggregator)",
997
+ "deepseek/deepseek-v4-flash": "Novita (aggregator)",
998
+ "zai/glm-5.2": "Novita (aggregator)",
999
+ "zai/glm-5.1": "Novita (aggregator)",
1000
+ "moonshotai/kimi-k3": "Novita (aggregator)"
1001
+ };
841
1002
  var MODEL_METADATA = (() => {
842
1003
  const merged = {
843
1004
  ...PRIMARY_METADATA
@@ -856,7 +1017,7 @@ function lookupModelMetadata(modelId) {
856
1017
  function currencyForBaseUrl(baseUrl) {
857
1018
  try {
858
1019
  const hostname = new URL(baseUrl).hostname.toLowerCase();
859
- if (hostname === "api.minimaxi.com" || hostname === "api.minimaxi.cn" || hostname === "api.deepseek.com" || hostname === "api.moonshot.cn" || hostname === "open.bigmodel.cn" || // Zhipu legacy v3 host. Per the GLM-for-copilot reference
1020
+ if (hostname === "api.minimaxi.com" || hostname === "api.minimaxi.cn" || hostname === "api.moonshot.cn" || hostname === "open.bigmodel.cn" || // Zhipu legacy v3 host. Per the GLM-for-copilot reference
860
1021
  // (`docs/references/GLM-for-copilot-main/src/endpoint.ts:4`)
861
1022
  // this was retired to `bigmodel.cn` but is still
862
1023
  // resolvable for accounts that haven't migrated — we
@@ -886,13 +1047,14 @@ function currencyForBaseUrl(baseUrl) {
886
1047
  }
887
1048
 
888
1049
  // src/ai/providers.presets.ts
889
- function buildPresetModel(id, displayName) {
1050
+ function buildPresetModel(id, displayName, baseUrl) {
890
1051
  const meta = MODEL_METADATA[id];
891
1052
  if (!meta) {
892
1053
  throw new Error(
893
1054
  `buildPresetModel: no curated MODEL_METADATA entry for '${id}' \u2014 add one before referencing it from BUILTIN_PROVIDER_PRESETS.`
894
1055
  );
895
1056
  }
1057
+ const currency = baseUrl ? currencyForBaseUrl(baseUrl) : "USD";
896
1058
  return {
897
1059
  id,
898
1060
  displayName,
@@ -903,11 +1065,95 @@ function buildPresetModel(id, displayName) {
903
1065
  supportsImageToText: meta.imageInput,
904
1066
  supportsToolCalling: meta.toolCalling
905
1067
  },
906
- pricing: meta.pricingUSD,
1068
+ pricing: meta[`pricing${currency}`],
907
1069
  priceCategory: meta.priceCategory,
908
1070
  thinkingSchema: meta.thinkingSchema ?? "none"
909
1071
  };
910
1072
  }
1073
+ function unionProviderModelWithPreset(fetched, baseUrl) {
1074
+ const meta = MODEL_METADATA[fetched.id];
1075
+ if (!meta) {
1076
+ return fetched;
1077
+ }
1078
+ const currency = baseUrl ? currencyForBaseUrl(baseUrl) : "USD";
1079
+ const presetDisplayName = getPresetModelDisplayName(fetched.id);
1080
+ const displayName = typeof fetched.displayName === "string" && fetched.displayName.length > 0 ? fetched.displayName : presetDisplayName;
1081
+ return {
1082
+ // Spread fetched first so `id` wins, then overlay the
1083
+ // curated fields. (Curated fields ALWAYS win over fetched
1084
+ // per the precedence above — that's why they're explicit,
1085
+ // not relying on spread order.)
1086
+ ...fetched,
1087
+ displayName,
1088
+ detail: meta.detail,
1089
+ capabilities: {
1090
+ supportsImageToText: meta.imageInput,
1091
+ supportsToolCalling: meta.toolCalling
1092
+ },
1093
+ pricing: meta[`pricing${currency}`],
1094
+ priceCategory: meta.priceCategory,
1095
+ // thinkingSchema: prefer preset (curated), fall back to
1096
+ // fetched (in case the API publishes a schema the
1097
+ // preset doesn't know about), then "none" to match
1098
+ // `buildPresetModel`'s explicit-none convention so the
1099
+ // picker renders identically for preset vs fetched rows.
1100
+ thinkingSchema: meta.thinkingSchema ?? fetched.thinkingSchema ?? "none",
1101
+ // Token caps: preset is curated; if the preset doesn't
1102
+ // publish a cap, keep whatever fetched supplied (the
1103
+ // user may have entered it by hand earlier).
1104
+ maxInputTokens: meta.maxInputTokens ?? fetched.maxInputTokens,
1105
+ maxOutputTokens: meta.maxOutputTokens ?? fetched.maxOutputTokens
1106
+ };
1107
+ }
1108
+ var PRESET_MODEL_FAMILIES = [
1109
+ "GLM",
1110
+ "DeepSeek",
1111
+ "Kimi",
1112
+ "StepFun",
1113
+ "MiniMax",
1114
+ "Agnes",
1115
+ "Qwen",
1116
+ "SiliconFlow (aggregator)",
1117
+ "Novita (aggregator)",
1118
+ "OpenRouter (aggregator)"
1119
+ ];
1120
+ function vendorFamilyForId(id) {
1121
+ const aliasFamily = NAMESPACE_ALIAS_FAMILY[id];
1122
+ if (aliasFamily) return aliasFamily;
1123
+ if (id.startsWith("glm-")) return "GLM";
1124
+ if (id.startsWith("deepseek-")) return "DeepSeek";
1125
+ if (id.startsWith("kimi-")) return "Kimi";
1126
+ if (id.startsWith("step-")) return "StepFun";
1127
+ if (id.startsWith("MiniMax-")) return "MiniMax";
1128
+ if (id.startsWith("agnes-")) return "Agnes";
1129
+ if (id.startsWith("Qwen")) return "Qwen";
1130
+ if (id.startsWith("openrouter/")) return "OpenRouter (aggregator)";
1131
+ return "Other";
1132
+ }
1133
+ var LISTABLE_PRESET_MODELS = (() => {
1134
+ const aggregatorAliasKeys = new Set(Object.keys(NAMESPACE_ALIAS_FAMILY));
1135
+ const allIds = Object.keys(MODEL_METADATA).filter((id) => {
1136
+ if (NAMESPACE_ALIASES[id] === void 0) return true;
1137
+ return aggregatorAliasKeys.has(id);
1138
+ }).sort();
1139
+ return allIds.map((id) => ({
1140
+ id,
1141
+ displayName: id,
1142
+ vendorFamily: vendorFamilyForId(id)
1143
+ }));
1144
+ })();
1145
+ function listPresetModelGroups() {
1146
+ const byFamily = /* @__PURE__ */ new Map();
1147
+ for (const entry of LISTABLE_PRESET_MODELS) {
1148
+ const bucket = byFamily.get(entry.vendorFamily) ?? [];
1149
+ bucket.push(entry);
1150
+ byFamily.set(entry.vendorFamily, bucket);
1151
+ }
1152
+ return PRESET_MODEL_FAMILIES.filter((f) => byFamily.has(f)).map((family) => ({
1153
+ family,
1154
+ entries: byFamily.get(family) ?? []
1155
+ }));
1156
+ }
911
1157
  var BUILTIN_PROVIDER_PRESETS = {
912
1158
  minimax: {
913
1159
  displayName: "MiniMax",
@@ -933,14 +1179,18 @@ var BUILTIN_PROVIDER_PRESETS = {
933
1179
  // (otherwise the user's added model never shows up in the
934
1180
  // Copilot Chat picker).
935
1181
  models: [
936
- buildPresetModel("MiniMax-M3", "MiniMax-M3"),
937
- buildPresetModel("MiniMax-M2.7", "MiniMax-M2.7"),
938
- buildPresetModel("MiniMax-M2.7-highspeed", "MiniMax-M2.7-highspeed"),
1182
+ buildPresetModel("MiniMax-M3", "MiniMax-M3", "https://api.minimaxi.com/anthropic"),
1183
+ buildPresetModel("MiniMax-M2.7", "MiniMax-M2.7", "https://api.minimaxi.com/anthropic"),
1184
+ buildPresetModel(
1185
+ "MiniMax-M2.7-highspeed",
1186
+ "MiniMax-M2.7-highspeed",
1187
+ "https://api.minimaxi.com/anthropic"
1188
+ ),
939
1189
  // M2.5 (2026-02-13, 80.2% SWE-Bench Verified) — the
940
1190
  // predecessor of M2.7. Still in the catalog and often
941
1191
  // available on MiniMax's promotional $0.30/$1.20 rate, so
942
1192
  // keep it as a preset for users on the M2.5 plan tier.
943
- buildPresetModel("MiniMax-M2.5", "MiniMax-M2.5")
1193
+ buildPresetModel("MiniMax-M2.5", "MiniMax-M2.5", "https://api.minimaxi.com/anthropic")
944
1194
  ]
945
1195
  },
946
1196
  deepseek: {
@@ -962,8 +1212,8 @@ var BUILTIN_PROVIDER_PRESETS = {
962
1212
  // the recommended default — users still on V3 can override
963
1213
  // these defaults in the ProvidersTab form.
964
1214
  models: [
965
- buildPresetModel("deepseek-v4-flash", "DeepSeek V4 Flash"),
966
- buildPresetModel("deepseek-v4-pro", "DeepSeek V4 Pro")
1215
+ buildPresetModel("deepseek-v4-flash", "DeepSeek V4 Flash", "https://api.deepseek.com/v1"),
1216
+ buildPresetModel("deepseek-v4-pro", "DeepSeek V4 Pro", "https://api.deepseek.com/v1")
967
1217
  ]
968
1218
  },
969
1219
  agnes: {
@@ -971,19 +1221,34 @@ var BUILTIN_PROVIDER_PRESETS = {
971
1221
  // Sapiens AI's Agnes — OpenAI-compatible endpoint per
972
1222
  // https://wiki.agnes-ai.com (`POST /v1/chat/completions`).
973
1223
  baseUrl: "https://apihub.agnes-ai.com/v1",
1224
+ // Order mirrors the vendor docs index (wiki.agnes-ai.com,
1225
+ // fetched 2026-08-19): paid reasoning models first — the
1226
+ // commercial stable `agnes-2.5-pro` leads, then the
1227
+ // benchmark-listed alpha — followed by the flash tier
1228
+ // newest-first.
974
1229
  models: [
975
- buildPresetModel("agnes-2.5-pro-alpha", "Agnes 2.5 Pro Alpha"),
976
- buildPresetModel("agnes-2.0-flash", "Agnes 2.0 Flash")
1230
+ buildPresetModel("agnes-2.5-pro", "Agnes 2.5 Pro", "https://apihub.agnes-ai.com/v1"),
1231
+ buildPresetModel(
1232
+ "agnes-2.5-pro-alpha",
1233
+ "Agnes 2.5 Pro Alpha",
1234
+ "https://apihub.agnes-ai.com/v1"
1235
+ ),
1236
+ buildPresetModel("agnes-2.5-flash", "Agnes 2.5 Flash", "https://apihub.agnes-ai.com/v1"),
1237
+ buildPresetModel("agnes-2.0-flash", "Agnes 2.0 Flash", "https://apihub.agnes-ai.com/v1")
977
1238
  ]
978
1239
  },
979
1240
  kimi: {
980
1241
  displayName: "Kimi",
981
1242
  baseUrl: "https://api.moonshot.cn/v1",
982
1243
  models: [
983
- buildPresetModel("kimi-k3", "Kimi K3"),
984
- buildPresetModel("kimi-k2.7-code", "Kimi K2.7 Code"),
985
- buildPresetModel("kimi-k2.7-code-highspeed", "Kimi K2.7 Code HighSpeed"),
986
- buildPresetModel("kimi-k2.6", "Kimi K2.6")
1244
+ buildPresetModel("kimi-k3", "Kimi K3", "https://api.moonshot.cn/v1"),
1245
+ buildPresetModel("kimi-k2.7-code", "Kimi K2.7 Code", "https://api.moonshot.cn/v1"),
1246
+ buildPresetModel(
1247
+ "kimi-k2.7-code-highspeed",
1248
+ "Kimi K2.7 Code HighSpeed",
1249
+ "https://api.moonshot.cn/v1"
1250
+ ),
1251
+ buildPresetModel("kimi-k2.6", "Kimi K2.6", "https://api.moonshot.cn/v1")
987
1252
  ]
988
1253
  },
989
1254
  zhipu: {
@@ -1055,24 +1320,28 @@ var BUILTIN_PROVIDER_PRESETS = {
1055
1320
  // `MODEL_METADATA` entries are kept so the id is still
1056
1321
  // resolvable for the curated detail / pricing columns.
1057
1322
  models: [
1058
- buildPresetModel("glm-5.3", "GLM-5.3"),
1059
- buildPresetModel("glm-5.2", "GLM-5.2"),
1060
- buildPresetModel("glm-5.1", "GLM-5.1"),
1061
- buildPresetModel("glm-5", "GLM-5"),
1062
- buildPresetModel("glm-5-turbo", "GLM-5 Turbo"),
1063
- buildPresetModel("glm-4.7", "GLM-4.7"),
1064
- buildPresetModel("glm-4.6", "GLM-4.6"),
1065
- buildPresetModel("glm-4.5-air", "GLM-4.5 Air"),
1066
- buildPresetModel("glm-4.5", "GLM-4.5")
1323
+ buildPresetModel("glm-5.3", "GLM-5.3", "https://open.bigmodel.cn/api/paas/v4"),
1324
+ buildPresetModel("glm-5.2", "GLM-5.2", "https://open.bigmodel.cn/api/paas/v4"),
1325
+ buildPresetModel("glm-5.1", "GLM-5.1", "https://open.bigmodel.cn/api/paas/v4"),
1326
+ buildPresetModel("glm-5", "GLM-5", "https://open.bigmodel.cn/api/paas/v4"),
1327
+ buildPresetModel("glm-5-turbo", "GLM-5 Turbo", "https://open.bigmodel.cn/api/paas/v4"),
1328
+ buildPresetModel("glm-4.7", "GLM-4.7", "https://open.bigmodel.cn/api/paas/v4"),
1329
+ buildPresetModel("glm-4.6", "GLM-4.6", "https://open.bigmodel.cn/api/paas/v4"),
1330
+ buildPresetModel("glm-4.5-air", "GLM-4.5 Air", "https://open.bigmodel.cn/api/paas/v4"),
1331
+ buildPresetModel("glm-4.5", "GLM-4.5", "https://open.bigmodel.cn/api/paas/v4")
1067
1332
  ]
1068
1333
  },
1069
1334
  stepfun: {
1070
1335
  displayName: "StepFun",
1071
1336
  baseUrl: "https://api.stepfun.com/v1",
1072
1337
  models: [
1073
- buildPresetModel("step-3.7-flash", "Step 3.7 Flash"),
1074
- buildPresetModel("step-3.5-flash", "Step 3.5 Flash"),
1075
- buildPresetModel("step-1o-turbo-vision", "Step 1o Turbo Vision")
1338
+ buildPresetModel("step-3.7-flash", "Step 3.7 Flash", "https://api.stepfun.com/v1"),
1339
+ buildPresetModel("step-3.5-flash", "Step 3.5 Flash", "https://api.stepfun.com/v1"),
1340
+ buildPresetModel(
1341
+ "step-1o-turbo-vision",
1342
+ "Step 1o Turbo Vision",
1343
+ "https://api.stepfun.com/v1"
1344
+ )
1076
1345
  ]
1077
1346
  },
1078
1347
  siliconflow: {
@@ -1086,20 +1355,42 @@ var BUILTIN_PROVIDER_PRESETS = {
1086
1355
  // 与 MODEL_METADATA 的 alias 严格一致。
1087
1356
  models: [
1088
1357
  // DeepSeek V4 系列 (2026-04)
1089
- buildPresetModel("deepseek-ai/DeepSeek-V4-Pro", "DeepSeek V4 Pro (via SiliconFlow)"),
1090
- buildPresetModel("deepseek-ai/DeepSeek-V4-Flash", "DeepSeek V4 Flash (via SiliconFlow)"),
1358
+ buildPresetModel(
1359
+ "deepseek-ai/DeepSeek-V4-Pro",
1360
+ "DeepSeek V4 Pro (via SiliconFlow)",
1361
+ "https://api.siliconflow.cn/v1"
1362
+ ),
1363
+ buildPresetModel(
1364
+ "deepseek-ai/DeepSeek-V4-Flash",
1365
+ "DeepSeek V4 Flash (via SiliconFlow)",
1366
+ "https://api.siliconflow.cn/v1"
1367
+ ),
1091
1368
  // GLM-5.2 (2026-06-17) — open-weight 编程旗舰,1M context
1092
- buildPresetModel("zai-org/GLM-5.2", "GLM-5.2 (via SiliconFlow)"),
1369
+ buildPresetModel(
1370
+ "zai-org/GLM-5.2",
1371
+ "GLM-5.2 (via SiliconFlow)",
1372
+ "https://api.siliconflow.cn/v1"
1373
+ ),
1093
1374
  // Qwen3.6-35B-A3B (2026-04) — 35B MoE, 3B 激活,"小而强"
1094
- buildPresetModel("Qwen/Qwen3.6-35B-A3B", "Qwen3.6-35B-A3B (via SiliconFlow)"),
1375
+ buildPresetModel(
1376
+ "Qwen/Qwen3.6-35B-A3B",
1377
+ "Qwen3.6-35B-A3B (via SiliconFlow)",
1378
+ "https://api.siliconflow.cn/v1"
1379
+ ),
1095
1380
  // Kimi K2.7-Code (2026-06-12) — Moonshot coding 旗舰
1096
- buildPresetModel("moonshotai/Kimi-K2.7-Code", "Kimi K2.7 Code (via SiliconFlow)")
1381
+ buildPresetModel(
1382
+ "moonshotai/Kimi-K2.7-Code",
1383
+ "Kimi K2.7 Code (via SiliconFlow)",
1384
+ "https://api.siliconflow.cn/v1"
1385
+ )
1097
1386
  ]
1098
1387
  },
1099
1388
  openrouter: {
1100
1389
  displayName: "OpenRouter",
1101
1390
  baseUrl: "https://openrouter.ai/api/v1",
1102
- models: [buildPresetModel("openrouter/auto", "OpenRouter Auto")]
1391
+ models: [
1392
+ buildPresetModel("openrouter/auto", "OpenRouter Auto", "https://openrouter.ai/api/v1")
1393
+ ]
1103
1394
  },
1104
1395
  novita: {
1105
1396
  displayName: "Novita",
@@ -1111,16 +1402,76 @@ var BUILTIN_PROVIDER_PRESETS = {
1111
1402
  // 完整列表。id 严格匹配 Novita API 的 namespaced 字符串。
1112
1403
  models: [
1113
1404
  // DeepSeek V4 系列 (2026-04)
1114
- buildPresetModel("deepseek/deepseek-v4-pro", "DeepSeek V4 Pro (via Novita)"),
1115
- buildPresetModel("deepseek/deepseek-v4-flash", "DeepSeek V4 Flash (via Novita)"),
1405
+ buildPresetModel(
1406
+ "deepseek/deepseek-v4-pro",
1407
+ "DeepSeek V4 Pro (via Novita)",
1408
+ "https://api.novita.ai/openai/v1"
1409
+ ),
1410
+ buildPresetModel(
1411
+ "deepseek/deepseek-v4-flash",
1412
+ "DeepSeek V4 Flash (via Novita)",
1413
+ "https://api.novita.ai/openai/v1"
1414
+ ),
1116
1415
  // GLM-5 系列 (2026-04/06)
1117
- buildPresetModel("zai/glm-5.2", "GLM-5.2 (via Novita)"),
1118
- buildPresetModel("zai/glm-5.1", "GLM-5.1 (via Novita)"),
1416
+ buildPresetModel("zai/glm-5.2", "GLM-5.2 (via Novita)", "https://api.novita.ai/openai/v1"),
1417
+ buildPresetModel("zai/glm-5.1", "GLM-5.1 (via Novita)", "https://api.novita.ai/openai/v1"),
1119
1418
  // Kimi K3 (2026-07-16 API, 2026-07-27 开源) — 1M context, 2.8T MoE
1120
- buildPresetModel("moonshotai/kimi-k3", "Kimi K3 (via Novita)")
1419
+ buildPresetModel(
1420
+ "moonshotai/kimi-k3",
1421
+ "Kimi K3 (via Novita)",
1422
+ "https://api.novita.ai/openai/v1"
1423
+ )
1121
1424
  ]
1425
+ },
1426
+ medalsoft: {
1427
+ displayName: "Medalsoft",
1428
+ // Medalsoft internal LLM gateway (公司内部代理) — OpenAI-compatible
1429
+ // `/v1/chat/completions`. The gateway forwards to upstream vendors
1430
+ // (GLM / DeepSeek / Kimi / ...), so the model catalogue is dynamic
1431
+ // and NOT curated here: the preset ships an EMPTY starter list and
1432
+ // the user populates it via "Fetch from API" (`GET /v1/models`) in
1433
+ // the ProvidersTab. `buildPresetModel`'s fail-loudly contract is
1434
+ // why we don't guess ids — a curated `MODEL_METADATA` entry only
1435
+ // exists for vendor-native ids, not the gateway's routing table.
1436
+ //
1437
+ // NOTE: models fetched from the gateway carry the upstream model
1438
+ // ids, so the curated metadata (pricing / thinking dropdown /
1439
+ // token caps) still resolves via `MODEL_METADATA` after the fetch.
1440
+ baseUrl: "https://llm.proxy.alio.wang/v1",
1441
+ models: []
1122
1442
  }
1123
1443
  };
1444
+ var PRESET_MODEL_DISPLAY_NAMES = (() => {
1445
+ const map = {};
1446
+ for (const preset of Object.values(BUILTIN_PROVIDER_PRESETS)) {
1447
+ for (const model of preset.models) {
1448
+ if (model.displayName !== void 0) {
1449
+ map[model.id] = model.displayName;
1450
+ }
1451
+ }
1452
+ }
1453
+ return Object.freeze(map);
1454
+ })();
1455
+ function getPresetModelDisplayName(id) {
1456
+ const explicit = PRESET_MODEL_DISPLAY_NAMES[id];
1457
+ if (explicit !== void 0) {
1458
+ return explicit;
1459
+ }
1460
+ const meta = MODEL_METADATA[id];
1461
+ if (meta === void 0) {
1462
+ return void 0;
1463
+ }
1464
+ const detail = meta.detail;
1465
+ if (typeof detail !== "string" || detail.trim() === "") {
1466
+ return void 0;
1467
+ }
1468
+ const dashIndex = detail.indexOf(" \u2014 ");
1469
+ if (dashIndex === -1) {
1470
+ return detail;
1471
+ }
1472
+ const head = detail.slice(0, dashIndex).trim();
1473
+ return head === "" ? void 0 : head;
1474
+ }
1124
1475
  function getBuiltinProviderPreset(type) {
1125
1476
  switch (type) {
1126
1477
  case "minimax":
@@ -1132,6 +1483,7 @@ function getBuiltinProviderPreset(type) {
1132
1483
  case "siliconflow":
1133
1484
  case "openrouter":
1134
1485
  case "novita":
1486
+ case "medalsoft":
1135
1487
  return BUILTIN_PROVIDER_PRESETS[type];
1136
1488
  default:
1137
1489
  return null;
@@ -1555,6 +1907,8 @@ var WebviewMessageType = /* @__PURE__ */ ((WebviewMessageType2) => {
1555
1907
  WebviewMessageType2["SetProviderOrder"] = "setProviderOrder";
1556
1908
  WebviewMessageType2["TestProvider"] = "testProvider";
1557
1909
  WebviewMessageType2["ProviderTestResultMessage"] = "providerTestResult";
1910
+ WebviewMessageType2["TestProviderModel"] = "testProviderModel";
1911
+ WebviewMessageType2["ProviderTestModelResultMessage"] = "providerTestModelResult";
1558
1912
  WebviewMessageType2["DefaultProviderChanged"] = "defaultProviderChanged";
1559
1913
  WebviewMessageType2["FetchProviderModels"] = "fetchProviderModels";
1560
1914
  WebviewMessageType2["FetchProviderModelsResult"] = "fetchProviderModelsResult";
@@ -1646,8 +2000,12 @@ function safeJson(text, fallback) {
1646
2000
  GetCachedServerUrl,
1647
2001
  GetServerProxyState,
1648
2002
  GetUtilityModels,
2003
+ LISTABLE_PRESET_MODELS,
1649
2004
  LogLevel,
1650
2005
  MODEL_METADATA,
2006
+ NAMESPACE_ALIASES,
2007
+ NAMESPACE_ALIAS_FAMILY,
2008
+ PRESET_MODEL_FAMILIES,
1651
2009
  PROVIDER_BASE_URL_PRESETS,
1652
2010
  PROVIDER_CACHE_CONTROL_METADATA,
1653
2011
  ServerProxyStateResponse,
@@ -1660,6 +2018,7 @@ function safeJson(text, fallback) {
1660
2018
  __internal,
1661
2019
  asAbortSignal,
1662
2020
  buildGitHubLocalEmail,
2021
+ buildPresetModel,
1663
2022
  checkGitHubOrgMembership,
1664
2023
  createConsoleLogger,
1665
2024
  currencyForBaseUrl,
@@ -1667,10 +2026,12 @@ function safeJson(text, fallback) {
1667
2026
  fetchGitHubUser,
1668
2027
  getBuiltinProviderPreset,
1669
2028
  getGitHubOrgMembership,
2029
+ getPresetModelDisplayName,
1670
2030
  getProviderBaseUrlPresets,
1671
2031
  isGitHubLocalEmail,
1672
2032
  isProviderCacheControlAware,
1673
2033
  isValidCanonicalSlug,
2034
+ listPresetModelGroups,
1674
2035
  lookupModelMetadata,
1675
2036
  normalizeCanonicalSlug,
1676
2037
  normalizeErrorForLog,
@@ -1678,5 +2039,6 @@ function safeJson(text, fallback) {
1678
2039
  parsePayload,
1679
2040
  protocolForBaseUrl,
1680
2041
  resolvePrimaryEmail,
1681
- safeJson
2042
+ safeJson,
2043
+ unionProviderModelWithPreset
1682
2044
  });