lloydzhou il y a 1 an
Parent
commit
7a5596b909
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      app/api/anthropic/[...path]/route.ts

+ 3 - 1
app/api/anthropic/[...path]/route.ts

@@ -142,7 +142,9 @@ async function request(req: NextRequest) {
       const jsonBody = JSON.parse(clonedBody) as { model?: string };
 
       // not undefined and is false
-      if (isModelAvailableInServer(jsonBody?.model ?? "")) {
+      if (
+        isModelAvailableInServer(serverConfig.customModels, jsonBody?.model)
+      ) {
         return NextResponse.json(
           {
             error: true,