mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 05:51:47 +08:00
feat: CUSTOM_MODELS support mapper
This commit is contained in:
@@ -81,7 +81,7 @@ export async function requestOpenai(req: NextRequest) {
|
||||
const jsonBody = JSON.parse(clonedBody) as { model?: string };
|
||||
|
||||
// not undefined and is false
|
||||
if (modelTable[jsonBody?.model ?? ""] === false) {
|
||||
if (modelTable[jsonBody?.model ?? ""].available === false) {
|
||||
return NextResponse.json(
|
||||
{
|
||||
error: true,
|
||||
|
Reference in New Issue
Block a user