@omnicross/contracts 0.1.0

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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/dist/account-tokens-types.cjs +18 -0
  4. package/dist/account-tokens-types.d.cts +142 -0
  5. package/dist/account-tokens-types.d.ts +142 -0
  6. package/dist/account-tokens-types.js +0 -0
  7. package/dist/canonical-models.cjs +262 -0
  8. package/dist/canonical-models.d.cts +107 -0
  9. package/dist/canonical-models.d.ts +107 -0
  10. package/dist/canonical-models.js +232 -0
  11. package/dist/completion-types.cjs +18 -0
  12. package/dist/completion-types.d.cts +324 -0
  13. package/dist/completion-types.d.ts +324 -0
  14. package/dist/completion-types.js +0 -0
  15. package/dist/endpoint-resolver.cjs +54 -0
  16. package/dist/endpoint-resolver.d.cts +43 -0
  17. package/dist/endpoint-resolver.d.ts +43 -0
  18. package/dist/endpoint-resolver.js +29 -0
  19. package/dist/extended-context.cjs +39 -0
  20. package/dist/extended-context.d.cts +21 -0
  21. package/dist/extended-context.d.ts +21 -0
  22. package/dist/extended-context.js +13 -0
  23. package/dist/index.cjs +2724 -0
  24. package/dist/index.d.cts +14 -0
  25. package/dist/index.d.ts +14 -0
  26. package/dist/index.js +2656 -0
  27. package/dist/llm-config-CQjOimv2.d.cts +390 -0
  28. package/dist/llm-config-D1jKQLVp.d.ts +390 -0
  29. package/dist/llm-config.cjs +18 -0
  30. package/dist/llm-config.d.cts +2 -0
  31. package/dist/llm-config.d.ts +2 -0
  32. package/dist/llm-config.js +0 -0
  33. package/dist/mcp-types.cjs +33 -0
  34. package/dist/mcp-types.d.cts +131 -0
  35. package/dist/mcp-types.d.ts +131 -0
  36. package/dist/mcp-types.js +8 -0
  37. package/dist/message-blocks.cjs +18 -0
  38. package/dist/message-blocks.d.cts +44 -0
  39. package/dist/message-blocks.d.ts +44 -0
  40. package/dist/message-blocks.js +0 -0
  41. package/dist/provider-presets/index.cjs +2183 -0
  42. package/dist/provider-presets/index.d.cts +104 -0
  43. package/dist/provider-presets/index.d.ts +104 -0
  44. package/dist/provider-presets/index.js +2143 -0
  45. package/dist/subscription-types.cjs +48 -0
  46. package/dist/subscription-types.d.cts +149 -0
  47. package/dist/subscription-types.d.ts +149 -0
  48. package/dist/subscription-types.js +22 -0
  49. package/dist/thinking-CBWSLel8.d.cts +33 -0
  50. package/dist/thinking-CBWSLel8.d.ts +33 -0
  51. package/dist/thinking-config.cjs +243 -0
  52. package/dist/thinking-config.d.cts +71 -0
  53. package/dist/thinking-config.d.ts +71 -0
  54. package/dist/thinking-config.js +205 -0
  55. package/dist/usage-types.cjs +18 -0
  56. package/dist/usage-types.d.cts +41 -0
  57. package/dist/usage-types.d.ts +41 -0
  58. package/dist/usage-types.js +0 -0
  59. package/dist/websearch-types.cjs +37 -0
  60. package/dist/websearch-types.d.cts +76 -0
  61. package/dist/websearch-types.d.ts +76 -0
  62. package/dist/websearch-types.js +11 -0
  63. package/package.json +116 -0
