From 37ff8924d1fa0d313f46f829705a59928afcb6c3 Mon Sep 17 00:00:00 2001 From: Richard C Lim <61879224+richardclim@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:33:24 -0500 Subject: [PATCH] Update common.ts --- app/api/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/common.ts b/app/api/common.ts index 77c213219..a5ab2a3de 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -52,7 +52,7 @@ export async function requestOpenai(req: NextRequest) { if (isAzure) { const isAIFoundation = serverConfig.azureUrl?.includes(".models.ai.azure.com"); - if (isAIFoundation) { + if (isAIFoundation && serverConfig.azureUrl) { // For AI Foundation, use the path directly without api-version baseUrl = serverConfig.azureUrl; path = "chat/completions";