This commit is contained in:
lloydzhou
2024-07-04 16:03:35 +08:00
parent 7a5596b909
commit aa08183439
4 changed files with 31 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ import {
Anthropic,
ApiPath,
DEFAULT_MODELS,
ServiceProvider,
ModelProvider,
} from "@/app/constant";
import { prettyObject } from "@/app/utils/format";
@@ -143,7 +144,11 @@ async function request(req: NextRequest) {
// not undefined and is false
if (
isModelAvailableInServer(serverConfig.customModels, jsonBody?.model)
isModelAvailableInServer(
serverConfig.customModels,
jsonBody?.model,
ServiceProvider.Anthropic,
)
) {
return NextResponse.json(
{