From 7a5596b9091d056d8bbce9cccf3684c4ee625325 Mon Sep 17 00:00:00 2001 From: lloydzhou Date: Thu, 4 Jul 2024 15:48:48 +0800 Subject: [PATCH] hotfix --- app/api/anthropic/[...path]/route.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/anthropic/[...path]/route.ts b/app/api/anthropic/[...path]/route.ts index 274d7d7c4..f50730fa9 100644 --- a/app/api/anthropic/[...path]/route.ts +++ b/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,