From daf14ef181ececd69276014997f979b09390e1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Barreiro?= <52393857+BarreiroT@users.noreply.github.com> Date: Fri, 7 Nov 2025 16:24:27 -0300 Subject: [PATCH] Add LiteLLM to the remote config (#7307) * Add Google Vertex and LiteLLM to the remote config * Add the LiteLLM models and export types --- src/shared/remote-config/schema.ts | 31 +++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/shared/remote-config/schema.ts b/src/shared/remote-config/schema.ts index 5f0cb9de..7f014c17 100644 --- a/src/shared/remote-config/schema.ts +++ b/src/shared/remote-config/schema.ts @@ -87,6 +87,17 @@ export const VertexSettingsSchema = z.object({ vertexRegion: z.string().optional(), }) +export const LiteLLMModelSchema = z.object({ + id: z.string(), + thinkingBudgetTokens: z.number().optional(), + promptCachingEnabled: z.boolean().optional(), +}) + +export const LiteLLMSchema = z.object({ + models: z.array(LiteLLMModelSchema).optional(), + baseUrl: z.string().optional(), +}) + // Provider settings schema // Each provider becomes an optional field const ProviderSettingsSchema = z.object({ @@ -94,6 +105,7 @@ const ProviderSettingsSchema = z.object({ AwsBedrock: AwsBedrockSettingsSchema.optional(), Cline: ClineSettingsSchema.optional(), Vertex: VertexSettingsSchema.optional(), + LiteLLM: LiteLLMSchema.optional(), }) export const AllowedMCPServerSchema = z.object({ @@ -153,12 +165,21 @@ export const RemoteConfigSchema = z.object({ }) // Type inference from schemas +export type RemoteConfig = z.infer export type MCPServer = z.infer -export type OpenAiCompatibleModel = z.infer +export type GlobalInstructionsFile = z.infer + +export type ProviderSettings = z.infer + export type OpenAiCompatible = z.infer +export type OpenAiCompatibleModel = z.infer + +export type AwsBedrockSettings = z.infer export type AwsBedrockModel = z.infer export type AwsBedrockCustomModel = z.infer -export type AwsBedrockSettings = z.infer -export type ProviderSettings = z.infer -export type RemoteConfig = z.infer -export type GlobalInstructionsFile = z.infer + +export type VertexSettings = z.infer +export type VertexModel = z.infer + +export type LiteLLMSettings = z.infer +export type LiteLLMModel = z.infer