@@ -0,0 +1,2183 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/provider-presets/index.ts
21
+ var provider_presets_exports = {};
22
+ __export(provider_presets_exports, {
23
+ API_MODE_IDS: () => API_MODE_IDS,
24
+ CATALOG_VERSION: () => CATALOG_VERSION,
25
+ CODING_PLAN_URL_PRESETS: () => CODING_PLAN_URL_PRESETS,
26
+ DEFAULT_SEED_PRESET_IDS: () => DEFAULT_SEED_PRESET_IDS,
27
+ LLM_PROVIDER_PRESETS: () => LLM_PROVIDER_PRESETS,
28
+ MAX_CONCURRENCY_DEFAULTS: () => MAX_CONCURRENCY_DEFAULTS,
29
+ PROVIDER_MODEL_MAPPINGS: () => PROVIDER_MODEL_MAPPINGS,
30
+ PROVIDER_SEARCH_CONFIGS: () => PROVIDER_SEARCH_CONFIGS,
31
+ getAllProviderPresets: () => getAllProviderPresets,
32
+ getCodingPlanBaseUrl: () => getCodingPlanBaseUrl,
33
+ getPresetById: () => getPresetById,
34
+ getPresetRevision: () => getPresetRevision,
35
+ getProviderSearchConfig: () => getProviderSearchConfig,
36
+ resolveFollowProviderModel: () => resolveFollowProviderModel
37
+ });
38
+ module.exports = __toCommonJS(provider_presets_exports);
39
+
40
+ // src/provider-presets/catalog.json
41
+ var catalog_default = {
42
+ version: 1,
43
+ generatedFrom: "packages/desktop/app/shared/provider-presets.ts"
44
+ };
45
+
46
+ // src/provider-presets/defaults.ts
47
+ var CODING_PLAN_URL_PRESETS = {
48
+ zhipu: { baseUrl: "https://api.z.ai/api/coding/paas/v4" },
49
+ "zhipu-bigmodel": { baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4" },
50
+ volcengine: { baseUrl: "https://ark.cn-beijing.volces.com/api/coding/v3" },
51
+ kimi: { baseUrl: "https://api.kimi.com/coding/v1" },
52
+ dashscope: { baseUrl: "https://coding.dashscope.aliyuncs.com/compatible-mode/v1", separateApiKey: true },
53
+ tencent: { baseUrl: "https://api.lkeap.cloud.tencent.com/coding/v3" },
54
+ baidu: { baseUrl: "https://qianfan.baidubce.com/v2/coding" },
55
+ kuaishou: { baseUrl: "https://wanqing.streamlakeapi.com/api/gateway/coding/v1" },
56
+ // Xiaomi MiMo Token Plan — both formats first-class.
57
+ // OpenAI variant id `xiaomi-mimo` -> OpenAI Token Plan endpoint.
58
+ // Anthropic variant id `xiaomi-mimo-anthropic` -> Anthropic Token Plan endpoint.
59
+ // Overseas users may swap `token-plan-cn` -> `token-plan-sgp` / `token-plan-ams` manually.
60
+ "xiaomi-mimo": { baseUrl: "https://token-plan-cn.xiaomimimo.com/v1" },
61
+ "xiaomi-mimo-anthropic": { baseUrl: "https://token-plan-cn.xiaomimimo.com/anthropic" }
62
+ // MiniMax and Moore Threads don't need URL switching
63
+ };
64
+ var PROVIDER_MODEL_MAPPINGS = {
65
+ zhipu: {
66
+ primary: "glm-5.1",
67
+ background: "glm-4.5-air",
68
+ vision: "glm-4.6v"
69
+ },
70
+ volcengine: {
71
+ primary: "ark-code-latest",
72
+ background: "doubao-seed-2.0-lite",
73
+ vision: "doubao-seed-2.0-code"
74
+ },
75
+ kimi: {
76
+ primary: "kimi-k2.5",
77
+ background: "kimi-k2-0905-preview",
78
+ vision: "kimi-k2.5"
79
+ },
80
+ dashscope: {
81
+ primary: "qwen3-max",
82
+ background: "qwen-turbo",
83
+ vision: "qwen3.5-plus"
84
+ },
85
+ tencent: {
86
+ primary: "tc-code-latest",
87
+ background: "hunyuan-turbos",
88
+ vision: null
89
+ },
90
+ minimax: {
91
+ primary: "MiniMax-M2.5",
92
+ background: "MiniMax-M2.1-highspeed",
93
+ vision: null
94
+ },
95
+ baidu: {
96
+ primary: "qianfan-code-latest",
97
+ background: "ernie-3.5",
98
+ vision: "ernie-4.5-vl-28b-a3b"
99
+ },
100
+ kuaishou: {
101
+ primary: "kat-coder-pro-v1",
102
+ background: "kat-coder-air-v1",
103
+ vision: null
104
+ },
105
+ mthreads: {
106
+ primary: "glm-4.7",
107
+ background: "glm-4.7",
108
+ vision: null
109
+ },
110
+ "xiaomi-mimo": {
111
+ // xiaomi-mimo API expects lowercase ids — see the Xiaomi preset model list.
112
+ primary: "mimo-v2.5-pro",
113
+ background: "mimo-v2-flash",
114
+ vision: "mimo-v2-omni"
115
+ },
116
+ // International providers
117
+ openai: {
118
+ primary: "gpt-4o",
119
+ background: "gpt-4o-mini",
120
+ vision: "gpt-4o"
121
+ },
122
+ anthropic: {
123
+ primary: "claude-sonnet-4-6",
124
+ background: "claude-haiku-4-5",
125
+ vision: "claude-sonnet-4-6"
126
+ },
127
+ gemini: {
128
+ primary: "gemini-3.1-pro",
129
+ background: "gemini-3-flash",
130
+ vision: "gemini-3.1-pro"
131
+ }
132
+ };
133
+ var PROVIDER_SEARCH_CONFIGS = {
134
+ // Chinese providers
135
+ dashscope: {
136
+ type: "model-param",
137
+ paramName: "enable_search",
138
+ paramValue: true,
139
+ applicableModels: ["qwen3-max", "qwen3.5-plus", "qwen-turbo"]
140
+ },
141
+ kimi: {
142
+ type: "builtin-tool",
143
+ toolDefinition: {
144
+ type: "builtin_function",
145
+ function: { name: "web_search" }
146
+ },
147
+ conflictsWithFC: false,
148
+ applicableModels: null
149
+ },
150
+ volcengine: {
151
+ type: "model-param",
152
+ paramName: "web_search",
153
+ paramValue: { enable: true },
154
+ applicableModels: null
155
+ },
156
+ baidu: {
157
+ type: "model-param",
158
+ paramName: "web_search",
159
+ paramValue: { enable: true, enable_citation: true },
160
+ applicableModels: ["ernie-4.5", "ernie-3.5"]
161
+ },
162
+ minimax: {
163
+ type: "mcp",
164
+ mcpServerId: "minimax-search",
165
+ applicableModels: null
166
+ },
167
+ zhipu: {
168
+ type: "builtin-tool",
169
+ toolDefinition: {
170
+ type: "web_search",
171
+ web_search: { enable: true }
172
+ },
173
+ conflictsWithFC: false,
174
+ applicableModels: null
175
+ },
176
+ // International providers
177
+ anthropic: {
178
+ type: "sdk-native",
179
+ applicableModels: null
180
+ },
181
+ openai: {
182
+ type: "builtin-tool",
183
+ toolDefinition: {
184
+ type: "web_search_preview"
185
+ },
186
+ conflictsWithFC: false,
187
+ applicableModels: null
188
+ },
189
+ google: {
190
+ type: "builtin-tool",
191
+ toolDefinition: {
192
+ google_search: {}
193
+ },
194
+ conflictsWithFC: false,
195
+ applicableModels: null
196
+ },
197
+ // Alias: PROVIDER_MODEL_MAPPINGS uses "gemini", presetId may be either
198
+ gemini: {
199
+ type: "builtin-tool",
200
+ toolDefinition: {
201
+ google_search: {}
202
+ },
203
+ conflictsWithFC: false,
204
+ applicableModels: null
205
+ }
206
+ };
207
+ var DEFAULT_MAX_CONCURRENCY = -1;
208
+ var MAX_CONCURRENCY_DEFAULTS = {
209
+ zhipu: 5,
210
+ "zhipu-bigmodel": 5,
211
+ kimi: 5,
212
+ minimax: 5,
213
+ dashscope: 5,
214
+ volcengine: 5,
215
+ tencent: 5,
216
+ "tencent-anthropic": 5,
217
+ baidu: 5,
218
+ kuaishou: 5,
219
+ mthreads: 5,
220
+ "xiaomi-mimo": 5,
221
+ "xiaomi-mimo-anthropic": 5
222
+ };
223
+ var DEFAULT_SEED_PRESET_IDS = [
224
+ // Tier 1 — international flagship
225
+ "openai",
226
+ "anthropic",
227
+ "gemini",
228
+ "gemini-vertex",
229
+ "deepseek",
230
+ "grok",
231
+ // Tier 2 — aggregator + Chinese flagship (with coding plan).
232
+ // MiniMax + Xiaomi MiMo bumped up next to Kimi per UX preference —
233
+ // popular Anthropic-format Chinese providers cluster together.
234
+ "openrouter",
235
+ "zhipu",
236
+ "zhipu-bigmodel",
237
+ "kimi",
238
+ "minimax",
239
+ "xiaomi-mimo",
240
+ "dashscope",
241
+ "volcengine",
242
+ "tencent",
243
+ // Tier 3 — international extras + fast inference + local
244
+ "siliconflow",
245
+ "mistral",
246
+ "together",
247
+ "perplexity",
248
+ "groq",
249
+ "cerebras",
250
+ "ollama",
251
+ // Tier 4 — specialized
252
+ "azure-openai",
253
+ "openai-response",
254
+ // Tier 5 — cold / niche / variants
255
+ "xiaomi-mimo-anthropic",
256
+ "tencent-anthropic",
257
+ "baidu",
258
+ "kuaishou",
259
+ "mthreads"
260
+ ];
261
+
262
+ // src/provider-presets/presets/anthropic.json
263
+ var anthropic_default = {
264
+ id: "anthropic",
265
+ presetId: "anthropic",
266
+ name: "Anthropic",
267
+ apiFormat: "anthropic",
268
+ apiType: "anthropic",
269
+ api_base_url: "https://api.anthropic.com/v1/messages",
270
+ modelsEndpoint: "https://api.anthropic.com/v1/models",
271
+ models: [
272
+ "claude-opus-4-7",
273
+ "claude-opus-4-7[1m]",
274
+ "claude-sonnet-4-6",
275
+ "claude-sonnet-4-6[1m]",
276
+ "claude-opus-4-6",
277
+ "claude-opus-4-6[1m]",
278
+ "claude-haiku-4-5"
279
+ ],
280
+ modelConfigs: [
281
+ {
282
+ id: "claude-opus-4-7",
283
+ name: "Claude Opus 4.7",
284
+ enabled: true
285
+ },
286
+ {
287
+ id: "claude-opus-4-7[1m]",
288
+ name: "Claude Opus 4.7 (1M)",
289
+ enabled: false
290
+ },
291
+ {
292
+ id: "claude-sonnet-4-6",
293
+ name: "Claude Sonnet 4.6",
294
+ enabled: true
295
+ },
296
+ {
297
+ id: "claude-sonnet-4-6[1m]",
298
+ name: "Claude Sonnet 4.6 (1M)",
299
+ enabled: false
300
+ },
301
+ {
302
+ id: "claude-opus-4-6",
303
+ name: "Claude Opus 4.6",
304
+ enabled: true
305
+ },
306
+ {
307
+ id: "claude-opus-4-6[1m]",
308
+ name: "Claude Opus 4.6 (1M)",
309
+ enabled: false
310
+ },
311
+ {
312
+ id: "claude-haiku-4-5",
313
+ name: "Claude Haiku 4.5",
314
+ enabled: true
315
+ }
316
+ ],
317
+ transformer: {
318
+ use: [
319
+ "anthropic"
320
+ ]
321
+ },
322
+ description: "Claude\u6A21\u578B\u5B98\u65B9API (Anthropic Messages\u683C\u5F0F)",
323
+ icon: "anthropic",
324
+ website: "https://anthropic.com",
325
+ docsUrl: "https://docs.anthropic.com",
326
+ defaultSettings: {
327
+ temperature: 0.7,
328
+ maxTokens: 65536
329
+ },
330
+ isSystem: true,
331
+ isOfficial: true,
332
+ features: [
333
+ "vision",
334
+ "search",
335
+ "reasoning"
336
+ ],
337
+ searchConfig: {
338
+ type: "sdk-native",
339
+ applicableModels: null
340
+ }
341
+ };
342
+
343
+ // src/provider-presets/presets/azure-openai.json
344
+ var azure_openai_default = {
345
+ id: "azure-openai",
346
+ presetId: "azure-openai",
347
+ name: "Azure OpenAI",
348
+ apiFormat: "azure-openai",
349
+ api_base_url: "",
350
+ apiVersion: "2024-08-01-preview",
351
+ models: [],
352
+ description: "Azure OpenAI Service (requires deployment name as model)",
353
+ icon: "azure-openai",
354
+ website: "https://azure.microsoft.com/products/ai-services/openai-service",
355
+ docsUrl: "https://learn.microsoft.com/azure/ai-services/openai/",
356
+ defaultSettings: {
357
+ temperature: 0.7,
358
+ maxTokens: 4096
359
+ },
360
+ isSystem: true,
361
+ features: [
362
+ "vision"
363
+ ]
364
+ };
365
+
366
+ // src/provider-presets/presets/baidu.json
367
+ var baidu_default = {
368
+ id: "baidu",
369
+ presetId: "baidu",
370
+ name: "\u767E\u5EA6\u5343\u5E06",
371
+ nameKey: "presetName.baidu",
372
+ apiFormat: "openai",
373
+ api_base_url: "https://qianfan.baidubce.com/v2",
374
+ codingPlanBaseUrl: "https://qianfan.baidubce.com/v2/coding",
375
+ codingPlanSeparateKey: true,
376
+ models: [
377
+ "qianfan-code-latest",
378
+ "ernie-4.5",
379
+ "ernie-3.5"
380
+ ],
381
+ modelConfigs: [
382
+ {
383
+ id: "qianfan-code-latest",
384
+ name: "Auto (\u5343\u5E06)",
385
+ enabled: true
386
+ },
387
+ {
388
+ id: "ernie-4.5",
389
+ name: "ERNIE 4.5",
390
+ enabled: true
391
+ },
392
+ {
393
+ id: "ernie-3.5",
394
+ name: "ERNIE 3.5",
395
+ enabled: true
396
+ }
397
+ ],
398
+ description: "\u767E\u5EA6\u5343\u5E06\u5927\u6A21\u578B\u5E73\u53F0",
399
+ icon: "baidu",
400
+ website: "https://cloud.baidu.com",
401
+ docsUrl: "https://cloud.baidu.com/doc/qianfan/s/imlg0beiu",
402
+ isSystem: true,
403
+ features: [
404
+ "coding-plan",
405
+ "vision",
406
+ "search",
407
+ "mcp-search"
408
+ ],
409
+ apiModes: [
410
+ {
411
+ id: "standard",
412
+ label: "apiMode.standard",
413
+ baseUrl: "https://qianfan.baidubce.com/v2"
414
+ },
415
+ {
416
+ id: "coding-plan",
417
+ label: "apiMode.codingPlan",
418
+ baseUrl: "https://qianfan.baidubce.com/v2/coding",
419
+ note: "apiMode.baiduCodingPlanSeparateKey"
420
+ }
421
+ ],
422
+ searchConfig: {
423
+ type: "model-param",
424
+ paramName: "web_search",
425
+ paramValue: {
426
+ enable: true,
427
+ enable_citation: true
428
+ },
429
+ applicableModels: [
430
+ "ernie-4.5",
431
+ "ernie-3.5"
432
+ ]
433
+ }
434
+ };
435
+
436
+ // src/provider-presets/presets/cerebras.json
437
+ var cerebras_default = {
438
+ id: "cerebras",
439
+ presetId: "cerebras",
440
+ name: "Cerebras",
441
+ apiFormat: "openai",
442
+ api_base_url: "https://api.cerebras.ai/v1",
443
+ models: [
444
+ "llama-3.3-70b",
445
+ "qwen-3-coder-480b",
446
+ "qwen-3-32b"
447
+ ],
448
+ modelConfigs: [
449
+ {
450
+ id: "llama-3.3-70b",
451
+ name: "Llama 3.3 70B",
452
+ enabled: true,
453
+ category: "chat",
454
+ contextLength: 131072,
455
+ maxTokens: 8192,
456
+ functionCall: true
457
+ },
458
+ {
459
+ id: "qwen-3-coder-480b",
460
+ name: "Qwen3 Coder 480B",
461
+ enabled: true,
462
+ category: "code",
463
+ contextLength: 131072,
464
+ maxTokens: 8192,
465
+ functionCall: true
466
+ },
467
+ {
468
+ id: "qwen-3-32b",
469
+ name: "Qwen3 32B",
470
+ enabled: true,
471
+ category: "chat",
472
+ contextLength: 131072,
473
+ maxTokens: 8192,
474
+ functionCall: true
475
+ }
476
+ ],
477
+ transformer: {
478
+ use: [
479
+ "cerebras"
480
+ ]
481
+ },
482
+ description: "Cerebras Inference \u2014 \u6676\u5706\u7EA7\u82AF\u7247\u9AD8\u901F\u63A8\u7406",
483
+ icon: "cerebras",
484
+ website: "https://cerebras.ai",
485
+ docsUrl: "https://inference-docs.cerebras.ai",
486
+ defaultSettings: {
487
+ temperature: 0.7,
488
+ maxTokens: 4096
489
+ },
490
+ isSystem: true,
491
+ features: []
492
+ };
493
+
494
+ // src/provider-presets/presets/dashscope.json
495
+ var dashscope_default = {
496
+ id: "dashscope",
497
+ presetId: "dashscope",
498
+ name: "\u963F\u91CC\u4E91\u767E\u70BC",
499
+ nameKey: "presetName.dashscope",
500
+ apiFormat: "openai",
501
+ api_base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1",
502
+ codingPlanBaseUrl: "https://coding.dashscope.aliyuncs.com/compatible-mode/v1",
503
+ codingPlanSeparateKey: true,
504
+ modelsEndpoint: "https://dashscope.aliyuncs.com/compatible-mode/v1/models",
505
+ models: [
506
+ "qwen3-max",
507
+ "qwen3.5-plus",
508
+ "qwen-turbo",
509
+ "qwen3-coder-plus"
510
+ ],
511
+ modelConfigs: [
512
+ {
513
+ id: "qwen3-max",
514
+ name: "Qwen3 Max",
515
+ enabled: true
516
+ },
517
+ {
518
+ id: "qwen3.5-plus",
519
+ name: "Qwen3.5 Plus",
520
+ enabled: true
521
+ },
522
+ {
523
+ id: "qwen-turbo",
524
+ name: "Qwen Turbo",
525
+ enabled: true
526
+ },
527
+ {
528
+ id: "qwen3-coder-plus",
529
+ name: "Qwen3 Coder Plus",
530
+ enabled: true
531
+ }
532
+ ],
533
+ description: "\u963F\u91CC\u4E91\u767E\u70BC\u5927\u6A21\u578B\u5E73\u53F0 (DashScope)",
534
+ icon: "dashscope",
535
+ website: "https://www.aliyun.com/product/bailian",
536
+ docsUrl: "https://help.aliyun.com/zh/model-studio/",
537
+ isSystem: true,
538
+ features: [
539
+ "coding-plan",
540
+ "vision",
541
+ "search"
542
+ ],
543
+ searchConfig: {
544
+ type: "model-param",
545
+ paramName: "enable_search",
546
+ paramValue: true,
547
+ applicableModels: [
548
+ "qwen3-max",
549
+ "qwen3.5-plus",
550
+ "qwen-turbo"
551
+ ]
552
+ },
553
+ apiModes: [
554
+ {
555
+ id: "standard",
556
+ label: "apiMode.standard",
557
+ baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1"
558
+ },
559
+ {
560
+ id: "coding-plan",
561
+ label: "apiMode.codingPlan",
562
+ baseUrl: "https://coding.dashscope.aliyuncs.com/compatible-mode/v1",
563
+ note: "apiMode.dashscopeCodingPlanSeparateKey"
564
+ }
565
+ ]
566
+ };
567
+
568
+ // src/provider-presets/presets/deepseek.json
569
+ var deepseek_default = {
570
+ id: "deepseek",
571
+ presetId: "deepseek",
572
+ name: "DeepSeek",
573
+ apiFormat: "openai",
574
+ apiType: "openai",
575
+ api_base_url: "https://api.deepseek.com/v1/chat/completions",
576
+ models: [
577
+ "deepseek-v4-flash",
578
+ "deepseek-v4-pro",
579
+ "deepseek-chat",
580
+ "deepseek-reasoner"
581
+ ],
582
+ modelConfigs: [
583
+ {
584
+ id: "deepseek-v4-flash",
585
+ name: "DeepSeek V4 Flash",
586
+ enabled: true
587
+ },
588
+ {
589
+ id: "deepseek-v4-pro",
590
+ name: "DeepSeek V4 Pro",
591
+ enabled: true
592
+ },
593
+ {
594
+ id: "deepseek-chat",
595
+ name: "DeepSeek Chat (Legacy)",
596
+ enabled: false
597
+ },
598
+ {
599
+ id: "deepseek-reasoner",
600
+ name: "DeepSeek Reasoner (Legacy)",
601
+ enabled: false
602
+ }
603
+ ],
604
+ transformer: {
605
+ use: [
606
+ "deepseek"
607
+ ]
608
+ },
609
+ description: "DeepSeek\u5B98\u65B9API",
610
+ icon: "deepseek",
611
+ website: "https://deepseek.com",
612
+ docsUrl: "https://api-docs.deepseek.com",
613
+ defaultSettings: {
614
+ temperature: 0.7,
615
+ maxTokens: 8192
616
+ },
617
+ isSystem: true,
618
+ features: [
619
+ "reasoning"
620
+ ]
621
+ };
622
+
623
+ // src/provider-presets/presets/gemini.json
624
+ var gemini_default = {
625
+ id: "gemini",
626
+ presetId: "gemini",
627
+ name: "Google Gemini",
628
+ apiFormat: "google",
629
+ apiType: "google",
630
+ api_base_url: "https://generativelanguage.googleapis.com/v1beta/models/",
631
+ modelsEndpoint: "https://generativelanguage.googleapis.com/v1beta/models",
632
+ models: [
633
+ "gemini-3-flash",
634
+ "gemini-3.1-pro"
635
+ ],
636
+ modelConfigs: [
637
+ {
638
+ id: "gemini-3-flash",
639
+ name: "Gemini 3 Flash",
640
+ enabled: true
641
+ },
642
+ {
643
+ id: "gemini-3.1-pro",
644
+ name: "Gemini 3.1 Pro",
645
+ enabled: true
646
+ }
647
+ ],
648
+ transformer: {
649
+ use: [
650
+ "gemini"
651
+ ]
652
+ },
653
+ description: "Google\u7684\u591A\u6A21\u6001AI\u6A21\u578B",
654
+ icon: "gemini",
655
+ website: "https://ai.google.dev",
656
+ docsUrl: "https://ai.google.dev/docs",
657
+ defaultSettings: {
658
+ temperature: 0.7,
659
+ topP: 0.95,
660
+ maxTokens: 65536
661
+ },
662
+ isSystem: true,
663
+ features: [
664
+ "vision",
665
+ "search",
666
+ "reasoning"
667
+ ],
668
+ searchConfig: {
669
+ type: "builtin-tool",
670
+ toolDefinition: {
671
+ google_search: {}
672
+ },
673
+ conflictsWithFC: false,
674
+ applicableModels: null
675
+ }
676
+ };
677
+
678
+ // src/provider-presets/presets/gemini-vertex.json
679
+ var gemini_vertex_default = {
680
+ id: "gemini-vertex",
681
+ presetId: "gemini",
682
+ name: "Google Gemini (Vertex AI)",
683
+ apiFormat: "google",
684
+ apiType: "google",
685
+ api_base_url: "https://us-central1-aiplatform.googleapis.com/v1/projects/YOUR_PROJECT_ID/locations/us-central1/publishers/google",
686
+ models: [
687
+ "gemini-3-flash",
688
+ "gemini-3.1-pro"
689
+ ],
690
+ modelConfigs: [
691
+ {
692
+ id: "gemini-3-flash",
693
+ name: "Gemini 3 Flash",
694
+ enabled: true
695
+ },
696
+ {
697
+ id: "gemini-3.1-pro",
698
+ name: "Gemini 3.1 Pro",
699
+ enabled: true
700
+ }
701
+ ],
702
+ transformer: {
703
+ use: [
704
+ "gemini"
705
+ ]
706
+ },
707
+ description: "Gemini via Google Cloud Vertex AI \u2014 replace YOUR_PROJECT_ID + region in the URL, paste an OAuth2 access token in the API key field.",
708
+ icon: "gemini",
709
+ website: "https://cloud.google.com/vertex-ai",
710
+ docsUrl: "https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models",
711
+ defaultSettings: {
712
+ temperature: 0.7,
713
+ topP: 0.95,
714
+ maxTokens: 65536
715
+ },
716
+ isSystem: true,
717
+ features: [
718
+ "vision",
719
+ "search",
720
+ "reasoning"
721
+ ],
722
+ searchConfig: {
723
+ type: "builtin-tool",
724
+ toolDefinition: {
725
+ google_search: {}
726
+ },
727
+ conflictsWithFC: false,
728
+ applicableModels: null
729
+ }
730
+ };
731
+
732
+ // src/provider-presets/presets/grok.json
733
+ var grok_default = {
734
+ id: "grok",
735
+ presetId: "grok",
736
+ name: "Grok",
737
+ apiFormat: "openai",
738
+ apiType: "openai",
739
+ api_base_url: "https://api.x.ai/v1/chat/completions",
740
+ models: [
741
+ "grok-4.3",
742
+ "grok-4.20",
743
+ "grok-4.20-reasoning",
744
+ "grok-4.20-multi-agent"
745
+ ],
746
+ modelConfigs: [
747
+ {
748
+ id: "grok-4.3",
749
+ name: "Grok 4.3",
750
+ enabled: true
751
+ },
752
+ {
753
+ id: "grok-4.20",
754
+ name: "Grok 4.20",
755
+ enabled: true
756
+ },
757
+ {
758
+ id: "grok-4.20-reasoning",
759
+ name: "Grok 4.20 Reasoning",
760
+ enabled: true
761
+ },
762
+ {
763
+ id: "grok-4.20-multi-agent",
764
+ name: "Grok 4.20 Multi-Agent",
765
+ enabled: true
766
+ }
767
+ ],
768
+ description: "xAI Grok models with reasoning, vision, and web search capabilities",
769
+ icon: "grok",
770
+ website: "https://x.ai",
771
+ docsUrl: "https://docs.x.ai",
772
+ defaultSettings: {
773
+ temperature: 0.7,
774
+ maxTokens: 4096
775
+ },
776
+ isSystem: true,
777
+ features: [
778
+ "vision",
779
+ "reasoning"
780
+ ]
781
+ };
782
+
783
+ // src/provider-presets/presets/groq.json
784
+ var groq_default = {
785
+ id: "groq",
786
+ presetId: "groq",
787
+ name: "Groq",
788
+ apiFormat: "openai",
789
+ api_base_url: "https://api.groq.com/openai/v1",
790
+ models: [
791
+ "llama-3.3-70b-versatile",
792
+ "llama-3.1-8b-instant",
793
+ "mixtral-8x7b-32768"
794
+ ],
795
+ modelConfigs: [
796
+ {
797
+ id: "llama-3.3-70b-versatile",
798
+ name: "Llama 3.3 70B Versatile",
799
+ enabled: true,
800
+ category: "chat",
801
+ contextLength: 131072,
802
+ maxTokens: 32768,
803
+ functionCall: true
804
+ },
805
+ {
806
+ id: "llama-3.1-8b-instant",
807
+ name: "Llama 3.1 8B Instant",
808
+ enabled: true,
809
+ category: "chat",
810
+ contextLength: 131072,
811
+ maxTokens: 8192,
812
+ functionCall: true
813
+ },
814
+ {
815
+ id: "mixtral-8x7b-32768",
816
+ name: "Mixtral 8x7B",
817
+ enabled: true,
818
+ category: "chat",
819
+ contextLength: 32768,
820
+ maxTokens: 32768,
821
+ functionCall: true
822
+ }
823
+ ],
824
+ transformer: {
825
+ use: [
826
+ "groq"
827
+ ]
828
+ },
829
+ description: "Groq \u2014 \u9AD8\u901F LPU \u63A8\u7406",
830
+ icon: "groq",
831
+ website: "https://groq.com",
832
+ docsUrl: "https://console.groq.com/docs",
833
+ defaultSettings: {
834
+ temperature: 0.7,
835
+ maxTokens: 4096
836
+ },
837
+ isSystem: true,
838
+ features: []
839
+ };
840
+
841
+ // src/provider-presets/presets/kimi.json
842
+ var kimi_default = {
843
+ id: "kimi",
844
+ presetId: "kimi",
845
+ name: "Kimi (Moonshot)",
846
+ apiFormat: "openai",
847
+ api_base_url: "https://api.moonshot.ai/v1",
848
+ codingPlanBaseUrl: "https://api.kimi.com/coding/v1",
849
+ models: [
850
+ "kimi-k2.6",
851
+ "kimi-k2.5",
852
+ "kimi-k2-thinking"
853
+ ],
854
+ modelConfigs: [
855
+ {
856
+ id: "kimi-k2.6",
857
+ name: "Kimi K2.6",
858
+ enabled: true
859
+ },
860
+ {
861
+ id: "kimi-k2.5",
862
+ name: "Kimi K2.5",
863
+ enabled: true
864
+ },
865
+ {
866
+ id: "kimi-k2-thinking",
867
+ name: "Kimi K2 Thinking",
868
+ enabled: false
869
+ }
870
+ ],
871
+ description: "Moonshot AI - Kimi\u5927\u6A21\u578B",
872
+ icon: "kimi",
873
+ website: "https://www.kimi.com",
874
+ docsUrl: "https://platform.moonshot.ai/docs",
875
+ isSystem: true,
876
+ features: [
877
+ "coding-plan",
878
+ "vision",
879
+ "search"
880
+ ],
881
+ searchConfig: {
882
+ type: "builtin-tool",
883
+ toolDefinition: {
884
+ type: "builtin_function",
885
+ function: {
886
+ name: "web_search"
887
+ }
888
+ },
889
+ conflictsWithFC: false,
890
+ applicableModels: null
891
+ },
892
+ apiModes: [
893
+ {
894
+ id: "standard",
895
+ label: "apiMode.standard",
896
+ baseUrl: "https://api.moonshot.ai/v1"
897
+ },
898
+ {
899
+ id: "coding-plan",
900
+ label: "apiMode.codingPlan",
901
+ baseUrl: "https://api.kimi.com/coding/v1"
902
+ }
903
+ ]
904
+ };
905
+
906
+ // src/provider-presets/presets/kuaishou.json
907
+ var kuaishou_default = {
908
+ id: "kuaishou",
909
+ presetId: "kuaishou",
910
+ name: "\u5FEB\u624B KwaiKAT",
911
+ nameKey: "presetName.kuaishou",
912
+ apiFormat: "openai",
913
+ api_base_url: "https://wanqing.streamlakeapi.com/api/gateway/v1",
914
+ codingPlanBaseUrl: "https://wanqing.streamlakeapi.com/api/gateway/coding/v1",
915
+ models: [
916
+ "kat-coder-pro-v1",
917
+ "kat-coder-air-v1"
918
+ ],
919
+ modelConfigs: [
920
+ {
921
+ id: "kat-coder-pro-v1",
922
+ name: "KAT-Coder Pro",
923
+ enabled: true
924
+ },
925
+ {
926
+ id: "kat-coder-air-v1",
927
+ name: "KAT-Coder Air (\u514D\u8D39)",
928
+ enabled: true
929
+ }
930
+ ],
931
+ description: "\u5FEB\u624B StreamLake \u5927\u6A21\u578B\u5E73\u53F0",
932
+ icon: "kuaishou",
933
+ website: "https://streamlake.com",
934
+ docsUrl: "https://www.streamlake.com/document/WANQING/me6ymdjrqv8lp4iq0o9",
935
+ isSystem: true,
936
+ features: [
937
+ "coding-plan"
938
+ ],
939
+ apiModes: [
940
+ {
941
+ id: "standard",
942
+ label: "apiMode.standard",
943
+ baseUrl: "https://wanqing.streamlakeapi.com/api/gateway/v1"
944
+ },
945
+ {
946
+ id: "coding-plan",
947
+ label: "apiMode.codingPlan",
948
+ baseUrl: "https://wanqing.streamlakeapi.com/api/gateway/coding/v1"
949
+ }
950
+ ]
951
+ };
952
+
953
+ // src/provider-presets/presets/minimax.json
954
+ var minimax_default = {
955
+ id: "minimax",
956
+ presetId: "minimax",
957
+ name: "MiniMax",
958
+ apiFormat: "anthropic",
959
+ api_base_url: "https://api.minimaxi.com/anthropic",
960
+ transformer: {
961
+ use: [
962
+ "anthropic"
963
+ ]
964
+ },
965
+ models: [
966
+ "MiniMax-M2.5",
967
+ "MiniMax-M2.5-highspeed",
968
+ "MiniMax-M2.1",
969
+ "MiniMax-M2.1-highspeed"
970
+ ],
971
+ modelConfigs: [
972
+ {
973
+ id: "MiniMax-M2.5",
974
+ name: "MiniMax M2.5",
975
+ enabled: true
976
+ },
977
+ {
978
+ id: "MiniMax-M2.5-highspeed",
979
+ name: "MiniMax M2.5 \u6781\u901F\u7248",
980
+ enabled: true
981
+ },
982
+ {
983
+ id: "MiniMax-M2.1",
984
+ name: "MiniMax M2.1",
985
+ enabled: true
986
+ },
987
+ {
988
+ id: "MiniMax-M2.1-highspeed",
989
+ name: "MiniMax M2.1 \u6781\u901F\u7248",
990
+ enabled: true
991
+ }
992
+ ],
993
+ description: "MiniMax\u5927\u6A21\u578B\u5E73\u53F0",
994
+ icon: "minimax",
995
+ website: "https://platform.minimaxi.com",
996
+ docsUrl: "https://platform.minimaxi.com/docs",
997
+ isSystem: true,
998
+ features: [
999
+ "coding-plan",
1000
+ "mcp-search",
1001
+ "mcp-vision"
1002
+ ],
1003
+ searchConfig: {
1004
+ type: "mcp",
1005
+ mcpServerId: "minimax-search",
1006
+ applicableModels: null
1007
+ }
1008
+ };
1009
+
1010
+ // src/provider-presets/presets/mistral.json
1011
+ var mistral_default = {
1012
+ id: "mistral",
1013
+ presetId: "mistral",
1014
+ name: "Mistral",
1015
+ apiFormat: "openai",
1016
+ api_base_url: "https://api.mistral.ai/v1",
1017
+ modelsEndpoint: "https://api.mistral.ai/v1/models",
1018
+ models: [
1019
+ "mistral-large-latest",
1020
+ "codestral-latest",
1021
+ "mistral-medium-latest"
1022
+ ],
1023
+ modelConfigs: [
1024
+ {
1025
+ id: "mistral-large-latest",
1026
+ name: "Mistral Large",
1027
+ enabled: true
1028
+ },
1029
+ {
1030
+ id: "codestral-latest",
1031
+ name: "Codestral",
1032
+ enabled: true
1033
+ },
1034
+ {
1035
+ id: "mistral-medium-latest",
1036
+ name: "Mistral Medium",
1037
+ enabled: true
1038
+ }
1039
+ ],
1040
+ description: "Mistral La Plateforme \u2014 \u6CD5\u56FD\u5927\u6A21\u578B",
1041
+ icon: "mistral",
1042
+ website: "https://mistral.ai",
1043
+ docsUrl: "https://docs.mistral.ai",
1044
+ defaultSettings: {
1045
+ temperature: 0.7,
1046
+ maxTokens: 4096
1047
+ },
1048
+ isSystem: true,
1049
+ features: []
1050
+ };
1051
+
1052
+ // src/provider-presets/presets/mthreads.json
1053
+ var mthreads_default = {
1054
+ id: "mthreads",
1055
+ presetId: "mthreads",
1056
+ name: "\u6469\u5C14\u7EBF\u7A0B",
1057
+ nameKey: "presetName.mthreads",
1058
+ apiFormat: "openai",
1059
+ api_base_url: "",
1060
+ models: [
1061
+ "glm-4.7"
1062
+ ],
1063
+ modelConfigs: [
1064
+ {
1065
+ id: "glm-4.7",
1066
+ name: "GLM-4.7",
1067
+ enabled: true
1068
+ }
1069
+ ],
1070
+ description: "\u6469\u5C14\u7EBF\u7A0B AI Coding Plan (\u56FD\u4EA7\u82AF\u7247)",
1071
+ icon: "mthreads",
1072
+ website: "https://code.mthreads.com",
1073
+ docsUrl: "https://docs.mthreads.com/kuaecloud/kuaecloud-doc-online/coding_plan/plan_overview",
1074
+ isSystem: true,
1075
+ features: [
1076
+ "coding-plan"
1077
+ ]
1078
+ };
1079
+
1080
+ // src/provider-presets/presets/ollama.json
1081
+ var ollama_default = {
1082
+ id: "ollama",
1083
+ presetId: "ollama",
1084
+ name: "Ollama",
1085
+ apiFormat: "openai",
1086
+ api_base_url: "http://localhost:11434/v1",
1087
+ modelsEndpoint: "http://localhost:11434/v1/models",
1088
+ models: [],
1089
+ modelConfigs: [],
1090
+ description: "Ollama \u2014 \u672C\u5730\u5927\u6A21\u578B\u63A8\u7406\uFF08API key \u53EF\u7559\u7A7A\u6216\u586B\u4EFB\u610F\u5360\u4F4D\u7B26\uFF09",
1091
+ icon: "ollama",
1092
+ website: "https://ollama.com",
1093
+ docsUrl: "https://github.com/ollama/ollama/blob/main/docs/openai.md",
1094
+ defaultSettings: {
1095
+ temperature: 0.7,
1096
+ maxTokens: 4096
1097
+ },
1098
+ isSystem: true,
1099
+ features: [
1100
+ "local"
1101
+ ]
1102
+ };
1103
+
1104
+ // src/provider-presets/presets/openai.json
1105
+ var openai_default = {
1106
+ id: "openai",
1107
+ presetId: "openai",
1108
+ name: "OpenAI",
1109
+ apiFormat: "openai",
1110
+ apiType: "openai",
1111
+ api_base_url: "https://api.openai.com/v1/chat/completions",
1112
+ models: [
1113
+ "gpt-5.5",
1114
+ "gpt-5.4",
1115
+ "gpt-5.4-mini",
1116
+ "gpt-5.2",
1117
+ "gpt-4o",
1118
+ "gpt-4o-mini"
1119
+ ],
1120
+ modelConfigs: [
1121
+ {
1122
+ id: "gpt-5.5",
1123
+ name: "GPT-5.5",
1124
+ enabled: true
1125
+ },
1126
+ {
1127
+ id: "gpt-5.4",
1128
+ name: "GPT-5.4",
1129
+ enabled: true
1130
+ },
1131
+ {
1132
+ id: "gpt-5.4-mini",
1133
+ name: "GPT-5.4 Mini",
1134
+ enabled: true
1135
+ },
1136
+ {
1137
+ id: "gpt-5.2",
1138
+ name: "GPT-5.2",
1139
+ enabled: true
1140
+ },
1141
+ {
1142
+ id: "gpt-4o",
1143
+ name: "GPT-4o",
1144
+ enabled: true
1145
+ },
1146
+ {
1147
+ id: "gpt-4o-mini",
1148
+ name: "GPT-4o Mini",
1149
+ enabled: true
1150
+ }
1151
+ ],
1152
+ description: "OpenAI\u5B98\u65B9API",
1153
+ icon: "openai",
1154
+ website: "https://openai.com",
1155
+ docsUrl: "https://platform.openai.com/docs",
1156
+ defaultSettings: {
1157
+ temperature: 0.7,
1158
+ maxTokens: 4096
1159
+ },
1160
+ isSystem: true,
1161
+ features: [
1162
+ "vision",
1163
+ "search"
1164
+ ],
1165
+ searchConfig: {
1166
+ type: "builtin-tool",
1167
+ toolDefinition: {
1168
+ type: "web_search_preview"
1169
+ },
1170
+ conflictsWithFC: false,
1171
+ applicableModels: null
1172
+ }
1173
+ };
1174
+
1175
+ // src/provider-presets/presets/openai-response.json
1176
+ var openai_response_default = {
1177
+ id: "openai-response",
1178
+ presetId: "openai-response",
1179
+ name: "OpenAI (Responses API)",
1180
+ apiFormat: "openai-response",
1181
+ api_base_url: "https://api.openai.com",
1182
+ models: [
1183
+ "gpt-5.5",
1184
+ "gpt-5.4",
1185
+ "gpt-5.4-mini",
1186
+ "gpt-5.3-codex",
1187
+ "gpt-5.2",
1188
+ "o3",
1189
+ "o4-mini",
1190
+ "gpt-4.1"
1191
+ ],
1192
+ modelConfigs: [
1193
+ {
1194
+ id: "gpt-5.5",
1195
+ name: "GPT-5.5",
1196
+ enabled: true
1197
+ },
1198
+ {
1199
+ id: "gpt-5.4",
1200
+ name: "GPT-5.4",
1201
+ enabled: true
1202
+ },
1203
+ {
1204
+ id: "gpt-5.4-mini",
1205
+ name: "GPT-5.4 Mini",
1206
+ enabled: true
1207
+ },
1208
+ {
1209
+ id: "gpt-5.3-codex",
1210
+ name: "GPT-5.3 Codex",
1211
+ enabled: true
1212
+ },
1213
+ {
1214
+ id: "gpt-5.2",
1215
+ name: "GPT-5.2",
1216
+ enabled: true
1217
+ },
1218
+ {
1219
+ id: "o3",
1220
+ name: "o3",
1221
+ enabled: true
1222
+ },
1223
+ {
1224
+ id: "o4-mini",
1225
+ name: "o4 Mini",
1226
+ enabled: true
1227
+ },
1228
+ {
1229
+ id: "gpt-4.1",
1230
+ name: "GPT-4.1",
1231
+ enabled: true
1232
+ }
1233
+ ],
1234
+ transformer: {
1235
+ use: [
1236
+ "openai-response"
1237
+ ]
1238
+ },
1239
+ description: "OpenAI Responses API (/v1/responses endpoint)",
1240
+ icon: "openai",
1241
+ website: "https://openai.com",
1242
+ docsUrl: "https://platform.openai.com/docs/api-reference/responses",
1243
+ defaultSettings: {
1244
+ temperature: 0.7,
1245
+ maxTokens: 4096
1246
+ },
1247
+ isSystem: true,
1248
+ features: [
1249
+ "vision",
1250
+ "reasoning"
1251
+ ]
1252
+ };
1253
+
1254
+ // src/provider-presets/presets/openrouter.json
1255
+ var openrouter_default = {
1256
+ id: "openrouter",
1257
+ presetId: "openrouter",
1258
+ name: "OpenRouter",
1259
+ apiFormat: "openai",
1260
+ api_base_url: "https://openrouter.ai/api/v1",
1261
+ modelsEndpoint: "https://openrouter.ai/api/v1/models",
1262
+ models: [
1263
+ "anthropic/claude-sonnet-4-6",
1264
+ "openai/gpt-5",
1265
+ "google/gemini-3.1-pro",
1266
+ "meta-llama/llama-3.3-70b-instruct",
1267
+ "deepseek/deepseek-v3.2"
1268
+ ],
1269
+ modelConfigs: [
1270
+ {
1271
+ id: "anthropic/claude-sonnet-4-6",
1272
+ name: "Claude Sonnet 4.6 (OpenRouter)",
1273
+ enabled: true
1274
+ },
1275
+ {
1276
+ id: "openai/gpt-5",
1277
+ name: "GPT-5 (OpenRouter)",
1278
+ enabled: true
1279
+ },
1280
+ {
1281
+ id: "google/gemini-3.1-pro",
1282
+ name: "Gemini 3.1 Pro (OpenRouter)",
1283
+ enabled: true
1284
+ },
1285
+ {
1286
+ id: "meta-llama/llama-3.3-70b-instruct",
1287
+ name: "Llama 3.3 70B (OpenRouter)",
1288
+ enabled: true
1289
+ },
1290
+ {
1291
+ id: "deepseek/deepseek-v3.2",
1292
+ name: "DeepSeek V3.2 (OpenRouter)",
1293
+ enabled: true
1294
+ }
1295
+ ],
1296
+ transformer: {
1297
+ use: [
1298
+ "openrouter"
1299
+ ]
1300
+ },
1301
+ description: "OpenRouter \u2014 \u7EDF\u4E00\u805A\u5408\u591A\u5BB6 LLM provider",
1302
+ icon: "openrouter",
1303
+ website: "https://openrouter.ai",
1304
+ docsUrl: "https://openrouter.ai/docs",
1305
+ defaultSettings: {
1306
+ temperature: 0.7,
1307
+ maxTokens: 4096
1308
+ },
1309
+ isSystem: true,
1310
+ features: [
1311
+ "vision",
1312
+ "reasoning"
1313
+ ]
1314
+ };
1315
+
1316
+ // src/provider-presets/presets/perplexity.json
1317
+ var perplexity_default = {
1318
+ id: "perplexity",
1319
+ presetId: "perplexity",
1320
+ name: "Perplexity",
1321
+ apiFormat: "openai",
1322
+ api_base_url: "https://api.perplexity.ai",
1323
+ models: [
1324
+ "sonar",
1325
+ "sonar-pro",
1326
+ "sonar-reasoning-pro"
1327
+ ],
1328
+ modelConfigs: [
1329
+ {
1330
+ id: "sonar",
1331
+ name: "Sonar",
1332
+ enabled: true
1333
+ },
1334
+ {
1335
+ id: "sonar-pro",
1336
+ name: "Sonar Pro",
1337
+ enabled: true
1338
+ },
1339
+ {
1340
+ id: "sonar-reasoning-pro",
1341
+ name: "Sonar Reasoning Pro",
1342
+ enabled: true
1343
+ }
1344
+ ],
1345
+ description: "Perplexity Sonar \u2014 \u641C\u7D22\u589E\u5F3A\u63A8\u7406",
1346
+ icon: "perplexity",
1347
+ website: "https://perplexity.ai",
1348
+ docsUrl: "https://docs.perplexity.ai",
1349
+ defaultSettings: {
1350
+ temperature: 0.7,
1351
+ maxTokens: 4096
1352
+ },
1353
+ isSystem: true,
1354
+ features: [
1355
+ "search"
1356
+ ]
1357
+ };
1358
+
1359
+ // src/provider-presets/presets/siliconflow.json
1360
+ var siliconflow_default = {
1361
+ id: "siliconflow",
1362
+ presetId: "siliconflow",
1363
+ name: "SiliconFlow",
1364
+ apiFormat: "openai",
1365
+ api_base_url: "https://api.siliconflow.com/v1",
1366
+ modelsEndpoint: "https://api.siliconflow.com/v1/models",
1367
+ models: [
1368
+ "Qwen/Qwen2.5-Coder-32B-Instruct",
1369
+ "Qwen/Qwen2.5-Coder-7B-Instruct",
1370
+ "deepseek-ai/DeepSeek-V3",
1371
+ "zai-org/GLM-4.7"
1372
+ ],
1373
+ modelConfigs: [
1374
+ {
1375
+ id: "Qwen/Qwen2.5-Coder-32B-Instruct",
1376
+ name: "Qwen2.5 Coder 32B",
1377
+ enabled: true
1378
+ },
1379
+ {
1380
+ id: "Qwen/Qwen2.5-Coder-7B-Instruct",
1381
+ name: "Qwen2.5 Coder 7B",
1382
+ enabled: true
1383
+ },
1384
+ {
1385
+ id: "deepseek-ai/DeepSeek-V3",
1386
+ name: "DeepSeek V3 (\u805A\u5408)",
1387
+ enabled: true
1388
+ },
1389
+ {
1390
+ id: "zai-org/GLM-4.7",
1391
+ name: "GLM-4.7 (\u805A\u5408)",
1392
+ enabled: true
1393
+ }
1394
+ ],
1395
+ description: "\u7845\u57FA\u6D41\u52A8 - \u591A\u6A21\u578B\u805A\u5408\u63A8\u7406\u5E73\u53F0",
1396
+ icon: "silicon",
1397
+ website: "https://www.siliconflow.com",
1398
+ docsUrl: "https://docs.siliconflow.com",
1399
+ defaultSettings: {
1400
+ temperature: 0.7,
1401
+ maxTokens: 4096
1402
+ },
1403
+ isSystem: true,
1404
+ features: [
1405
+ "vision"
1406
+ ]
1407
+ };
1408
+
1409
+ // src/provider-presets/presets/tencent.json
1410
+ var tencent_default = {
1411
+ id: "tencent",
1412
+ presetId: "tencent",
1413
+ name: "\u817E\u8BAF\u4E91\u6DF7\u5143",
1414
+ nameKey: "presetName.tencent",
1415
+ apiFormat: "openai",
1416
+ api_base_url: "https://api.lkeap.cloud.tencent.com/v1",
1417
+ codingPlanBaseUrl: "https://api.lkeap.cloud.tencent.com/coding/v3",
1418
+ codingPlanSeparateKey: true,
1419
+ models: [
1420
+ "tc-code-latest",
1421
+ "hunyuan-2.0-instruct",
1422
+ "hunyuan-turbos",
1423
+ "glm-5",
1424
+ "kimi-k2.5",
1425
+ "minimax-m2.5"
1426
+ ],
1427
+ modelConfigs: [
1428
+ {
1429
+ id: "tc-code-latest",
1430
+ name: "Auto",
1431
+ enabled: true
1432
+ },
1433
+ {
1434
+ id: "hunyuan-2.0-instruct",
1435
+ name: "\u6DF7\u5143 2.0 Instruct",
1436
+ enabled: true
1437
+ },
1438
+ {
1439
+ id: "hunyuan-turbos",
1440
+ name: "\u6DF7\u5143 TurboS",
1441
+ enabled: true
1442
+ },
1443
+ {
1444
+ id: "glm-5",
1445
+ name: "GLM-5",
1446
+ enabled: true
1447
+ },
1448
+ {
1449
+ id: "kimi-k2.5",
1450
+ name: "Kimi K2.5",
1451
+ enabled: true
1452
+ },
1453
+ {
1454
+ id: "minimax-m2.5",
1455
+ name: "MiniMax M2.5",
1456
+ enabled: true
1457
+ }
1458
+ ],
1459
+ description: "\u817E\u8BAF\u4E91\u5927\u6A21\u578B\u5E73\u53F0 (OpenAI \u517C\u5BB9) \u2014 \u542B Coding Plan\uFF1BToken Plan \u4EC5 Anthropic \u534F\u8BAE\uFF0C\u8BF7\u4F7F\u7528 tencent-anthropic preset",
1460
+ icon: "tencent",
1461
+ website: "https://cloud.tencent.com",
1462
+ docsUrl: "https://cloud.tencent.com/document/product/1772/128947",
1463
+ isSystem: true,
1464
+ features: [
1465
+ "coding-plan"
1466
+ ],
1467
+ apiModes: [
1468
+ {
1469
+ id: "standard",
1470
+ label: "apiMode.standard",
1471
+ baseUrl: "https://api.lkeap.cloud.tencent.com/v1",
1472
+ apiKeyPrefix: "sk-"
1473
+ },
1474
+ {
1475
+ id: "coding-plan",
1476
+ label: "apiMode.codingPlan",
1477
+ baseUrl: "https://api.lkeap.cloud.tencent.com/coding/v3",
1478
+ apiKeyPrefix: "sk-sp-"
1479
+ }
1480
+ ]
1481
+ };
1482
+
1483
+ // src/provider-presets/presets/tencent-anthropic.json
1484
+ var tencent_anthropic_default = {
1485
+ id: "tencent-anthropic",
1486
+ presetId: "tencent",
1487
+ name: "\u817E\u8BAF\u4E91\u6DF7\u5143 (Token Plan)",
1488
+ nameKey: "presetName.tencentAnthropic",
1489
+ apiFormat: "anthropic",
1490
+ api_base_url: "https://api.lkeap.cloud.tencent.com/plan/anthropic/v1/messages",
1491
+ transformer: {
1492
+ use: [
1493
+ "anthropic"
1494
+ ]
1495
+ },
1496
+ models: [
1497
+ "tc-code-latest",
1498
+ "hunyuan-2.0-instruct",
1499
+ "hunyuan-turbos",
1500
+ "glm-5",
1501
+ "kimi-k2.5",
1502
+ "minimax-m2.5"
1503
+ ],
1504
+ modelConfigs: [
1505
+ {
1506
+ id: "tc-code-latest",
1507
+ name: "Auto",
1508
+ enabled: true
1509
+ },
1510
+ {
1511
+ id: "hunyuan-2.0-instruct",
1512
+ name: "\u6DF7\u5143 2.0 Instruct",
1513
+ enabled: true
1514
+ },
1515
+ {
1516
+ id: "hunyuan-turbos",
1517
+ name: "\u6DF7\u5143 TurboS",
1518
+ enabled: true
1519
+ },
1520
+ {
1521
+ id: "glm-5",
1522
+ name: "GLM-5",
1523
+ enabled: true
1524
+ },
1525
+ {
1526
+ id: "kimi-k2.5",
1527
+ name: "Kimi K2.5",
1528
+ enabled: true
1529
+ },
1530
+ {
1531
+ id: "minimax-m2.5",
1532
+ name: "MiniMax M2.5",
1533
+ enabled: true
1534
+ }
1535
+ ],
1536
+ description: "\u817E\u8BAF\u4E91\u6DF7\u5143 (Anthropic \u517C\u5BB9) \u2014 \u542B Token Plan + Coding Plan\uFF1B\u9002\u5408 Claude Code \u5DE5\u5177\u94FE",
1537
+ icon: "tencent",
1538
+ website: "https://cloud.tencent.com",
1539
+ docsUrl: "https://cloud.tencent.com/document/product/1772/128947",
1540
+ isSystem: true,
1541
+ features: [
1542
+ "coding-plan"
1543
+ ],
1544
+ apiModes: [
1545
+ {
1546
+ id: "token-plan",
1547
+ label: "apiMode.tokenPlan",
1548
+ baseUrl: "https://api.lkeap.cloud.tencent.com/plan/anthropic/v1/messages",
1549
+ apiKeyPrefix: "sk-tp-",
1550
+ note: "apiMode.tencentTokenPlanAnthropicOnly"
1551
+ },
1552
+ {
1553
+ id: "coding-plan",
1554
+ label: "apiMode.codingPlan",
1555
+ baseUrl: "https://api.lkeap.cloud.tencent.com/coding/anthropic",
1556
+ apiKeyPrefix: "sk-sp-"
1557
+ }
1558
+ ]
1559
+ };
1560
+
1561
+ // src/provider-presets/presets/together.json
1562
+ var together_default = {
1563
+ id: "together",
1564
+ presetId: "together",
1565
+ name: "Together AI",
1566
+ apiFormat: "openai",
1567
+ api_base_url: "https://api.together.xyz/v1",
1568
+ modelsEndpoint: "https://api.together.xyz/v1/models",
1569
+ models: [
1570
+ "meta-llama/Llama-3.3-70B-Instruct-Turbo",
1571
+ "Qwen/Qwen2.5-Coder-32B-Instruct",
1572
+ "deepseek-ai/DeepSeek-V3"
1573
+ ],
1574
+ modelConfigs: [
1575
+ {
1576
+ id: "meta-llama/Llama-3.3-70B-Instruct-Turbo",
1577
+ name: "Llama 3.3 70B Turbo",
1578
+ enabled: true
1579
+ },
1580
+ {
1581
+ id: "Qwen/Qwen2.5-Coder-32B-Instruct",
1582
+ name: "Qwen2.5 Coder 32B",
1583
+ enabled: true
1584
+ },
1585
+ {
1586
+ id: "deepseek-ai/DeepSeek-V3",
1587
+ name: "DeepSeek V3",
1588
+ enabled: true
1589
+ }
1590
+ ],
1591
+ description: "Together AI \u2014 \u5F00\u6E90\u6A21\u578B\u805A\u5408\u63A8\u7406",
1592
+ icon: "together",
1593
+ website: "https://together.ai",
1594
+ docsUrl: "https://docs.together.ai",
1595
+ defaultSettings: {
1596
+ temperature: 0.7,
1597
+ maxTokens: 4096
1598
+ },
1599
+ isSystem: true,
1600
+ features: []
1601
+ };
1602
+
1603
+ // src/provider-presets/presets/volcengine.json
1604
+ var volcengine_default = {
1605
+ id: "volcengine",
1606
+ presetId: "volcengine",
1607
+ name: "\u706B\u5C71\u65B9\u821F",
1608
+ nameKey: "presetName.volcengine",
1609
+ apiFormat: "openai",
1610
+ api_base_url: "https://ark.cn-beijing.volces.com/api/v3",
1611
+ codingPlanBaseUrl: "https://ark.cn-beijing.volces.com/api/coding/v3",
1612
+ models: [
1613
+ "ark-code-latest",
1614
+ "doubao-seed-2.0-code",
1615
+ "doubao-seed-2.0-lite",
1616
+ "glm-4.7",
1617
+ "deepseek-v3.2",
1618
+ "kimi-k2.5"
1619
+ ],
1620
+ modelConfigs: [
1621
+ {
1622
+ id: "ark-code-latest",
1623
+ name: "Auto (\u667A\u80FD\u8DEF\u7531)",
1624
+ enabled: true
1625
+ },
1626
+ {
1627
+ id: "doubao-seed-2.0-code",
1628
+ name: "\u8C46\u5305 Seed 2.0 Code",
1629
+ enabled: true
1630
+ },
1631
+ {
1632
+ id: "doubao-seed-2.0-lite",
1633
+ name: "\u8C46\u5305 Seed 2.0 Lite",
1634
+ enabled: true
1635
+ },
1636
+ {
1637
+ id: "glm-4.7",
1638
+ name: "GLM-4.7",
1639
+ enabled: true
1640
+ },
1641
+ {
1642
+ id: "deepseek-v3.2",
1643
+ name: "DeepSeek V3.2",
1644
+ enabled: true
1645
+ },
1646
+ {
1647
+ id: "kimi-k2.5",
1648
+ name: "Kimi K2.5",
1649
+ enabled: true
1650
+ }
1651
+ ],
1652
+ description: "\u5B57\u8282\u8DF3\u52A8\u706B\u5C71\u65B9\u821F\u5927\u6A21\u578B\u5E73\u53F0",
1653
+ icon: "volcengine",
1654
+ website: "https://www.volcengine.com",
1655
+ docsUrl: "https://www.volcengine.com/docs/82379/1330626",
1656
+ isSystem: true,
1657
+ features: [
1658
+ "coding-plan",
1659
+ "vision",
1660
+ "search",
1661
+ "auto-routing"
1662
+ ],
1663
+ searchConfig: {
1664
+ type: "model-param",
1665
+ paramName: "web_search",
1666
+ paramValue: {
1667
+ enable: true
1668
+ },
1669
+ applicableModels: null
1670
+ },
1671
+ apiModes: [
1672
+ {
1673
+ id: "standard",
1674
+ label: "apiMode.standard",
1675
+ baseUrl: "https://ark.cn-beijing.volces.com/api/v3"
1676
+ },
1677
+ {
1678
+ id: "coding-plan",
1679
+ label: "apiMode.codingPlan",
1680
+ baseUrl: "https://ark.cn-beijing.volces.com/api/coding/v3"
1681
+ }
1682
+ ]
1683
+ };
1684
+
1685
+ // src/provider-presets/presets/xiaomi-mimo.json
1686
+ var xiaomi_mimo_default = {
1687
+ id: "xiaomi-mimo",
1688
+ presetId: "xiaomi-mimo",
1689
+ name: "\u5C0F\u7C73 MiMo (OpenAI)",
1690
+ nameKey: "presetName.xiaomiMimoOpenai",
1691
+ apiFormat: "openai",
1692
+ api_base_url: "https://api.xiaomimimo.com/v1",
1693
+ codingPlanBaseUrl: "https://token-plan-cn.xiaomimimo.com/v1",
1694
+ models: [
1695
+ "mimo-v2.5",
1696
+ "mimo-v2.5-pro",
1697
+ "mimo-v2-pro",
1698
+ "mimo-v2-flash",
1699
+ "mimo-v2-omni"
1700
+ ],
1701
+ modelConfigs: [
1702
+ {
1703
+ id: "mimo-v2.5",
1704
+ name: "MiMo V2.5",
1705
+ enabled: true
1706
+ },
1707
+ {
1708
+ id: "mimo-v2.5-pro",
1709
+ name: "MiMo V2.5 Pro",
1710
+ enabled: true
1711
+ },
1712
+ {
1713
+ id: "mimo-v2-pro",
1714
+ name: "MiMo V2 Pro",
1715
+ enabled: true
1716
+ },
1717
+ {
1718
+ id: "mimo-v2-flash",
1719
+ name: "MiMo V2 Flash",
1720
+ enabled: true
1721
+ },
1722
+ {
1723
+ id: "mimo-v2-omni",
1724
+ name: "MiMo V2 Omni",
1725
+ enabled: true
1726
+ }
1727
+ ],
1728
+ description: "\u5C0F\u7C73 MiMo (OpenAI \u517C\u5BB9) \u2014 \u9002\u5408\u901A\u7528 OpenAI \u5DE5\u5177\u94FE\uFF1B\u8BA2\u9605 Token Plan \u540E\u542F\u7528 coding plan\uFF0C\u6D77\u5916\u7528\u6237\u53EF\u624B\u52A8\u6539 baseUrl \u4E3A token-plan-sgp.* / token-plan-ams.*\u3002",
1729
+ icon: "xiaomi",
1730
+ website: "https://xiaomimimo.com",
1731
+ docsUrl: "https://platform.xiaomimimo.com/",
1732
+ isSystem: true,
1733
+ features: [
1734
+ "coding-plan",
1735
+ "vision"
1736
+ ],
1737
+ apiModes: [
1738
+ {
1739
+ id: "standard",
1740
+ label: "apiMode.standard",
1741
+ baseUrl: "https://api.xiaomimimo.com/v1"
1742
+ },
1743
+ {
1744
+ id: "token-plan",
1745
+ label: "apiMode.tokenPlan",
1746
+ baseUrl: "https://token-plan-cn.xiaomimimo.com/v1",
1747
+ apiKeyPrefix: "tp-",
1748
+ note: "apiMode.xiaomiTokenPlanRegions"
1749
+ }
1750
+ ]
1751
+ };
1752
+
1753
+ // src/provider-presets/presets/xiaomi-mimo-anthropic.json
1754
+ var xiaomi_mimo_anthropic_default = {
1755
+ id: "xiaomi-mimo-anthropic",
1756
+ presetId: "xiaomi-mimo",
1757
+ name: "\u5C0F\u7C73 MiMo (Anthropic)",
1758
+ nameKey: "presetName.xiaomiMimoAnthropic",
1759
+ apiFormat: "anthropic",
1760
+ api_base_url: "https://api.xiaomimimo.com/anthropic",
1761
+ codingPlanBaseUrl: "https://token-plan-cn.xiaomimimo.com/anthropic",
1762
+ transformer: {
1763
+ use: [
1764
+ "anthropic"
1765
+ ]
1766
+ },
1767
+ models: [
1768
+ "mimo-v2.5",
1769
+ "mimo-v2.5-pro",
1770
+ "mimo-v2-pro",
1771
+ "mimo-v2-flash",
1772
+ "mimo-v2-omni"
1773
+ ],
1774
+ modelConfigs: [
1775
+ {
1776
+ id: "mimo-v2.5",
1777
+ name: "MiMo V2.5",
1778
+ enabled: true
1779
+ },
1780
+ {
1781
+ id: "mimo-v2.5-pro",
1782
+ name: "MiMo V2.5 Pro",
1783
+ enabled: true
1784
+ },
1785
+ {
1786
+ id: "mimo-v2-pro",
1787
+ name: "MiMo V2 Pro",
1788
+ enabled: true
1789
+ },
1790
+ {
1791
+ id: "mimo-v2-flash",
1792
+ name: "MiMo V2 Flash",
1793
+ enabled: true
1794
+ },
1795
+ {
1796
+ id: "mimo-v2-omni",
1797
+ name: "MiMo V2 Omni",
1798
+ enabled: true
1799
+ }
1800
+ ],
1801
+ description: "\u5C0F\u7C73 MiMo (Anthropic \u517C\u5BB9) \u2014 \u9002\u5408 Claude Code \u7C7B\u5DE5\u5177\u94FE\uFF1B\u8BA2\u9605 Token Plan \u540E\u542F\u7528 coding plan\uFF0C\u6D77\u5916\u7528\u6237\u53EF\u624B\u52A8\u6539 baseUrl \u4E3A token-plan-sgp.* / token-plan-ams.*\u3002",
1802
+ icon: "xiaomi",
1803
+ website: "https://xiaomimimo.com",
1804
+ docsUrl: "https://platform.xiaomimimo.com/",
1805
+ isSystem: true,
1806
+ features: [
1807
+ "coding-plan",
1808
+ "vision"
1809
+ ],
1810
+ apiModes: [
1811
+ {
1812
+ id: "standard",
1813
+ label: "apiMode.standard",
1814
+ baseUrl: "https://api.xiaomimimo.com/anthropic"
1815
+ },
1816
+ {
1817
+ id: "token-plan",
1818
+ label: "apiMode.tokenPlan",
1819
+ baseUrl: "https://token-plan-cn.xiaomimimo.com/anthropic",
1820
+ apiKeyPrefix: "tp-",
1821
+ note: "apiMode.xiaomiTokenPlanRegions"
1822
+ }
1823
+ ]
1824
+ };
1825
+
1826
+ // src/provider-presets/presets/zhipu.json
1827
+ var zhipu_default = {
1828
+ id: "zhipu",
1829
+ presetId: "zhipu",
1830
+ name: "z.ai",
1831
+ nameKey: "presetName.zhipu",
1832
+ apiFormat: "openai",
1833
+ api_base_url: "https://api.z.ai/api/paas/v4",
1834
+ codingPlanBaseUrl: "https://api.z.ai/api/coding/paas/v4",
1835
+ modelsEndpoint: "https://api.z.ai/api/paas/v4/models",
1836
+ models: [
1837
+ "glm-5",
1838
+ "glm-5.1",
1839
+ "glm-4.5-air",
1840
+ "glm-4.6v",
1841
+ "glm-4.7"
1842
+ ],
1843
+ modelConfigs: [
1844
+ {
1845
+ id: "glm-5",
1846
+ name: "GLM-5",
1847
+ enabled: true
1848
+ },
1849
+ {
1850
+ id: "glm-5.1",
1851
+ name: "GLM-5.1",
1852
+ enabled: true
1853
+ },
1854
+ {
1855
+ id: "glm-4.5-air",
1856
+ name: "GLM-4.5 Air",
1857
+ enabled: true
1858
+ },
1859
+ {
1860
+ id: "glm-4.6v",
1861
+ name: "GLM-4.6V",
1862
+ enabled: true
1863
+ },
1864
+ {
1865
+ id: "glm-4.7",
1866
+ name: "GLM-4.7",
1867
+ enabled: true
1868
+ }
1869
+ ],
1870
+ description: "\u667A\u8C31AI\u5927\u6A21\u578B\u5F00\u653E\u5E73\u53F0",
1871
+ icon: "zhipu",
1872
+ website: "https://z.ai",
1873
+ docsUrl: "https://docs.z.ai",
1874
+ isSystem: true,
1875
+ features: [
1876
+ "coding-plan",
1877
+ "vision",
1878
+ "mcp-search",
1879
+ "mcp-vision"
1880
+ ],
1881
+ searchConfig: {
1882
+ type: "builtin-tool",
1883
+ toolDefinition: {
1884
+ type: "web_search",
1885
+ web_search: {
1886
+ enable: true
1887
+ }
1888
+ },
1889
+ conflictsWithFC: false,
1890
+ applicableModels: null
1891
+ },
1892
+ apiModes: [
1893
+ {
1894
+ id: "standard",
1895
+ label: "apiMode.standard",
1896
+ baseUrl: "https://api.z.ai/api/paas/v4"
1897
+ },
1898
+ {
1899
+ id: "coding-plan",
1900
+ label: "apiMode.codingPlan",
1901
+ baseUrl: "https://api.z.ai/api/coding/paas/v4"
1902
+ }
1903
+ ]
1904
+ };
1905
+
1906
+ // src/provider-presets/presets/zhipu-bigmodel.json
1907
+ var zhipu_bigmodel_default = {
1908
+ id: "zhipu-bigmodel",
1909
+ presetId: "zhipu",
1910
+ name: "\u667A\u8C31 GLM",
1911
+ nameKey: "presetName.zhipuBigmodel",
1912
+ apiFormat: "openai",
1913
+ api_base_url: "https://open.bigmodel.cn/api/paas/v4",
1914
+ codingPlanBaseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
1915
+ modelsEndpoint: "https://open.bigmodel.cn/api/paas/v4/models",
1916
+ models: [
1917
+ "glm-5",
1918
+ "glm-5.1",
1919
+ "glm-4.5-air",
1920
+ "glm-4.6v",
1921
+ "glm-4.7"
1922
+ ],
1923
+ modelConfigs: [
1924
+ {
1925
+ id: "glm-5",
1926
+ name: "GLM-5",
1927
+ enabled: true,
1928
+ category: "chat",
1929
+ contextLength: 2e5,
1930
+ maxTokens: 128e3,
1931
+ functionCall: true
1932
+ },
1933
+ {
1934
+ id: "glm-5.1",
1935
+ name: "GLM-5.1",
1936
+ enabled: true,
1937
+ category: "chat",
1938
+ contextLength: 2e5,
1939
+ maxTokens: 128e3,
1940
+ functionCall: true
1941
+ },
1942
+ {
1943
+ id: "glm-4.5-air",
1944
+ name: "GLM-4.5 Air",
1945
+ enabled: true,
1946
+ category: "chat",
1947
+ contextLength: 128e3,
1948
+ maxTokens: 32768,
1949
+ functionCall: true
1950
+ },
1951
+ {
1952
+ id: "glm-4.6v",
1953
+ name: "GLM-4.6V",
1954
+ enabled: true,
1955
+ category: "chat",
1956
+ contextLength: 128e3,
1957
+ maxTokens: 32768,
1958
+ vision: true,
1959
+ functionCall: true
1960
+ },
1961
+ {
1962
+ id: "glm-4.7",
1963
+ name: "GLM-4.7",
1964
+ enabled: true,
1965
+ category: "code",
1966
+ contextLength: 2e5,
1967
+ maxTokens: 128e3,
1968
+ functionCall: true
1969
+ }
1970
+ ],
1971
+ description: "\u667A\u8C31AI\u5927\u6A21\u578B\u5F00\u653E\u5E73\u53F0 (bigmodel.cn \u56FD\u5185\u7AEF\u70B9)",
1972
+ icon: "zhipu",
1973
+ website: "https://bigmodel.cn",
1974
+ docsUrl: "https://docs.bigmodel.cn",
1975
+ isSystem: true,
1976
+ features: [
1977
+ "coding-plan",
1978
+ "vision",
1979
+ "mcp-search",
1980
+ "mcp-vision"
1981
+ ],
1982
+ searchConfig: {
1983
+ type: "builtin-tool",
1984
+ toolDefinition: {
1985
+ type: "web_search",
1986
+ web_search: {
1987
+ enable: true
1988
+ }
1989
+ },
1990
+ conflictsWithFC: false,
1991
+ applicableModels: null
1992
+ },
1993
+ apiModes: [
1994
+ {
1995
+ id: "standard",
1996
+ label: "apiMode.standard",
1997
+ baseUrl: "https://open.bigmodel.cn/api/paas/v4"
1998
+ },
1999
+ {
2000
+ id: "coding-plan",
2001
+ label: "apiMode.codingPlan",
2002
+ baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4"
2003
+ }
2004
+ ]
2005
+ };
2006
+
2007
+ // src/provider-presets/manifest.ts
2008
+ var RAW_PRESETS_IN_ORDER = [
2009
+ // International
2010
+ openai_default,
2011
+ anthropic_default,
2012
+ gemini_default,
2013
+ gemini_vertex_default,
2014
+ grok_default,
2015
+ deepseek_default,
2016
+ azure_openai_default,
2017
+ openai_response_default,
2018
+ siliconflow_default,
2019
+ openrouter_default,
2020
+ mistral_default,
2021
+ together_default,
2022
+ perplexity_default,
2023
+ // Chinese cloud
2024
+ zhipu_default,
2025
+ zhipu_bigmodel_default,
2026
+ volcengine_default,
2027
+ kimi_default,
2028
+ dashscope_default,
2029
+ tencent_default,
2030
+ tencent_anthropic_default,
2031
+ minimax_default,
2032
+ baidu_default,
2033
+ kuaishou_default,
2034
+ mthreads_default,
2035
+ xiaomi_mimo_default,
2036
+ xiaomi_mimo_anthropic_default,
2037
+ // Local-inference
2038
+ ollama_default,
2039
+ // Fast-inference
2040
+ groq_default,
2041
+ cerebras_default
2042
+ ];
2043
+
2044
+ // src/provider-presets/schema.ts
2045
+ var import_zod = require("zod");
2046
+
2047
+ // src/provider-presets/types.ts
2048
+ var API_MODE_IDS = {
2049
+ STANDARD: "standard",
2050
+ CODING_PLAN: "coding-plan",
2051
+ TOKEN_PLAN: "token-plan"
2052
+ };
2053
+
2054
+ // src/provider-presets/schema.ts
2055
+ var API_FORMATS = [
2056
+ "openai",
2057
+ "anthropic",
2058
+ "google",
2059
+ "azure-openai",
2060
+ "openai-response"
2061
+ ];
2062
+ var searchCapabilitySchema = import_zod.z.enum([
2063
+ "model-param",
2064
+ "builtin-tool",
2065
+ "mcp",
2066
+ "sdk-native",
2067
+ "none"
2068
+ ]);
2069
+ var providerSearchConfigSchema = import_zod.z.object({
2070
+ type: searchCapabilitySchema,
2071
+ paramName: import_zod.z.string().optional(),
2072
+ paramValue: import_zod.z.unknown().optional(),
2073
+ extraParams: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional(),
2074
+ toolDefinition: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional(),
2075
+ conflictsWithFC: import_zod.z.boolean().optional(),
2076
+ mcpServerId: import_zod.z.string().optional(),
2077
+ applicableModels: import_zod.z.array(import_zod.z.string()).nullable().optional()
2078
+ }).passthrough();
2079
+ var apiModeSchema = import_zod.z.object({
2080
+ id: import_zod.z.string(),
2081
+ label: import_zod.z.string(),
2082
+ baseUrl: import_zod.z.string(),
2083
+ apiKey: import_zod.z.string().optional(),
2084
+ apiKeyPrefix: import_zod.z.string().optional(),
2085
+ note: import_zod.z.string().optional()
2086
+ }).passthrough();
2087
+ var modelConfigSchema = import_zod.z.object({ id: import_zod.z.string(), name: import_zod.z.string(), enabled: import_zod.z.boolean() }).passthrough();
2088
+ var transformerConfigSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.unknown());
2089
+ var presetSchema = import_zod.z.object({
2090
+ id: import_zod.z.string().min(1),
2091
+ presetId: import_zod.z.string().min(1),
2092
+ name: import_zod.z.string().min(1),
2093
+ apiFormat: import_zod.z.enum(API_FORMATS),
2094
+ api_base_url: import_zod.z.string(),
2095
+ models: import_zod.z.array(import_zod.z.string()),
2096
+ apiType: import_zod.z.string().optional(),
2097
+ nameKey: import_zod.z.string().optional(),
2098
+ modelsEndpoint: import_zod.z.string().optional(),
2099
+ apiVersion: import_zod.z.string().optional(),
2100
+ modelConfigs: import_zod.z.array(modelConfigSchema).optional(),
2101
+ modelGroups: import_zod.z.array(import_zod.z.record(import_zod.z.string(), import_zod.z.unknown())).optional(),
2102
+ transformer: transformerConfigSchema.optional(),
2103
+ description: import_zod.z.string().optional(),
2104
+ icon: import_zod.z.string().optional(),
2105
+ website: import_zod.z.string().optional(),
2106
+ docsUrl: import_zod.z.string().optional(),
2107
+ defaultSettings: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional(),
2108
+ isSystem: import_zod.z.boolean().optional(),
2109
+ isOfficial: import_zod.z.boolean().optional(),
2110
+ maxConcurrency: import_zod.z.number().optional(),
2111
+ codingPlanBaseUrl: import_zod.z.string().optional(),
2112
+ codingPlanSeparateKey: import_zod.z.boolean().optional(),
2113
+ features: import_zod.z.array(import_zod.z.string()).optional(),
2114
+ searchConfig: providerSearchConfigSchema.optional(),
2115
+ apiModes: import_zod.z.array(apiModeSchema).optional(),
2116
+ // Additive, reserved (design D2). Inert for current consumers.
2117
+ revision: import_zod.z.number().int().positive().optional()
2118
+ }).passthrough();
2119
+
2120
+ // src/provider-presets/index.ts
2121
+ var CATALOG_VERSION = catalog_default.version;
2122
+ var PRESET_REVISIONS = {};
2123
+ function loadPresets() {
2124
+ return RAW_PRESETS_IN_ORDER.map((raw) => {
2125
+ const parsed = presetSchema.parse(raw);
2126
+ PRESET_REVISIONS[parsed.id] = parsed.revision ?? 1;
2127
+ if ("revision" in parsed) {
2128
+ const { revision: _revision, ...rest } = parsed;
2129
+ void _revision;
2130
+ return rest;
2131
+ }
2132
+ return parsed;
2133
+ });
2134
+ }
2135
+ var LLM_PROVIDER_PRESETS = loadPresets();
2136
+ function getPresetRevision(id) {
2137
+ return PRESET_REVISIONS[id] ?? 1;
2138
+ }
2139
+ function resolveFollowProviderModel(providerId, presetId, type) {
2140
+ const key = presetId || providerId;
2141
+ const mapping = PROVIDER_MODEL_MAPPINGS[key];
2142
+ if (!mapping) return void 0;
2143
+ const modelId = type === "background" ? mapping.background : mapping.vision;
2144
+ if (!modelId) return void 0;
2145
+ return `${providerId},${modelId}`;
2146
+ }
2147
+ function getAllProviderPresets() {
2148
+ return LLM_PROVIDER_PRESETS.map((p) => ({
2149
+ maxConcurrency: MAX_CONCURRENCY_DEFAULTS[p.id] ?? DEFAULT_MAX_CONCURRENCY,
2150
+ ...p
2151
+ }));
2152
+ }
2153
+ function getPresetById(idOrPresetId) {
2154
+ const all = getAllProviderPresets();
2155
+ return all.find((p) => p.id === idOrPresetId) ?? all.find((p) => p.presetId === idOrPresetId);
2156
+ }
2157
+ function getCodingPlanBaseUrl(idOrPresetId) {
2158
+ const preset = getPresetById(idOrPresetId);
2159
+ if (preset?.codingPlanBaseUrl) return preset.codingPlanBaseUrl;
2160
+ return CODING_PLAN_URL_PRESETS[idOrPresetId]?.baseUrl;
2161
+ }
2162
+ function getProviderSearchConfig(presetId) {
2163
+ const preset = getPresetById(presetId);
2164
+ if (preset?.searchConfig) return preset.searchConfig;
2165
+ return PROVIDER_SEARCH_CONFIGS[presetId];
2166
+ }
2167
+ // Annotate the CommonJS export names for ESM import in node:
2168
+ 0 && (module.exports = {
2169
+ API_MODE_IDS,
2170
+ CATALOG_VERSION,
2171
+ CODING_PLAN_URL_PRESETS,
2172
+ DEFAULT_SEED_PRESET_IDS,
2173
+ LLM_PROVIDER_PRESETS,
2174
+ MAX_CONCURRENCY_DEFAULTS,
2175
+ PROVIDER_MODEL_MAPPINGS,
2176
+ PROVIDER_SEARCH_CONFIGS,
2177
+ getAllProviderPresets,
2178
+ getCodingPlanBaseUrl,
2179
+ getPresetById,
2180
+ getPresetRevision,
2181
+ getProviderSearchConfig,
2182
+ resolveFollowProviderModel
2183
+ });