Skip to content

Commit ea12767

Browse files
committed
Specify which providers are dynamic
1 parent 6cc923c commit ea12767

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

packages/types/npm/package.metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@roo-code/types",
3-
"version": "1.57.0",
3+
"version": "1.59.0",
44
"description": "TypeScript type definitions for Roo Code.",
55
"publishConfig": {
66
"access": "public",

packages/types/src/provider-settings.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,25 @@ export const MODELS_BY_PROVIDER: Record<
523523
xai: { id: "xai", label: "xAI (Grok)", models: Object.keys(xaiModels) },
524524
zai: { id: "zai", label: "Zai", models: Object.keys(internationalZAiModels) },
525525

526-
// Models pulled from the respective APIs.
526+
// Dynamic providers; models pulled from the respective APIs.
527527
glama: { id: "glama", label: "Glama", models: [] },
528528
huggingface: { id: "huggingface", label: "Hugging Face", models: [] },
529529
litellm: { id: "litellm", label: "LiteLLM", models: [] },
530530
openrouter: { id: "openrouter", label: "OpenRouter", models: [] },
531531
requesty: { id: "requesty", label: "Requesty", models: [] },
532532
unbound: { id: "unbound", label: "Unbound", models: [] },
533533
}
534+
535+
export const dynamicProviders = [
536+
"glama",
537+
"huggingface",
538+
"litellm",
539+
"openrouter",
540+
"requesty",
541+
"unbound",
542+
] as const satisfies readonly ProviderName[]
543+
544+
export type DynamicProvider = (typeof dynamicProviders)[number]
545+
546+
export const isDynamicProvider = (key: string): key is DynamicProvider =>
547+
dynamicProviders.includes(key as DynamicProvider)

0 commit comments

Comments
 (0)