one-model-router 0.0.10 → 0.0.12

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 (80) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +32 -5
  3. package/bin/omr.js +46 -0
  4. package/package.json +3 -2
  5. package/src/admin.js +965 -941
  6. package/src/balances.js +61 -61
  7. package/src/boot.js +117 -117
  8. package/src/channels/buddy.js +2031 -2031
  9. package/src/channels/cline.js +753 -753
  10. package/src/channels/codearts.js +2051 -2051
  11. package/src/channels/comate.js +830 -830
  12. package/src/channels/doubaowork.js +1784 -1784
  13. package/src/channels/freebuff.js +1316 -1316
  14. package/src/channels/gemini.js +1721 -1721
  15. package/src/channels/index.js +270 -270
  16. package/src/channels/joycode.js +936 -936
  17. package/src/channels/kimi.js +572 -572
  18. package/src/channels/lobsterai.js +1226 -1226
  19. package/src/channels/loomy.js +1032 -1032
  20. package/src/channels/miaoshou.js +1396 -1396
  21. package/src/channels/mimo.js +474 -474
  22. package/src/channels/minimax.js +1451 -1451
  23. package/src/channels/qoder-wasm.js +434 -434
  24. package/src/channels/qoder.js +1619 -1619
  25. package/src/channels/raccoon.js +1842 -1842
  26. package/src/channels/tabbit.js +1457 -1457
  27. package/src/channels/trae.js +1405 -1405
  28. package/src/channels/zcode-global.js +35 -35
  29. package/src/channels/zcode.js +2085 -2085
  30. package/src/checkin.js +496 -496
  31. package/src/credits.js +464 -464
  32. package/src/crypto.js +132 -132
  33. package/src/free-models.js +683 -683
  34. package/src/gateway.js +596 -578
  35. package/src/health.js +86 -86
  36. package/src/model-key.js +35 -35
  37. package/src/paths.js +96 -96
  38. package/src/probe.js +318 -318
  39. package/src/providers/builtin.js +626 -626
  40. package/src/providers/index.js +483 -457
  41. package/src/providers/kilo.js +111 -111
  42. package/src/providers/last-good.js +69 -69
  43. package/src/providers/modelsdev.js +242 -242
  44. package/src/providers/openai-compat.js +312 -312
  45. package/src/providers/opencode/bun-fetch.js +226 -226
  46. package/src/providers/opencode/lane.js +186 -186
  47. package/src/providers/opencode/o2a/LICENSE.dsh-our-free-model +21 -21
  48. package/src/providers/opencode/o2a/asset-source.js +43 -43
  49. package/src/providers/opencode/o2a/assets/opencode_prompt_v2.txt +96 -96
  50. package/src/providers/opencode/o2a/assets/opencode_tools.json +327 -327
  51. package/src/providers/opencode/o2a/entry.js +17 -17
  52. package/src/providers/opencode/o2a/gateway-body.js +42 -42
  53. package/src/providers/opencode/o2a/headers.js +133 -133
  54. package/src/providers/opencode/o2a/identity.js +148 -148
  55. package/src/providers/opencode/o2a/official-prompt.js +191 -191
  56. package/src/providers/opencode/o2a/official-tools.js +110 -110
  57. package/src/providers/opencode/o2a/tool-renames.js +217 -217
  58. package/src/providers/opencode/o2a/toolshape.js +418 -418
  59. package/src/providers/opencode/o2a/version.js +37 -37
  60. package/src/providers/opencode/upstream.js +403 -403
  61. package/src/providers/opencode/wire.js +496 -496
  62. package/src/providers/opencode.js +652 -652
  63. package/src/router.js +629 -629
  64. package/src/server.js +49 -33
  65. package/src/store.js +467 -467
  66. package/src/sync/index.js +1529 -1529
  67. package/src/sync/login-preload.cjs +52 -52
  68. package/src/sync/noise.js +141 -141
  69. package/src/sync/relay-http.js +176 -176
  70. package/src/sync/remote-host.js +818 -818
  71. package/src/sync/remote-http.js +112 -112
  72. package/src/sync/remote-login.js +657 -657
  73. package/src/sync/remote-pairing.js +204 -204
  74. package/src/sync/remote-protocol.js +321 -321
  75. package/src/sync/snapshot.js +211 -211
  76. package/src/update.js +458 -0
  77. package/src/util.js +334 -334
  78. package/web/app.js +4010 -3972
  79. package/web/index.html +32 -32
  80. package/web/style.css +971 -971
