diff --git a/src/exports/interface.ts b/src/exports/interface.ts index ababc64557a..6642bd84914 100644 --- a/src/exports/interface.ts +++ b/src/exports/interface.ts @@ -7,6 +7,7 @@ import { Socket } from "node:net" import type { GlobalSettings, + ProviderName, ProviderSettings, ProviderSettingsEntry, ClineMessage, @@ -19,6 +20,7 @@ import type { export type { GlobalSettings, + ProviderName, ProviderSettings, ProviderSettingsEntry, ClineMessage, @@ -37,6 +39,14 @@ import { RooCodeEventName, IpcOrigin, IpcMessageType } from "../schemas" export { RooCodeEventName, IpcOrigin, IpcMessageType } +/** + * Constants + */ + +import { providerNames } from "../schemas" + +export { providerNames } + /** * RooCodeAPI */ diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts index d8ee8edd349..2961f17489f 100644 --- a/src/exports/roo-code.d.ts +++ b/src/exports/roo-code.d.ts @@ -174,6 +174,29 @@ type GlobalSettings = { historyPreviewCollapsed?: boolean | undefined } +type ProviderName = + | "anthropic" + | "glama" + | "openrouter" + | "bedrock" + | "vertex" + | "openai" + | "ollama" + | "vscode-lm" + | "lmstudio" + | "gemini" + | "openai-native" + | "mistral" + | "deepseek" + | "unbound" + | "requesty" + | "human-relay" + | "fake-ai" + | "xai" + | "groq" + | "chutes" + | "litellm" + type ProviderSettings = { apiProvider?: | ( @@ -1474,6 +1497,32 @@ type TaskEvent = ] } +/** + * ProviderName + */ +declare const providerNames: readonly [ + "anthropic", + "glama", + "openrouter", + "bedrock", + "vertex", + "openai", + "ollama", + "vscode-lm", + "lmstudio", + "gemini", + "openai-native", + "mistral", + "deepseek", + "unbound", + "requesty", + "human-relay", + "fake-ai", + "xai", + "groq", + "chutes", + "litellm", +] /** * RooCodeEvent */ @@ -1660,6 +1709,7 @@ export { IpcMessageType, IpcOrigin, type IpcServerEvents, + type ProviderName, type ProviderSettings, type ProviderSettingsEntry, type RooCodeAPI, @@ -1670,4 +1720,5 @@ export { type TaskCommand, type TaskEvent, type TokenUsage, + providerNames, } diff --git a/src/exports/types.ts b/src/exports/types.ts index 87e9af06036..47cc16a7499 100644 --- a/src/exports/types.ts +++ b/src/exports/types.ts @@ -176,6 +176,31 @@ type GlobalSettings = { export type { GlobalSettings } +type ProviderName = + | "anthropic" + | "glama" + | "openrouter" + | "bedrock" + | "vertex" + | "openai" + | "ollama" + | "vscode-lm" + | "lmstudio" + | "gemini" + | "openai-native" + | "mistral" + | "deepseek" + | "unbound" + | "requesty" + | "human-relay" + | "fake-ai" + | "xai" + | "groq" + | "chutes" + | "litellm" + +export type { ProviderName } + type ProviderSettings = { apiProvider?: | ( diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 4ac5c8806bd..209bc67d2c5 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -1212,6 +1212,7 @@ export type TypeDefinition = { export const typeDefinitions: TypeDefinition[] = [ { schema: globalSettingsSchema, identifier: "GlobalSettings" }, + { schema: providerNamesSchema, identifier: "ProviderName" }, { schema: providerSettingsSchema, identifier: "ProviderSettings" }, { schema: providerSettingsEntrySchema, identifier: "ProviderSettingsEntry" }, { schema: clineMessageSchema, identifier: "ClineMessage" },