From e7a75074f3bbfae51a5430dfb94080dc6343a2a8 Mon Sep 17 00:00:00 2001 From: Eliezer Steinbock <3090527+elie222@users.noreply.github.com> Date: Mon, 30 Dec 2024 08:55:16 +0200 Subject: [PATCH] Rename backup model env --- apps/web/env.ts | 6 +++--- apps/web/utils/llms/config.ts | 3 ++- apps/web/utils/llms/index.ts | 2 +- turbo.json | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/web/env.ts b/apps/web/env.ts index 8b3acb563..fe48da6b0 100644 --- a/apps/web/env.ts +++ b/apps/web/env.ts @@ -113,7 +113,7 @@ export const env = createEnv({ NEXT_PUBLIC_BEDROCK_SONNET_MODEL: z .string() .default("us.anthropic.claude-3-5-sonnet-20241022-v2:0"), - NEXT_PUBLIC_BEDROCK_HAIKU_MODEL: z + NEXT_PUBLIC_BEDROCK_ANTHROPIC_BACKUP_MODEL: z .string() .default("us.anthropic.claude-3-5-haiku-20241022-v1:0"), NEXT_PUBLIC_OLLAMA_MODEL: z.string().optional(), @@ -185,8 +185,8 @@ export const env = createEnv({ NEXT_PUBLIC_AXIOM_TOKEN: process.env.NEXT_PUBLIC_AXIOM_TOKEN, NEXT_PUBLIC_BEDROCK_SONNET_MODEL: process.env.NEXT_PUBLIC_BEDROCK_SONNET_MODEL, - NEXT_PUBLIC_BEDROCK_HAIKU_MODEL: - process.env.NEXT_PUBLIC_BEDROCK_HAIKU_MODEL, + NEXT_PUBLIC_BEDROCK_ANTHROPIC_BACKUP_MODEL: + process.env.NEXT_PUBLIC_BEDROCK_ANTHROPIC_BACKUP_MODEL, NEXT_PUBLIC_OLLAMA_MODEL: process.env.NEXT_PUBLIC_OLLAMA_MODEL, }, }); diff --git a/apps/web/utils/llms/config.ts b/apps/web/utils/llms/config.ts index a76e0bf67..ddf5ef9cf 100644 --- a/apps/web/utils/llms/config.ts +++ b/apps/web/utils/llms/config.ts @@ -12,7 +12,8 @@ export const Model = { GPT_4O: "gpt-4o", GPT_4O_MINI: "gpt-4o-mini", CLAUDE_3_5_SONNET_BEDROCK: env.NEXT_PUBLIC_BEDROCK_SONNET_MODEL, - CLAUDE_3_5_HAIKU_BEDROCK: env.NEXT_PUBLIC_BEDROCK_HAIKU_MODEL, + // BEDROCK_ANTHROPIC_BACKUP_MODEL: + // env.NEXT_PUBLIC_BEDROCK_ANTHROPIC_BACKUP_MODEL, CLAUDE_3_5_SONNET_ANTHROPIC: "claude-3-5-sonnet-20241022", ...(supportsOllama ? { OLLAMA: env.NEXT_PUBLIC_OLLAMA_MODEL } : {}), }; diff --git a/apps/web/utils/llms/index.ts b/apps/web/utils/llms/index.ts index 6a23fc02c..a34ff5c99 100644 --- a/apps/web/utils/llms/index.ts +++ b/apps/web/utils/llms/index.ts @@ -324,7 +324,7 @@ async function withBackupModel( ...args, userAi: { aiProvider: Provider.ANTHROPIC, - aiModel: env.NEXT_PUBLIC_BEDROCK_HAIKU_MODEL, + aiModel: env.NEXT_PUBLIC_BEDROCK_ANTHROPIC_BACKUP_MODEL, aiApiKey: args.userAi.aiApiKey, }, }); diff --git a/turbo.json b/turbo.json index 444ce4999..22d95b074 100644 --- a/turbo.json +++ b/turbo.json @@ -92,6 +92,7 @@ "NEXT_PUBLIC_AXIOM_DATASET", "NEXT_PUBLIC_AXIOM_TOKEN", "NEXT_PUBLIC_BEDROCK_SONNET_MODEL", + "NEXT_PUBLIC_BEDROCK_ANTHROPIC_BACKUP_MODEL", "NEXT_PUBLIC_OLLAMA_MODEL" ], "outputs": [".next/**", "!.next/cache/**"]