Selaa lähdekoodia

feat: configs about app client

butterfly 1 vuosi sitten
vanhempi
commit
ef7617d545
2 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 1 1
      app/client/platforms/anthropic.ts
  2. 4 0
      next.config.mjs

+ 1 - 1
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;
     }
 

+ 4 - 0
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*",