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