diff --git a/app/api/auth.ts b/app/api/auth.ts index 3df8d9e2f..7ddcda587 100644 --- a/app/api/auth.ts +++ b/app/api/auth.ts @@ -56,7 +56,7 @@ export function auth(req: NextRequest) { */ // if user does not provide an api key, inject system api key - if (!apiKey) { + if (!apiKey || !!serverConfig.hideUserApiKey) { const serverApiKey = serverConfig.isAzure ? serverConfig.azureApiKey : serverConfig.apiKey;