forked from RooCodeInc/Roo-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovider-settings.ts
More file actions
661 lines (561 loc) · 19.6 KB
/
provider-settings.ts
File metadata and controls
661 lines (561 loc) · 19.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
import { z } from "zod"
import { modelInfoSchema, reasoningEffortSettingSchema, verbosityLevelsSchema, serviceTierSchema } from "./model.js"
import { codebaseIndexProviderSchema } from "./codebase-index.js"
import {
anthropicModels,
basetenModels,
bedrockModels,
deepSeekModels,
fireworksModels,
geminiModels,
mistralModels,
moonshotModels,
openAiCodexModels,
openAiNativeModels,
qwenCodeModels,
sambaNovaModels,
vertexModels,
vscodeLlmModels,
xaiModels,
internationalZAiModels,
minimaxModels,
} from "./providers/index.js"
/**
* constants
*/
export const DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3
/**
* DynamicProvider
*
* Dynamic provider requires external API calls in order to get the model list.
*/
export const dynamicProviders = [
"openrouter",
"vercel-ai-gateway",
"litellm",
"requesty",
"roo",
"unbound",
"poe",
] as const
export type DynamicProvider = (typeof dynamicProviders)[number]
export const isDynamicProvider = (key: string): key is DynamicProvider =>
dynamicProviders.includes(key as DynamicProvider)
/**
* LocalProvider
*
* Local providers require localhost API calls in order to get the model list.
*/
export const localProviders = ["ollama", "lmstudio"] as const
export type LocalProvider = (typeof localProviders)[number]
export const isLocalProvider = (key: string): key is LocalProvider => localProviders.includes(key as LocalProvider)
/**
* InternalProvider
*
* Internal providers require internal VSCode API calls in order to get the
* model list.
*/
export const internalProviders = ["vscode-lm"] as const
export type InternalProvider = (typeof internalProviders)[number]
export const isInternalProvider = (key: string): key is InternalProvider =>
internalProviders.includes(key as InternalProvider)
/**
* CustomProvider
*
* Custom providers are completely configurable within Roo Code settings.
*/
export const customProviders = ["openai"] as const
export type CustomProvider = (typeof customProviders)[number]
export const isCustomProvider = (key: string): key is CustomProvider => customProviders.includes(key as CustomProvider)
/**
* FauxProvider
*
* Faux providers do not make external inference calls and therefore do not have
* model lists.
*/
export const fauxProviders = ["fake-ai"] as const
export type FauxProvider = (typeof fauxProviders)[number]
export const isFauxProvider = (key: string): key is FauxProvider => fauxProviders.includes(key as FauxProvider)
/**
* ProviderName
*/
export const providerNames = [
...dynamicProviders,
...localProviders,
...internalProviders,
...customProviders,
...fauxProviders,
"anthropic",
"bedrock",
"baseten",
"deepseek",
"fireworks",
"gemini",
"gemini-cli",
"mistral",
"moonshot",
"minimax",
"openai-codex",
"openai-native",
"qwen-code",
"roo",
"sambanova",
"vertex",
"xai",
"zai",
] as const
export const providerNamesSchema = z.enum(providerNames)
export type ProviderName = z.infer<typeof providerNamesSchema>
export const isProviderName = (key: unknown): key is ProviderName =>
typeof key === "string" && providerNames.includes(key as ProviderName)
/**
* RetiredProviderName
*/
export const retiredProviderNames = [
"cerebras",
"chutes",
"deepinfra",
"doubao",
"featherless",
"groq",
"huggingface",
"io-intelligence",
] as const
export const retiredProviderNamesSchema = z.enum(retiredProviderNames)
export type RetiredProviderName = z.infer<typeof retiredProviderNamesSchema>
export const isRetiredProvider = (value: string): value is RetiredProviderName =>
retiredProviderNames.includes(value as RetiredProviderName)
export const providerNamesWithRetiredSchema = z.union([providerNamesSchema, retiredProviderNamesSchema])
export type ProviderNameWithRetired = z.infer<typeof providerNamesWithRetiredSchema>
/**
* ProviderSettingsEntry
*/
export const providerSettingsEntrySchema = z.object({
id: z.string(),
name: z.string(),
apiProvider: providerNamesWithRetiredSchema.optional(),
modelId: z.string().optional(),
})
export type ProviderSettingsEntry = z.infer<typeof providerSettingsEntrySchema>
/**
* ProviderSettings
*/
const baseProviderSettingsSchema = z.object({
includeMaxTokens: z.boolean().optional(),
todoListEnabled: z.boolean().optional(),
modelTemperature: z.number().nullish(),
rateLimitSeconds: z.number().optional(),
consecutiveMistakeLimit: z.number().min(0).optional(),
// Model reasoning.
enableReasoningEffort: z.boolean().optional(),
reasoningEffort: reasoningEffortSettingSchema.optional(),
modelMaxTokens: z.number().optional(),
modelMaxThinkingTokens: z.number().optional(),
// Model verbosity.
verbosity: verbosityLevelsSchema.optional(),
})
// Several of the providers share common model config properties.
const apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
apiModelId: z.string().optional(),
})
const anthropicSchema = apiModelIdProviderModelSchema.extend({
apiKey: z.string().optional(),
anthropicBaseUrl: z.string().optional(),
anthropicUseAuthToken: z.boolean().optional(),
anthropicBeta1MContext: z.boolean().optional(), // Enable 'context-1m-2025-08-07' beta for 1M context window.
})
const openRouterSchema = baseProviderSettingsSchema.extend({
openRouterApiKey: z.string().optional(),
openRouterModelId: z.string().optional(),
openRouterBaseUrl: z.string().optional(),
openRouterSpecificProvider: z.string().optional(),
})
const bedrockSchema = apiModelIdProviderModelSchema.extend({
awsAccessKey: z.string().optional(),
awsSecretKey: z.string().optional(),
awsSessionToken: z.string().optional(),
awsRegion: z.string().optional(),
awsUseCrossRegionInference: z.boolean().optional(),
awsUseGlobalInference: z.boolean().optional(), // Enable Global Inference profile routing when supported
awsUsePromptCache: z.boolean().optional(),
awsProfile: z.string().optional(),
awsUseProfile: z.boolean().optional(),
awsApiKey: z.string().optional(),
awsUseApiKey: z.boolean().optional(),
awsCustomArn: z.string().optional(),
awsModelContextWindow: z.number().optional(),
awsBedrockEndpointEnabled: z.boolean().optional(),
awsBedrockEndpoint: z.string().optional(),
awsBedrock1MContext: z.boolean().optional(), // Enable 'context-1m-2025-08-07' beta for 1M context window.
awsBedrockServiceTier: z.enum(["STANDARD", "FLEX", "PRIORITY"]).optional(), // AWS Bedrock service tier selection
})
const vertexSchema = apiModelIdProviderModelSchema.extend({
vertexKeyFile: z.string().optional(),
vertexJsonCredentials: z.string().optional(),
vertexProjectId: z.string().optional(),
vertexRegion: z.string().optional(),
vertex1MContext: z.boolean().optional(), // Enable 'context-1m-2025-08-07' beta for 1M context window.
})
const openAiSchema = baseProviderSettingsSchema.extend({
openAiBaseUrl: z.string().optional(),
openAiApiKey: z.string().optional(),
openAiR1FormatEnabled: z.boolean().optional(),
openAiModelId: z.string().optional(),
openAiCustomModelInfo: modelInfoSchema.nullish(),
openAiUseAzure: z.boolean().optional(),
azureApiVersion: z.string().optional(),
openAiStreamingEnabled: z.boolean().optional(),
openAiHostHeader: z.string().optional(), // Keep temporarily for backward compatibility during migration.
openAiHeaders: z.record(z.string(), z.string()).optional(),
})
const ollamaSchema = baseProviderSettingsSchema.extend({
ollamaModelId: z.string().optional(),
ollamaBaseUrl: z.string().optional(),
ollamaApiKey: z.string().optional(),
ollamaNumCtx: z.number().int().min(128).optional(),
})
const vsCodeLmSchema = baseProviderSettingsSchema.extend({
vsCodeLmModelSelector: z
.object({
vendor: z.string().optional(),
family: z.string().optional(),
version: z.string().optional(),
id: z.string().optional(),
})
.optional(),
})
const lmStudioSchema = baseProviderSettingsSchema.extend({
lmStudioModelId: z.string().optional(),
lmStudioBaseUrl: z.string().optional(),
lmStudioDraftModelId: z.string().optional(),
lmStudioSpeculativeDecodingEnabled: z.boolean().optional(),
})
const geminiSchema = apiModelIdProviderModelSchema.extend({
geminiApiKey: z.string().optional(),
googleGeminiBaseUrl: z.string().optional(),
})
const geminiCliSchema = apiModelIdProviderModelSchema.extend({
geminiCliOAuthPath: z.string().optional(),
geminiCliProjectId: z.string().optional(),
})
const openAiCodexSchema = apiModelIdProviderModelSchema.extend({
// No additional settings needed - uses OAuth authentication
})
const openAiNativeSchema = apiModelIdProviderModelSchema.extend({
openAiNativeApiKey: z.string().optional(),
openAiNativeBaseUrl: z.string().optional(),
// OpenAI Responses API service tier for openai-native provider only.
// UI should only expose this when the selected model supports flex/priority.
openAiNativeServiceTier: serviceTierSchema.optional(),
})
const mistralSchema = apiModelIdProviderModelSchema.extend({
mistralApiKey: z.string().optional(),
mistralCodestralUrl: z.string().optional(),
})
const deepSeekSchema = apiModelIdProviderModelSchema.extend({
deepSeekBaseUrl: z.string().optional(),
deepSeekApiKey: z.string().optional(),
})
const poeSchema = apiModelIdProviderModelSchema.extend({
poeApiKey: z.string().optional(),
poeBaseUrl: z.string().optional(),
})
const moonshotSchema = apiModelIdProviderModelSchema.extend({
moonshotBaseUrl: z
.union([z.literal("https://api.moonshot.ai/v1"), z.literal("https://api.moonshot.cn/v1")])
.optional(),
moonshotApiKey: z.string().optional(),
})
const minimaxSchema = apiModelIdProviderModelSchema.extend({
minimaxBaseUrl: z
.union([z.literal("https://api.minimax.io/v1"), z.literal("https://api.minimaxi.com/v1")])
.optional(),
minimaxApiKey: z.string().optional(),
})
const requestySchema = baseProviderSettingsSchema.extend({
requestyBaseUrl: z.string().optional(),
requestyApiKey: z.string().optional(),
requestyModelId: z.string().optional(),
})
const unboundSchema = baseProviderSettingsSchema.extend({
unboundApiKey: z.string().optional(),
unboundModelId: z.string().optional(),
})
const fakeAiSchema = baseProviderSettingsSchema.extend({
fakeAi: z.unknown().optional(),
})
const xaiSchema = apiModelIdProviderModelSchema.extend({
xaiApiKey: z.string().optional(),
})
const litellmSchema = baseProviderSettingsSchema.extend({
litellmBaseUrl: z.string().optional(),
litellmApiKey: z.string().optional(),
litellmModelId: z.string().optional(),
litellmUsePromptCache: z.boolean().optional(),
})
const sambaNovaSchema = apiModelIdProviderModelSchema.extend({
sambaNovaApiKey: z.string().optional(),
})
export const zaiApiLineSchema = z.enum(["international_coding", "china_coding", "international_api", "china_api"])
export type ZaiApiLine = z.infer<typeof zaiApiLineSchema>
const zaiSchema = apiModelIdProviderModelSchema.extend({
zaiApiKey: z.string().optional(),
zaiApiLine: zaiApiLineSchema.optional(),
})
const fireworksSchema = apiModelIdProviderModelSchema.extend({
fireworksApiKey: z.string().optional(),
})
const qwenCodeSchema = apiModelIdProviderModelSchema.extend({
qwenCodeOauthPath: z.string().optional(),
})
const rooSchema = apiModelIdProviderModelSchema.extend({
// Can use cloud authentication or provide an API key (cli).
rooApiKey: z.string().optional(),
})
const vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
vercelAiGatewayApiKey: z.string().optional(),
vercelAiGatewayModelId: z.string().optional(),
})
const basetenSchema = apiModelIdProviderModelSchema.extend({
basetenApiKey: z.string().optional(),
})
const defaultSchema = z.object({
apiProvider: z.undefined(),
})
export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProvider", [
anthropicSchema.merge(z.object({ apiProvider: z.literal("anthropic") })),
openRouterSchema.merge(z.object({ apiProvider: z.literal("openrouter") })),
bedrockSchema.merge(z.object({ apiProvider: z.literal("bedrock") })),
vertexSchema.merge(z.object({ apiProvider: z.literal("vertex") })),
openAiSchema.merge(z.object({ apiProvider: z.literal("openai") })),
ollamaSchema.merge(z.object({ apiProvider: z.literal("ollama") })),
vsCodeLmSchema.merge(z.object({ apiProvider: z.literal("vscode-lm") })),
lmStudioSchema.merge(z.object({ apiProvider: z.literal("lmstudio") })),
geminiSchema.merge(z.object({ apiProvider: z.literal("gemini") })),
geminiCliSchema.merge(z.object({ apiProvider: z.literal("gemini-cli") })),
openAiCodexSchema.merge(z.object({ apiProvider: z.literal("openai-codex") })),
openAiNativeSchema.merge(z.object({ apiProvider: z.literal("openai-native") })),
mistralSchema.merge(z.object({ apiProvider: z.literal("mistral") })),
deepSeekSchema.merge(z.object({ apiProvider: z.literal("deepseek") })),
poeSchema.merge(z.object({ apiProvider: z.literal("poe") })),
moonshotSchema.merge(z.object({ apiProvider: z.literal("moonshot") })),
minimaxSchema.merge(z.object({ apiProvider: z.literal("minimax") })),
requestySchema.merge(z.object({ apiProvider: z.literal("requesty") })),
unboundSchema.merge(z.object({ apiProvider: z.literal("unbound") })),
fakeAiSchema.merge(z.object({ apiProvider: z.literal("fake-ai") })),
xaiSchema.merge(z.object({ apiProvider: z.literal("xai") })),
basetenSchema.merge(z.object({ apiProvider: z.literal("baseten") })),
litellmSchema.merge(z.object({ apiProvider: z.literal("litellm") })),
sambaNovaSchema.merge(z.object({ apiProvider: z.literal("sambanova") })),
zaiSchema.merge(z.object({ apiProvider: z.literal("zai") })),
fireworksSchema.merge(z.object({ apiProvider: z.literal("fireworks") })),
qwenCodeSchema.merge(z.object({ apiProvider: z.literal("qwen-code") })),
rooSchema.merge(z.object({ apiProvider: z.literal("roo") })),
vercelAiGatewaySchema.merge(z.object({ apiProvider: z.literal("vercel-ai-gateway") })),
defaultSchema,
])
export const providerSettingsSchema = z.object({
apiProvider: providerNamesWithRetiredSchema.optional(),
...anthropicSchema.shape,
...openRouterSchema.shape,
...bedrockSchema.shape,
...vertexSchema.shape,
...openAiSchema.shape,
...ollamaSchema.shape,
...vsCodeLmSchema.shape,
...lmStudioSchema.shape,
...geminiSchema.shape,
...geminiCliSchema.shape,
...openAiCodexSchema.shape,
...openAiNativeSchema.shape,
...mistralSchema.shape,
...deepSeekSchema.shape,
...poeSchema.shape,
...moonshotSchema.shape,
...minimaxSchema.shape,
...requestySchema.shape,
...unboundSchema.shape,
...fakeAiSchema.shape,
...xaiSchema.shape,
...basetenSchema.shape,
...litellmSchema.shape,
...sambaNovaSchema.shape,
...zaiSchema.shape,
...fireworksSchema.shape,
...qwenCodeSchema.shape,
...rooSchema.shape,
...vercelAiGatewaySchema.shape,
...codebaseIndexProviderSchema.shape,
})
export type ProviderSettings = z.infer<typeof providerSettingsSchema>
export const providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z.string().optional() })
export const discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscriminated.and(
z.object({ id: z.string().optional() }),
)
export type ProviderSettingsWithId = z.infer<typeof providerSettingsWithIdSchema>
export const PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options
/**
* ModelIdKey
*/
export const modelIdKeys = [
"apiModelId",
"openRouterModelId",
"openAiModelId",
"ollamaModelId",
"lmStudioModelId",
"lmStudioDraftModelId",
"requestyModelId",
"unboundModelId",
"litellmModelId",
"vercelAiGatewayModelId",
] as const satisfies readonly (keyof ProviderSettings)[]
export type ModelIdKey = (typeof modelIdKeys)[number]
export const getModelId = (settings: ProviderSettings): string | undefined => {
const modelIdKey = modelIdKeys.find((key) => settings[key])
return modelIdKey ? settings[modelIdKey] : undefined
}
/**
* TypicalProvider
*/
export type TypicalProvider = Exclude<ProviderName, InternalProvider | CustomProvider | FauxProvider>
export const isTypicalProvider = (key: unknown): key is TypicalProvider =>
isProviderName(key) && !isInternalProvider(key) && !isCustomProvider(key) && !isFauxProvider(key)
export const modelIdKeysByProvider: Record<TypicalProvider, ModelIdKey> = {
anthropic: "apiModelId",
openrouter: "openRouterModelId",
bedrock: "apiModelId",
vertex: "apiModelId",
"openai-codex": "apiModelId",
"openai-native": "openAiModelId",
ollama: "ollamaModelId",
lmstudio: "lmStudioModelId",
gemini: "apiModelId",
"gemini-cli": "apiModelId",
mistral: "apiModelId",
moonshot: "apiModelId",
minimax: "apiModelId",
deepseek: "apiModelId",
poe: "apiModelId",
"qwen-code": "apiModelId",
requesty: "requestyModelId",
unbound: "unboundModelId",
xai: "apiModelId",
baseten: "apiModelId",
litellm: "litellmModelId",
sambanova: "apiModelId",
zai: "apiModelId",
fireworks: "apiModelId",
roo: "apiModelId",
"vercel-ai-gateway": "vercelAiGatewayModelId",
}
/**
* ANTHROPIC_STYLE_PROVIDERS
*/
// Providers that use Anthropic-style API protocol.
export const ANTHROPIC_STYLE_PROVIDERS: ProviderName[] = ["anthropic", "bedrock", "minimax"]
export const getApiProtocol = (provider: ProviderName | undefined, modelId?: string): "anthropic" | "openai" => {
if (provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider)) {
return "anthropic"
}
if (provider && provider === "vertex" && modelId && modelId.toLowerCase().includes("claude")) {
return "anthropic"
}
// Vercel AI Gateway uses anthropic protocol for anthropic models.
if (
provider &&
["vercel-ai-gateway", "roo"].includes(provider) &&
modelId &&
modelId.toLowerCase().startsWith("anthropic/")
) {
return "anthropic"
}
return "openai"
}
/**
* MODELS_BY_PROVIDER
*/
export const MODELS_BY_PROVIDER: Record<
Exclude<ProviderName, "fake-ai" | "gemini-cli" | "openai">,
{ id: ProviderName; label: string; models: string[] }
> = {
anthropic: {
id: "anthropic",
label: "Anthropic",
models: Object.keys(anthropicModels),
},
bedrock: {
id: "bedrock",
label: "Amazon Bedrock",
models: Object.keys(bedrockModels),
},
deepseek: {
id: "deepseek",
label: "DeepSeek",
models: Object.keys(deepSeekModels),
},
fireworks: {
id: "fireworks",
label: "Fireworks",
models: Object.keys(fireworksModels),
},
gemini: {
id: "gemini",
label: "Google Gemini",
models: Object.keys(geminiModels),
},
mistral: {
id: "mistral",
label: "Mistral",
models: Object.keys(mistralModels),
},
moonshot: {
id: "moonshot",
label: "Moonshot",
models: Object.keys(moonshotModels),
},
minimax: {
id: "minimax",
label: "MiniMax",
models: Object.keys(minimaxModels),
},
"openai-codex": {
id: "openai-codex",
label: "OpenAI - ChatGPT Plus/Pro",
models: Object.keys(openAiCodexModels),
},
"openai-native": {
id: "openai-native",
label: "OpenAI",
models: Object.keys(openAiNativeModels),
},
"qwen-code": { id: "qwen-code", label: "Qwen Code", models: Object.keys(qwenCodeModels) },
roo: { id: "roo", label: "Roo Code Router", models: [] },
sambanova: {
id: "sambanova",
label: "SambaNova",
models: Object.keys(sambaNovaModels),
},
vertex: {
id: "vertex",
label: "GCP Vertex AI",
models: Object.keys(vertexModels),
},
"vscode-lm": {
id: "vscode-lm",
label: "VS Code LM API",
models: Object.keys(vscodeLlmModels),
},
xai: { id: "xai", label: "xAI (Grok)", models: Object.keys(xaiModels) },
zai: { id: "zai", label: "Z.ai", models: Object.keys(internationalZAiModels) },
baseten: { id: "baseten", label: "Baseten", models: Object.keys(basetenModels) },
// Dynamic providers; models pulled from remote APIs.
poe: { id: "poe", label: "Poe", models: [] },
litellm: { id: "litellm", label: "LiteLLM", models: [] },
openrouter: { id: "openrouter", label: "OpenRouter", models: [] },
requesty: { id: "requesty", label: "Requesty", models: [] },
unbound: { id: "unbound", label: "Unbound", models: [] },
"vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] },
// Local providers; models discovered from localhost endpoints.
lmstudio: { id: "lmstudio", label: "LM Studio", models: [] },
ollama: { id: "ollama", label: "Ollama", models: [] },
}