From ef7617d545417fe10b3094530a62c59694063d6b Mon Sep 17 00:00:00 2001 From: butterfly Date: Mon, 8 Apr 2024 13:41:02 +0800 Subject: [PATCH] feat: configs about app client --- app/client/platforms/anthropic.ts | 2 +- next.config.mjs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/client/platforms/anthropic.ts b/app/client/platforms/anthropic.ts index 25318d31196..673f32b11a2 100644 --- a/app/client/platforms/anthropic.ts +++ b/app/client/platforms/anthropic.ts @@ -356,7 +356,7 @@ export class ClaudeApi implements LLMApi { const isApp = !!getClientConfig()?.isApp; baseUrl = isApp - ? DEFAULT_API_HOST + "/api/proxy" + ApiPath.Anthropic + ? DEFAULT_API_HOST + "/api/proxy/anthropic" : ApiPath.Anthropic; } diff --git a/next.config.mjs b/next.config.mjs index c8e7adb83db..daaeba46865 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -77,6 +77,10 @@ if (mode !== "export") { source: "/api/proxy/openai/:path*", destination: "https://api.openai.com/:path*", }, + { + source: "/api/proxy/anthropic/:path*", + destination: "https://api.anthropic.com/:path*", + }, { source: "/google-fonts/:path*", destination: "https://fonts.googleapis.com/:path*",