This commit is contained in:
lloydzhou 2024-07-04 15:48:48 +08:00
parent b9ffd50992
commit 7a5596b909
1 changed files with 3 additions and 1 deletions

View File

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