Skip to content

Commit 6e958df

Browse files
authored
Export ProviderName type to Roo-Code-Types (RooCodeInc#3675)
1 parent dc694ef commit 6e958df

File tree

4 files changed

+87
-0
lines changed

4 files changed

+87
-0
lines changed

src/exports/interface.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Socket } from "node:net"
77

88
import type {
99
GlobalSettings,
10+
ProviderName,
1011
ProviderSettings,
1112
ProviderSettingsEntry,
1213
ClineMessage,
@@ -19,6 +20,7 @@ import type {
1920

2021
export type {
2122
GlobalSettings,
23+
ProviderName,
2224
ProviderSettings,
2325
ProviderSettingsEntry,
2426
ClineMessage,
@@ -37,6 +39,14 @@ import { RooCodeEventName, IpcOrigin, IpcMessageType } from "../schemas"
3739

3840
export { RooCodeEventName, IpcOrigin, IpcMessageType }
3941

42+
/**
43+
* Constants
44+
*/
45+
46+
import { providerNames } from "../schemas"
47+
48+
export { providerNames }
49+
4050
/**
4151
* RooCodeAPI
4252
*/

src/exports/roo-code.d.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,29 @@ type GlobalSettings = {
174174
historyPreviewCollapsed?: boolean | undefined
175175
}
176176

177+
type ProviderName =
178+
| "anthropic"
179+
| "glama"
180+
| "openrouter"
181+
| "bedrock"
182+
| "vertex"
183+
| "openai"
184+
| "ollama"
185+
| "vscode-lm"
186+
| "lmstudio"
187+
| "gemini"
188+
| "openai-native"
189+
| "mistral"
190+
| "deepseek"
191+
| "unbound"
192+
| "requesty"
193+
| "human-relay"
194+
| "fake-ai"
195+
| "xai"
196+
| "groq"
197+
| "chutes"
198+
| "litellm"
199+
177200
type ProviderSettings = {
178201
apiProvider?:
179202
| (
@@ -1474,6 +1497,32 @@ type TaskEvent =
14741497
]
14751498
}
14761499

1500+
/**
1501+
* ProviderName
1502+
*/
1503+
declare const providerNames: readonly [
1504+
"anthropic",
1505+
"glama",
1506+
"openrouter",
1507+
"bedrock",
1508+
"vertex",
1509+
"openai",
1510+
"ollama",
1511+
"vscode-lm",
1512+
"lmstudio",
1513+
"gemini",
1514+
"openai-native",
1515+
"mistral",
1516+
"deepseek",
1517+
"unbound",
1518+
"requesty",
1519+
"human-relay",
1520+
"fake-ai",
1521+
"xai",
1522+
"groq",
1523+
"chutes",
1524+
"litellm",
1525+
]
14771526
/**
14781527
* RooCodeEvent
14791528
*/
@@ -1660,6 +1709,7 @@ export {
16601709
IpcMessageType,
16611710
IpcOrigin,
16621711
type IpcServerEvents,
1712+
type ProviderName,
16631713
type ProviderSettings,
16641714
type ProviderSettingsEntry,
16651715
type RooCodeAPI,
@@ -1670,4 +1720,5 @@ export {
16701720
type TaskCommand,
16711721
type TaskEvent,
16721722
type TokenUsage,
1723+
providerNames,
16731724
}

src/exports/types.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,31 @@ type GlobalSettings = {
176176

177177
export type { GlobalSettings }
178178

179+
type ProviderName =
180+
| "anthropic"
181+
| "glama"
182+
| "openrouter"
183+
| "bedrock"
184+
| "vertex"
185+
| "openai"
186+
| "ollama"
187+
| "vscode-lm"
188+
| "lmstudio"
189+
| "gemini"
190+
| "openai-native"
191+
| "mistral"
192+
| "deepseek"
193+
| "unbound"
194+
| "requesty"
195+
| "human-relay"
196+
| "fake-ai"
197+
| "xai"
198+
| "groq"
199+
| "chutes"
200+
| "litellm"
201+
202+
export type { ProviderName }
203+
179204
type ProviderSettings = {
180205
apiProvider?:
181206
| (

src/schemas/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,7 @@ export type TypeDefinition = {
12121212

12131213
export const typeDefinitions: TypeDefinition[] = [
12141214
{ schema: globalSettingsSchema, identifier: "GlobalSettings" },
1215+
{ schema: providerNamesSchema, identifier: "ProviderName" },
12151216
{ schema: providerSettingsSchema, identifier: "ProviderSettings" },
12161217
{ schema: providerSettingsEntrySchema, identifier: "ProviderSettingsEntry" },
12171218
{ schema: clineMessageSchema, identifier: "ClineMessage" },

0 commit comments

Comments
 (0)