@@ -1,626 +1,626 @@
1
- /**
2
- * 代码内置的免费渠道定义(自定义 OpenAI 兼容提供商)。
3
- *
4
- * 这里只放渠道的静态信息:id / name / baseUrl / 模型目录 / extraHeaders / free。
5
- * 用户私有状态(API Key 槽位、启停、勾选模型)落在用户数据目录的 providers.json,
6
- * 由 store.js 的 loadProviders / saveProviders 与本文件合并 / 拆分——
7
- * 全新用户开箱即见这些渠道,只需在「免费渠道」页给卡片添加槽位即可使用。
8
- *
9
- * 新增内置渠道:往 BUILTIN_PROVIDERS 里加一项(绝不要把任何 API Key 写进本文件)。
10
- */
11
-
12
- export const BUILTIN_PROVIDERS = [
13
- {
14
- "id": "amd",
15
- "name": "AMD",
16
- "baseUrl": "https://developer.amd.com.cn/radeon/api/v1",
17
- "models": [
18
- {
19
- "id": "Clef",
20
- "name": "Clef",
21
- "contextWindow": null,
22
- "free": true
23
- },
24
- {
25
- "id": "d3",
26
- "name": "d3",
27
- "contextWindow": null,
28
- "free": true
29
- },
30
- {
31
- "id": "d3-flash",
32
- "name": "d3-flash",
33
- "contextWindow": null,
34
- "free": true
35
- },
36
- {
37
- "id": "DeepSeek-V4.1-Flash",
38
- "name": "DeepSeek-V4.1-Flash",
39
- "contextWindow": 1048576,
40
- "free": true
41
- },
42
- {
43
- "id": "DeepSeek-V4-Flash",
44
- "name": "DeepSeek-V4-Flash",
45
- "contextWindow": 1048576,
46
- "free": true
47
- },
48
- {
49
- "id": "Gemma-4-31B-IT",
50
- "name": "Gemma 4 31B",
51
- "contextWindow": 262144,
52
- "free": true
53
- },
54
- {
55
- "id": "GLM-5.3-Flash",
56
- "name": "GLM-5.3-Flash",
57
- "contextWindow": 262144,
58
- "free": true
59
- },
60
- {
61
- "id": "MiMo-V2.6-Flash",
62
- "name": "MiMo-V2.6-Flash",
63
- "contextWindow": 1048576,
64
- "free": true
65
- },
66
- {
67
- "id": "MiniCPM5-2B",
68
- "name": "MiniCPM5-2B",
69
- "contextWindow": 131072,
70
- "free": true
71
- },
72
- {
73
- "id": "MiniCPM-V-4.7-1B",
74
- "name": "MiniCPM-V-4.7-1B",
75
- "contextWindow": 262144,
76
- "free": true
77
- },
78
- {
79
- "id": "MiniCPM-V-4.7-35B-A3B",
80
- "name": "MiniCPM-V-4.7-35B-A3B",
81
- "contextWindow": 262144,
82
- "free": true
83
- },
84
- {
85
- "id": "Qwen3.8-27B",
86
- "name": "Qwen3.8-27B",
87
- "contextWindow": 262144,
88
- "free": true
89
- }
90
- ],
91
- "extraHeaders": {},
92
- "free": false
93
- },
94
- {
95
- "id": "sensenova",
96
- "name": "SenseNova",
97
- "baseUrl": "https://token.sensenova.cn/v1",
98
- "models": [
99
- {
100
- "id": "deepseek-v4-flash",
101
- "name": "deepseek-v4-flash",
102
- "contextWindow": 1048576,
103
- "free": true
104
- },
105
- {
106
- "id": "glm-5.2",
107
- "name": "glm-5.2",
108
- "contextWindow": 1048576,
109
- "free": true
110
- },
111
- {
112
- "id": "sensenova-6.8-flash-lite",
113
- "name": "sensenova-6.8-flash-lite",
114
- "contextWindow": 262144,
115
- "free": true
116
- },
117
- {
118
- "id": "sensenova-u1.5-lite",
119
- "name": "sensenova-u1.5-lite",
120
- "contextWindow": 262144,
121
- "free": true
122
- },
123
- {
124
- "id": "kimi-k3",
125
- "name": "kimi-k3",
126
- "contextWindow": 1048576,
127
- "free": true
128
- },
129
- {
130
- "id": "deepseek-flash",
131
- "name": "deepseek-flash",
132
- "contextWindow": 1048576,
133
- "free": true
134
- },
135
- {
136
- "id": "sensenova-6.8-flash",
137
- "name": "sensenova-6.8-flash",
138
- "contextWindow": 262144,
139
- "free": true
140
- },
141
- {
142
- "id": "glm-5.3",
143
- "name": "glm-5.3",
144
- "contextWindow": 1048576,
145
- "free": true
146
- }
147
- ],
148
- "extraHeaders": {},
149
- "free": false
150
- },
151
- {
152
- "id": "agnes-cn",
153
- "name": "Agnes-CN",
154
- "baseUrl": "https://api.agnes-ai.cn/v1",
155
- "models": [
156
- {
157
- "id": "agnes-2.5-flash",
158
- "name": "agnes-2.5-flash",
159
- "contextWindow": null
160
- },
161
- {
162
- "id": "agnes-2.5-pro",
163
- "name": "agnes-2.5-pro",
164
- "contextWindow": null
165
- },
166
- {
167
- "id": "agnes-2.5-pro-alpha",
168
- "name": "agnes-2.5-pro-alpha",
169
- "contextWindow": null
170
- },
171
- {
172
- "id": "agnes-2.5-pro-beta",
173
- "name": "agnes-2.5-pro-beta",
174
- "contextWindow": null
175
- },
176
- {
177
- "id": "agnes-2.5-pro-theta",
178
- "name": "agnes-2.5-pro-theta",
179
- "contextWindow": null
180
- },
181
- {
182
- "id": "agnes-3.0-flash",
183
- "name": "agnes-3.0-flash",
184
- "contextWindow": null
185
- },
186
- {
187
- "id": "agnes-image-2.1-flash",
188
- "name": "agnes-image-2.1-flash",
189
- "contextWindow": null
190
- },
191
- {
192
- "id": "agnes-image-2.5-flash",
193
- "name": "agnes-image-2.5-flash",
194
- "contextWindow": null
195
- },
196
- {
197
- "id": "agnes-video-2.5",
198
- "name": "agnes-video-2.5",
199
- "contextWindow": null
200
- },
201
- {
202
- "id": "agnes-video-2.5-flash",
203
- "name": "agnes-video-2.5-flash",
204
- "contextWindow": null
205
- }
206
- ],
207
- "extraHeaders": {},
208
- "free": false
209
- },
210
- {
211
- "id": "intern-ai",
212
- "name": "intern-ai",
213
- "baseUrl": "https://discovery-api.intern-ai.org.cn/v1",
214
- "models": [
215
- {
216
- "id": "Agents-A1",
217
- "name": "Agents-A1",
218
- "contextWindow": null
219
- },
220
- {
221
- "id": "Atria-Dawn",
222
- "name": "Atria-Dawn",
223
- "contextWindow": null
224
- },
225
- {
226
- "id": "Atria-Dawn-Preview",
227
- "name": "Atria-Dawn-Preview",
228
- "contextWindow": null
229
- },
230
- {
231
- "id": "Sage-A1.5",
232
- "name": "Sage-A1.5",
233
- "contextWindow": null
234
- },
235
- {
236
- "id": "deepseek-v4-flash-0731",
237
- "name": "DeepSeek-V4-Flash-0731",
238
- "contextWindow": null
239
- },
240
- {
241
- "id": "deepseek-v4-flash-vision",
242
- "name": "DeepSeek-V4-Flash-Vision",
243
- "contextWindow": null
244
- },
245
- {
246
- "id": "deepseek-v4-pro-0813",
247
- "name": "DeepSeek-V4-Pro-0813",
248
- "contextWindow": null
249
- },
250
- {
251
- "id": "deepseek-v4.1-flash-1017",
252
- "name": "DeepSeek-V4.1-Flash-1017",
253
- "contextWindow": null
254
- },
255
- {
256
- "id": "glm-5.3",
257
- "name": "GLM-5.3",
258
- "contextWindow": null
259
- },
260
- {
261
- "id": "intern-s2",
262
- "name": "书生-S2",
263
- "contextWindow": null
264
- },
265
- {
266
- "id": "kimi-k2.6",
267
- "name": "Kimi-K2.6",
268
- "contextWindow": null
269
- },
270
- {
271
- "id": "minimax-m3",
272
- "name": "MiniMax-M3",
273
- "contextWindow": null
274
- },
275
- {
276
- "id": "qwen3.8-27b",
277
- "name": "Qwen3.8-27B",
278
- "contextWindow": null
279
- }
280
- ],
281
- "extraHeaders": {},
282
- "free": false
283
- },
284
- {
285
- "id": "dots-ai",
286
- "name": "Dots",
287
- "baseUrl": "https://note3-prev-api.askdiandian.com/v1",
288
- "models": [
289
- {
290
- "id": "dots3-note-prev",
291
- "name": "dots3-note-prev",
292
- "contextWindow": null
293
- }
294
- ],
295
- "extraHeaders": {},
296
- "free": false
297
- },
298
- {
299
- "id": "nvidia",
300
- "name": "NVIDIA",
301
- "baseUrl": "https://integrate.api.nvidia.com/v1",
302
- "models": [
303
- {
304
- "id": "01-ai/yi-large",
305
- "name": "01-ai/yi-large",
306
- "contextWindow": null
307
- },
308
- {
309
- "id": "deepseek-ai/deepseek-v4.1-flash",
310
- "name": "deepseek-ai/deepseek-v4.1-flash",
311
- "contextWindow": null
312
- },
313
- {
314
- "id": "minimaxai/minimax-m3.1-flash",
315
- "name": "minimaxai/minimax-m3.1-flash",
316
- "contextWindow": null
317
- },
318
- {
319
- "id": "moonshotai/kimi-k2.6",
320
- "name": "moonshotai/kimi-k2.6",
321
- "contextWindow": null
322
- },
323
- {
324
- "id": "stepfun-ai/step-5-preview",
325
- "name": "stepfun-ai/step-5-preview",
326
- "contextWindow": null
327
- },
328
- {
329
- "id": "z-ai/glm-5.3-flash",
330
- "name": "z-ai/glm-5.3-flash",
331
- "contextWindow": null
332
- }
333
- ],
334
- "extraHeaders": {},
335
- "free": false
336
- },
337
- {
338
- "id": "openrouter",
339
- "name": "OpenRouter",
340
- "baseUrl": "https://openrouter.ai/api/v1",
341
- "models": [
342
- {
343
- "id": "baidu/ernie-5.5-flash-preview:free",
344
- "name": "Baidu: ERNIE-5.5-Flash-Preview (free)",
345
- "contextWindow": 1024000,
346
- "free": true
347
- },
348
- {
349
- "id": "thinkingmachines/inkling-2-small:free",
350
- "name": "Thinking Machines: Inkling 2 Small (free)",
351
- "contextWindow": 1048576,
352
- "free": true
353
- },
354
- {
355
- "id": "liquid/lfm-3-1.7b:free",
356
- "name": "LiquidAI: LFM3-1.7B (free)",
357
- "contextWindow": 262144,
358
- "free": true
359
- },
360
- {
361
- "id": "recursive/flint-v1.0:free",
362
- "name": "Recursive: Flint (free)",
363
- "contextWindow": 262144,
364
- "free": true
365
- },
366
- {
367
- "id": "nvidia/nemotron-3.5-super-vl:free",
368
- "name": "NVIDIA: Nemotron 3.5 Super VL (free)",
369
- "contextWindow": 1000000,
370
- "free": true
371
- },
372
- {
373
- "id": "dots-studio/dots-3-note-preview:free",
374
- "name": "Dots Studio: Dots3-Note Preview (free)",
375
- "contextWindow": 512000,
376
- "free": true
377
- },
378
- {
379
- "id": "liquid/lfm-2.5-2.6b:free",
380
- "name": "LiquidAI: LFM2.5-2.6B (free)",
381
- "contextWindow": 65536,
382
- "free": true
383
- },
384
- {
385
- "id": "nvidia/nemotron-3.5-lightning:free",
386
- "name": "NVIDIA: Nemotron 3.5 Lightning (free)",
387
- "contextWindow": 1000000,
388
- "free": true
389
- },
390
- {
391
- "id": "cohere/north-mini-code:free",
392
- "name": "Cohere: North Mini Code (free)",
393
- "contextWindow": 256000,
394
- "free": true
395
- },
396
- {
397
- "id": "nvidia/nemotron-3-ultra-550b-a55b:free",
398
- "name": "NVIDIA: Nemotron 3 Ultra (free)",
399
- "contextWindow": 1000000,
400
- "free": true
401
- },
402
- {
403
- "id": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free",
404
- "name": "NVIDIA: Nemotron 3 Nano Omni (free)",
405
- "contextWindow": 256000,
406
- "free": true
407
- },
408
- {
409
- "id": "google/gemma-4-26b-a4b-it:free",
410
- "name": "Google: Gemma 4 26B A4B (free)",
411
- "contextWindow": 262144,
412
- "free": true
413
- },
414
- {
415
- "id": "google/gemma-4-31b-it:free",
416
- "name": "Google: Gemma 4 31B (free)",
417
- "contextWindow": 262144,
418
- "free": true
419
- },
420
- {
421
- "id": "google/lyria-3-pro-preview",
422
- "name": "Google: Lyria 3 Pro Preview",
423
- "contextWindow": 1048576,
424
- "free": true
425
- },
426
- {
427
- "id": "google/lyria-3-clip-preview",
428
- "name": "Google: Lyria 3 Clip Preview",
429
- "contextWindow": 1048576,
430
- "free": true
431
- },
432
- {
433
- "id": "openrouter/free",
434
- "name": "Free Models Router",
435
- "contextWindow": 200000,
436
- "free": true
437
- }
438
- ],
439
- "extraHeaders": {},
440
- "free": false
441
- },
442
- {
443
- "id": "longcat",
444
- "name": "LongCat",
445
- "baseUrl": "https://api.longcat.chat/openai/v1",
446
- "models": [
447
- {
448
- "id": "LongCat-2.5-Preview",
449
- "name": "LongCat-2.5-Preview",
450
- "contextWindow": 1048576
451
- },
452
- {
453
- "id": "LongCat-2.5",
454
- "name": "LongCat-2.5",
455
- "contextWindow": 1048576
456
- },
457
- {
458
- "id": "LongCat-2.0",
459
- "name": "LongCat-2.0",
460
- "contextWindow": 1048576
461
- }
462
- ],
463
- "extraHeaders": {},
464
- "free": false
465
- },
466
- {
467
- "id": "modelscope",
468
- "name": "ModelScope",
469
- "baseUrl": "https://api-inference.modelscope.cn/v1",
470
- "models": [
471
- {
472
- "id": "deepseek-ai/DeepSeek-V4-Flash-0731",
473
- "name": "deepseek-ai/DeepSeek-V4-Flash-0731",
474
- "contextWindow": null
475
- },
476
- {
477
- "id": "deepseek-ai/DeepSeek-V4-Pro",
478
- "name": "deepseek-ai/DeepSeek-V4-Pro",
479
- "contextWindow": null
480
- },
481
- {
482
- "id": "deepseek-ai/DeepSeek-V4-Pro-0813",
483
- "name": "deepseek-ai/DeepSeek-V4-Pro-0813",
484
- "contextWindow": null
485
- },
486
- {
487
- "id": "deepseek-ai/DeepSeek-V4.1-Flash",
488
- "name": "deepseek-ai/DeepSeek-V4.1-Flash",
489
- "contextWindow": null
490
- },
491
- {
492
- "id": "deepseek-ai/DeepSeek-V4.1-Flash-1017",
493
- "name": "deepseek-ai/DeepSeek-V4.1-Flash-1017",
494
- "contextWindow": null
495
- },
496
- {
497
- "id": "MiniMax/MiniMax-M1-80k",
498
- "name": "MiniMax/MiniMax-M1-80k",
499
- "contextWindow": null
500
- },
501
- {
502
- "id": "MiniMax/MiniMax-M3",
503
- "name": "MiniMax/MiniMax-M3",
504
- "contextWindow": null
505
- },
506
- {
507
- "id": "moonshotai/Kimi-K3.1-Pro",
508
- "name": "moonshotai/Kimi-K3.1-Pro",
509
- "contextWindow": null
510
- },
511
- {
512
- "id": "OpenGVLab/InternVL3_5-241B-A28B",
513
- "name": "OpenGVLab/InternVL3_5-241B-A28B",
514
- "contextWindow": null
515
- },
516
- {
517
- "id": "Qwen/Qwen3.5-122B-A10B",
518
- "name": "Qwen/Qwen3.5-122B-A10B",
519
- "contextWindow": null
520
- },
521
- {
522
- "id": "Qwen/Qwen3.5-35B-A3B",
523
- "name": "Qwen/Qwen3.5-35B-A3B",
524
- "contextWindow": null
525
- },
526
- {
527
- "id": "Qwen/Qwen3.5-397B-A17B",
528
- "name": "Qwen/Qwen3.5-397B-A17B",
529
- "contextWindow": null
530
- },
531
- {
532
- "id": "Qwen/Qwen3.8-Flash-Next",
533
- "name": "Qwen/Qwen3.8-Flash-Next",
534
- "contextWindow": null
535
- },
536
- {
537
- "id": "stepfun-ai/Step-3.5-Flash",
538
- "name": "stepfun-ai/Step-3.5-Flash",
539
- "contextWindow": null
540
- },
541
- {
542
- "id": "stepfun-ai/Step-3.7-Flash",
543
- "name": "stepfun-ai/Step-3.7-Flash",
544
- "contextWindow": null
545
- },
546
- {
547
- "id": "stepfun-ai/Step-5-Preview",
548
- "name": "stepfun-ai/Step-5-Preview",
549
- "contextWindow": null
550
- },
551
- {
552
- "id": "ZhipuAI/GLM-4.7-Flash",
553
- "name": "ZhipuAI/GLM-4.7-Flash",
554
- "contextWindow": null
555
- },
556
- {
557
- "id": "ZhipuAI/GLM-5.2",
558
- "name": "ZhipuAI/GLM-5.2",
559
- "contextWindow": null
560
- }
561
- ],
562
- "extraHeaders": {},
563
- "free": false
564
- },
565
- {
566
- "id": "agnes-com",
567
- "name": "Agnes-COM",
568
- "baseUrl": "https://apihub.agnes-ai.com/v1",
569
- "models": [
570
- {
571
- "id": "agnes-2.5-flash",
572
- "name": "agnes-2.5-flash",
573
- "contextWindow": null
574
- },
575
- {
576
- "id": "agnes-2.5-pro",
577
- "name": "agnes-2.5-pro",
578
- "contextWindow": null
579
- },
580
- {
581
- "id": "agnes-2.5-pro-alpha",
582
- "name": "agnes-2.5-pro-alpha",
583
- "contextWindow": null
584
- },
585
- {
586
- "id": "agnes-2.5-pro-beta",
587
- "name": "agnes-2.5-pro-beta",
588
- "contextWindow": null
589
- },
590
- {
591
- "id": "agnes-3.0-flash",
592
- "name": "agnes-3.0-flash",
593
- "contextWindow": null
594
- },
595
- {
596
- "id": "agnes-image-2.0-flash",
597
- "name": "agnes-image-2.0-flash",
598
- "contextWindow": null
599
- },
600
- {
601
- "id": "agnes-image-2.1-flash",
602
- "name": "agnes-image-2.1-flash",
603
- "contextWindow": null
604
- },
605
- {
606
- "id": "agnes-image-2.5-flash",
607
- "name": "agnes-image-2.5-flash",
608
- "contextWindow": null
609
- },
610
- {
611
- "id": "agnes-video-2.5",
612
- "name": "agnes-video-2.5",
613
- "contextWindow": null
614
- },
615
- {
616
- "id": "agnes-video-2.5-flash",
617
- "name": "agnes-video-2.5-flash",
618
- "contextWindow": null
619
- }
620
- ],
621
- "extraHeaders": {},
622
- "free": false
623
- }
624
- ]
625
-
626
- export const BUILTIN_IDS = new Set(BUILTIN_PROVIDERS.map(p => p.id))
1
+ /**
2
+ * 代码内置的免费渠道定义(自定义 OpenAI 兼容提供商)。
3
+ *
4
+ * 这里只放渠道的静态信息:id / name / baseUrl / 模型目录 / extraHeaders / free。
5
+ * 用户私有状态(API Key 槽位、启停、勾选模型)落在用户数据目录的 providers.json,
6
+ * 由 store.js 的 loadProviders / saveProviders 与本文件合并 / 拆分——
7
+ * 全新用户开箱即见这些渠道,只需在「免费渠道」页给卡片添加槽位即可使用。
8
+ *
9
+ * 新增内置渠道:往 BUILTIN_PROVIDERS 里加一项(绝不要把任何 API Key 写进本文件)。
10
+ */
11
+
12
+ export const BUILTIN_PROVIDERS = [
13
+ {
14
+ "id": "amd",
15
+ "name": "AMD",
16
+ "baseUrl": "https://developer.amd.com.cn/radeon/api/v1",
17
+ "models": [
18
+ {
19
+ "id": "Clef",
20
+ "name": "Clef",
21
+ "contextWindow": null,
22
+ "free": true
23
+ },
24
+ {
25
+ "id": "d3",
26
+ "name": "d3",
27
+ "contextWindow": null,
28
+ "free": true
29
+ },
30
+ {
31
+ "id": "d3-flash",
32
+ "name": "d3-flash",
33
+ "contextWindow": null,
34
+ "free": true
35
+ },
36
+ {
37
+ "id": "DeepSeek-V4.1-Flash",
38
+ "name": "DeepSeek-V4.1-Flash",
39
+ "contextWindow": 1048576,
40
+ "free": true
41
+ },
42
+ {
43
+ "id": "DeepSeek-V4-Flash",
44
+ "name": "DeepSeek-V4-Flash",
45
+ "contextWindow": 1048576,
46
+ "free": true
47
+ },
48
+ {
49
+ "id": "Gemma-4-31B-IT",
50
+ "name": "Gemma 4 31B",
51
+ "contextWindow": 262144,
52
+ "free": true
53
+ },
54
+ {
55
+ "id": "GLM-5.3-Flash",
56
+ "name": "GLM-5.3-Flash",
57
+ "contextWindow": 262144,
58
+ "free": true
59
+ },
60
+ {
61
+ "id": "MiMo-V2.6-Flash",
62
+ "name": "MiMo-V2.6-Flash",
63
+ "contextWindow": 1048576,
64
+ "free": true
65
+ },
66
+ {
67
+ "id": "MiniCPM5-2B",
68
+ "name": "MiniCPM5-2B",
69
+ "contextWindow": 131072,
70
+ "free": true
71
+ },
72
+ {
73
+ "id": "MiniCPM-V-4.7-1B",
74
+ "name": "MiniCPM-V-4.7-1B",
75
+ "contextWindow": 262144,
76
+ "free": true
77
+ },
78
+ {
79
+ "id": "MiniCPM-V-4.7-35B-A3B",
80
+ "name": "MiniCPM-V-4.7-35B-A3B",
81
+ "contextWindow": 262144,
82
+ "free": true
83
+ },
84
+ {
85
+ "id": "Qwen3.8-27B",
86
+ "name": "Qwen3.8-27B",
87
+ "contextWindow": 262144,
88
+ "free": true
89
+ }
90
+ ],
91
+ "extraHeaders": {},
92
+ "free": false
93
+ },
94
+ {
95
+ "id": "sensenova",
96
+ "name": "SenseNova",
97
+ "baseUrl": "https://token.sensenova.cn/v1",
98
+ "models": [
99
+ {
100
+ "id": "deepseek-v4-flash",
101
+ "name": "deepseek-v4-flash",
102
+ "contextWindow": 1048576,
103
+ "free": true
104
+ },
105
+ {
106
+ "id": "glm-5.2",
107
+ "name": "glm-5.2",
108
+ "contextWindow": 1048576,
109
+ "free": true
110
+ },
111
+ {
112
+ "id": "sensenova-6.8-flash-lite",
113
+ "name": "sensenova-6.8-flash-lite",
114
+ "contextWindow": 262144,
115
+ "free": true
116
+ },
117
+ {
118
+ "id": "sensenova-u1.5-lite",
119
+ "name": "sensenova-u1.5-lite",
120
+ "contextWindow": 262144,
121
+ "free": true
122
+ },
123
+ {
124
+ "id": "kimi-k3",
125
+ "name": "kimi-k3",
126
+ "contextWindow": 1048576,
127
+ "free": true
128
+ },
129
+ {
130
+ "id": "deepseek-flash",
131
+ "name": "deepseek-flash",
132
+ "contextWindow": 1048576,
133
+ "free": true
134
+ },
135
+ {
136
+ "id": "sensenova-6.8-flash",
137
+ "name": "sensenova-6.8-flash",
138
+ "contextWindow": 262144,
139
+ "free": true
140
+ },
141
+ {
142
+ "id": "glm-5.3",
143
+ "name": "glm-5.3",
144
+ "contextWindow": 1048576,
145
+ "free": true
146
+ }
147
+ ],
148
+ "extraHeaders": {},
149
+ "free": false
150
+ },
151
+ {
152
+ "id": "agnes-cn",
153
+ "name": "Agnes-CN",
154
+ "baseUrl": "https://api.agnes-ai.cn/v1",
155
+ "models": [
156
+ {
157
+ "id": "agnes-2.5-flash",
158
+ "name": "agnes-2.5-flash",
159
+ "contextWindow": null
160
+ },
161
+ {
162
+ "id": "agnes-2.5-pro",
163
+ "name": "agnes-2.5-pro",
164
+ "contextWindow": null
165
+ },
166
+ {
167
+ "id": "agnes-2.5-pro-alpha",
168
+ "name": "agnes-2.5-pro-alpha",
169
+ "contextWindow": null
170
+ },
171
+ {
172
+ "id": "agnes-2.5-pro-beta",
173
+ "name": "agnes-2.5-pro-beta",
174
+ "contextWindow": null
175
+ },
176
+ {
177
+ "id": "agnes-2.5-pro-theta",
178
+ "name": "agnes-2.5-pro-theta",
179
+ "contextWindow": null
180
+ },
181
+ {
182
+ "id": "agnes-3.0-flash",
183
+ "name": "agnes-3.0-flash",
184
+ "contextWindow": null
185
+ },
186
+ {
187
+ "id": "agnes-image-2.1-flash",
188
+ "name": "agnes-image-2.1-flash",
189
+ "contextWindow": null
190
+ },
191
+ {
192
+ "id": "agnes-image-2.5-flash",
193
+ "name": "agnes-image-2.5-flash",
194
+ "contextWindow": null
195
+ },
196
+ {
197
+ "id": "agnes-video-2.5",
198
+ "name": "agnes-video-2.5",
199
+ "contextWindow": null
200
+ },
201
+ {
202
+ "id": "agnes-video-2.5-flash",
203
+ "name": "agnes-video-2.5-flash",
204
+ "contextWindow": null
205
+ }
206
+ ],
207
+ "extraHeaders": {},
208
+ "free": false
209
+ },
210
+ {
211
+ "id": "intern-ai",
212
+ "name": "intern-ai",
213
+ "baseUrl": "https://discovery-api.intern-ai.org.cn/v1",
214
+ "models": [
215
+ {
216
+ "id": "Agents-A1",
217
+ "name": "Agents-A1",
218
+ "contextWindow": null
219
+ },
220
+ {
221
+ "id": "Atria-Dawn",
222
+ "name": "Atria-Dawn",
223
+ "contextWindow": null
224
+ },
225
+ {
226
+ "id": "Atria-Dawn-Preview",
227
+ "name": "Atria-Dawn-Preview",
228
+ "contextWindow": null
229
+ },
230
+ {
231
+ "id": "Sage-A1.5",
232
+ "name": "Sage-A1.5",
233
+ "contextWindow": null
234
+ },
235
+ {
236
+ "id": "deepseek-v4-flash-0731",
237
+ "name": "DeepSeek-V4-Flash-0731",
238
+ "contextWindow": null
239
+ },
240
+ {
241
+ "id": "deepseek-v4-flash-vision",
242
+ "name": "DeepSeek-V4-Flash-Vision",
243
+ "contextWindow": null
244
+ },
245
+ {
246
+ "id": "deepseek-v4-pro-0813",
247
+ "name": "DeepSeek-V4-Pro-0813",
248
+ "contextWindow": null
249
+ },
250
+ {
251
+ "id": "deepseek-v4.1-flash-1017",
252
+ "name": "DeepSeek-V4.1-Flash-1017",
253
+ "contextWindow": null
254
+ },
255
+ {
256
+ "id": "glm-5.3",
257
+ "name": "GLM-5.3",
258
+ "contextWindow": null
259
+ },
260
+ {
261
+ "id": "intern-s2",
262
+ "name": "书生-S2",
263
+ "contextWindow": null
264
+ },
265
+ {
266
+ "id": "kimi-k2.6",
267
+ "name": "Kimi-K2.6",
268
+ "contextWindow": null
269
+ },
270
+ {
271
+ "id": "minimax-m3",
272
+ "name": "MiniMax-M3",
273
+ "contextWindow": null
274
+ },
275
+ {
276
+ "id": "qwen3.8-27b",
277
+ "name": "Qwen3.8-27B",
278
+ "contextWindow": null
279
+ }
280
+ ],
281
+ "extraHeaders": {},
282
+ "free": false
283
+ },
284
+ {
285
+ "id": "dots-ai",
286
+ "name": "Dots",
287
+ "baseUrl": "https://note3-prev-api.askdiandian.com/v1",
288
+ "models": [
289
+ {
290
+ "id": "dots3-note-prev",
291
+ "name": "dots3-note-prev",
292
+ "contextWindow": null
293
+ }
294
+ ],
295
+ "extraHeaders": {},
296
+ "free": false
297
+ },
298
+ {
299
+ "id": "nvidia",
300
+ "name": "NVIDIA",
301
+ "baseUrl": "https://integrate.api.nvidia.com/v1",
302
+ "models": [
303
+ {
304
+ "id": "01-ai/yi-large",
305
+ "name": "01-ai/yi-large",
306
+ "contextWindow": null
307
+ },
308
+ {
309
+ "id": "deepseek-ai/deepseek-v4.1-flash",
310
+ "name": "deepseek-ai/deepseek-v4.1-flash",
311
+ "contextWindow": null
312
+ },
313
+ {
314
+ "id": "minimaxai/minimax-m3.1-flash",
315
+ "name": "minimaxai/minimax-m3.1-flash",
316
+ "contextWindow": null
317
+ },
318
+ {
319
+ "id": "moonshotai/kimi-k2.6",
320
+ "name": "moonshotai/kimi-k2.6",
321
+ "contextWindow": null
322
+ },
323
+ {
324
+ "id": "stepfun-ai/step-5-preview",
325
+ "name": "stepfun-ai/step-5-preview",
326
+ "contextWindow": null
327
+ },
328
+ {
329
+ "id": "z-ai/glm-5.3-flash",
330
+ "name": "z-ai/glm-5.3-flash",
331
+ "contextWindow": null
332
+ }
333
+ ],
334
+ "extraHeaders": {},
335
+ "free": false
336
+ },
337
+ {
338
+ "id": "openrouter",
339
+ "name": "OpenRouter",
340
+ "baseUrl": "https://openrouter.ai/api/v1",
341
+ "models": [
342
+ {
343
+ "id": "baidu/ernie-5.5-flash-preview:free",
344
+ "name": "Baidu: ERNIE-5.5-Flash-Preview (free)",
345
+ "contextWindow": 1024000,
346
+ "free": true
347
+ },
348
+ {
349
+ "id": "thinkingmachines/inkling-2-small:free",
350
+ "name": "Thinking Machines: Inkling 2 Small (free)",
351
+ "contextWindow": 1048576,
352
+ "free": true
353
+ },
354
+ {
355
+ "id": "liquid/lfm-3-1.7b:free",
356
+ "name": "LiquidAI: LFM3-1.7B (free)",
357
+ "contextWindow": 262144,
358
+ "free": true
359
+ },
360
+ {
361
+ "id": "recursive/flint-v1.0:free",
362
+ "name": "Recursive: Flint (free)",
363
+ "contextWindow": 262144,
364
+ "free": true
365
+ },
366
+ {
367
+ "id": "nvidia/nemotron-3.5-super-vl:free",
368
+ "name": "NVIDIA: Nemotron 3.5 Super VL (free)",
369
+ "contextWindow": 1000000,
370
+ "free": true
371
+ },
372
+ {
373
+ "id": "dots-studio/dots-3-note-preview:free",
374
+ "name": "Dots Studio: Dots3-Note Preview (free)",
375
+ "contextWindow": 512000,
376
+ "free": true
377
+ },
378
+ {
379
+ "id": "liquid/lfm-2.5-2.6b:free",
380
+ "name": "LiquidAI: LFM2.5-2.6B (free)",
381
+ "contextWindow": 65536,
382
+ "free": true
383
+ },
384
+ {
385
+ "id": "nvidia/nemotron-3.5-lightning:free",
386
+ "name": "NVIDIA: Nemotron 3.5 Lightning (free)",
387
+ "contextWindow": 1000000,
388
+ "free": true
389
+ },
390
+ {
391
+ "id": "cohere/north-mini-code:free",
392
+ "name": "Cohere: North Mini Code (free)",
393
+ "contextWindow": 256000,
394
+ "free": true
395
+ },
396
+ {
397
+ "id": "nvidia/nemotron-3-ultra-550b-a55b:free",
398
+ "name": "NVIDIA: Nemotron 3 Ultra (free)",
399
+ "contextWindow": 1000000,
400
+ "free": true
401
+ },
402
+ {
403
+ "id": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free",
404
+ "name": "NVIDIA: Nemotron 3 Nano Omni (free)",
405
+ "contextWindow": 256000,
406
+ "free": true
407
+ },
408
+ {
409
+ "id": "google/gemma-4-26b-a4b-it:free",
410
+ "name": "Google: Gemma 4 26B A4B (free)",
411
+ "contextWindow": 262144,
412
+ "free": true
413
+ },
414
+ {
415
+ "id": "google/gemma-4-31b-it:free",
416
+ "name": "Google: Gemma 4 31B (free)",
417
+ "contextWindow": 262144,
418
+ "free": true
419
+ },
420
+ {
421
+ "id": "google/lyria-3-pro-preview",
422
+ "name": "Google: Lyria 3 Pro Preview",
423
+ "contextWindow": 1048576,
424
+ "free": true
425
+ },
426
+ {
427
+ "id": "google/lyria-3-clip-preview",
428
+ "name": "Google: Lyria 3 Clip Preview",
429
+ "contextWindow": 1048576,
430
+ "free": true
431
+ },
432
+ {
433
+ "id": "openrouter/free",
434
+ "name": "Free Models Router",
435
+ "contextWindow": 200000,
436
+ "free": true
437
+ }
438
+ ],
439
+ "extraHeaders": {},
440
+ "free": false
441
+ },
442
+ {
443
+ "id": "longcat",
444
+ "name": "LongCat",
445
+ "baseUrl": "https://api.longcat.chat/openai/v1",
446
+ "models": [
447
+ {
448
+ "id": "LongCat-2.5-Preview",
449
+ "name": "LongCat-2.5-Preview",
450
+ "contextWindow": 1048576
451
+ },
452
+ {
453
+ "id": "LongCat-2.5",
454
+ "name": "LongCat-2.5",
455
+ "contextWindow": 1048576
456
+ },
457
+ {
458
+ "id": "LongCat-2.0",
459
+ "name": "LongCat-2.0",
460
+ "contextWindow": 1048576
461
+ }
462
+ ],
463
+ "extraHeaders": {},
464
+ "free": false
465
+ },
466
+ {
467
+ "id": "modelscope",
468
+ "name": "ModelScope",
469
+ "baseUrl": "https://api-inference.modelscope.cn/v1",
470
+ "models": [
471
+ {
472
+ "id": "deepseek-ai/DeepSeek-V4-Flash-0731",
473
+ "name": "deepseek-ai/DeepSeek-V4-Flash-0731",
474
+ "contextWindow": null
475
+ },
476
+ {
477
+ "id": "deepseek-ai/DeepSeek-V4-Pro",
478
+ "name": "deepseek-ai/DeepSeek-V4-Pro",
479
+ "contextWindow": null
480
+ },
481
+ {
482
+ "id": "deepseek-ai/DeepSeek-V4-Pro-0813",
483
+ "name": "deepseek-ai/DeepSeek-V4-Pro-0813",
484
+ "contextWindow": null
485
+ },
486
+ {
487
+ "id": "deepseek-ai/DeepSeek-V4.1-Flash",
488
+ "name": "deepseek-ai/DeepSeek-V4.1-Flash",
489
+ "contextWindow": null
490
+ },
491
+ {
492
+ "id": "deepseek-ai/DeepSeek-V4.1-Flash-1017",
493
+ "name": "deepseek-ai/DeepSeek-V4.1-Flash-1017",
494
+ "contextWindow": null
495
+ },
496
+ {
497
+ "id": "MiniMax/MiniMax-M1-80k",
498
+ "name": "MiniMax/MiniMax-M1-80k",
499
+ "contextWindow": null
500
+ },
501
+ {
502
+ "id": "MiniMax/MiniMax-M3",
503
+ "name": "MiniMax/MiniMax-M3",
504
+ "contextWindow": null
505
+ },
506
+ {
507
+ "id": "moonshotai/Kimi-K3.1-Pro",
508
+ "name": "moonshotai/Kimi-K3.1-Pro",
509
+ "contextWindow": null
510
+ },
511
+ {
512
+ "id": "OpenGVLab/InternVL3_5-241B-A28B",
513
+ "name": "OpenGVLab/InternVL3_5-241B-A28B",
514
+ "contextWindow": null
515
+ },
516
+ {
517
+ "id": "Qwen/Qwen3.5-122B-A10B",
518
+ "name": "Qwen/Qwen3.5-122B-A10B",
519
+ "contextWindow": null
520
+ },
521
+ {
522
+ "id": "Qwen/Qwen3.5-35B-A3B",
523
+ "name": "Qwen/Qwen3.5-35B-A3B",
524
+ "contextWindow": null
525
+ },
526
+ {
527
+ "id": "Qwen/Qwen3.5-397B-A17B",
528
+ "name": "Qwen/Qwen3.5-397B-A17B",
529
+ "contextWindow": null
530
+ },
531
+ {
532
+ "id": "Qwen/Qwen3.8-Flash-Next",
533
+ "name": "Qwen/Qwen3.8-Flash-Next",
534
+ "contextWindow": null
535
+ },
536
+ {
537
+ "id": "stepfun-ai/Step-3.5-Flash",
538
+ "name": "stepfun-ai/Step-3.5-Flash",
539
+ "contextWindow": null
540
+ },
541
+ {
542
+ "id": "stepfun-ai/Step-3.7-Flash",
543
+ "name": "stepfun-ai/Step-3.7-Flash",
544
+ "contextWindow": null
545
+ },
546
+ {
547
+ "id": "stepfun-ai/Step-5-Preview",
548
+ "name": "stepfun-ai/Step-5-Preview",
549
+ "contextWindow": null
550
+ },
551
+ {
552
+ "id": "ZhipuAI/GLM-4.7-Flash",
553
+ "name": "ZhipuAI/GLM-4.7-Flash",
554
+ "contextWindow": null
555
+ },
556
+ {
557
+ "id": "ZhipuAI/GLM-5.2",
558
+ "name": "ZhipuAI/GLM-5.2",
559
+ "contextWindow": null
560
+ }
561
+ ],
562
+ "extraHeaders": {},
563
+ "free": false
564
+ },
565
+ {
566
+ "id": "agnes-com",
567
+ "name": "Agnes-COM",
568
+ "baseUrl": "https://apihub.agnes-ai.com/v1",
569
+ "models": [
570
+ {
571
+ "id": "agnes-2.5-flash",
572
+ "name": "agnes-2.5-flash",
573
+ "contextWindow": null
574
+ },
575
+ {
576
+ "id": "agnes-2.5-pro",
577
+ "name": "agnes-2.5-pro",
578
+ "contextWindow": null
579
+ },
580
+ {
581
+ "id": "agnes-2.5-pro-alpha",
582
+ "name": "agnes-2.5-pro-alpha",
583
+ "contextWindow": null
584
+ },
585
+ {
586
+ "id": "agnes-2.5-pro-beta",
587
+ "name": "agnes-2.5-pro-beta",
588
+ "contextWindow": null
589
+ },
590
+ {
591
+ "id": "agnes-3.0-flash",
592
+ "name": "agnes-3.0-flash",
593
+ "contextWindow": null
594
+ },
595
+ {
596
+ "id": "agnes-image-2.0-flash",
597
+ "name": "agnes-image-2.0-flash",
598
+ "contextWindow": null
599
+ },
600
+ {
601
+ "id": "agnes-image-2.1-flash",
602
+ "name": "agnes-image-2.1-flash",
603
+ "contextWindow": null
604
+ },
605
+ {
606
+ "id": "agnes-image-2.5-flash",
607
+ "name": "agnes-image-2.5-flash",
608
+ "contextWindow": null
609
+ },
610
+ {
611
+ "id": "agnes-video-2.5",
612
+ "name": "agnes-video-2.5",
613
+ "contextWindow": null
614
+ },
615
+ {
616
+ "id": "agnes-video-2.5-flash",
617
+ "name": "agnes-video-2.5-flash",
618
+ "contextWindow": null
619
+ }
620
+ ],
621
+ "extraHeaders": {},
622
+ "free": false
623
+ }
624
+ ]
625
+
626
+ export const BUILTIN_IDS = new Set(BUILTIN_PROVIDERS.map(p => p.id))