From 22da0d4bfc1149d0eb62eb9da19a8733597bbb05 Mon Sep 17 00:00:00 2001 From: Richard C Lim <61879224+richardclim@users.noreply.github.com> Date: Sun, 2 Feb 2025 04:03:56 -0500 Subject: [PATCH] Update common.ts --- app/api/common.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/api/common.ts b/app/api/common.ts index f706f98be..989c2d7a5 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -55,10 +55,6 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se req?.nextUrl?.searchParams?.get("api-version") || serverConfig.azureApiVersion; baseUrl = baseUrl.split("/deployments").shift() as string; - path = `${req.nextUrl.pathname.replaceAll( - "/api/azure/", - "", - )}?api-version=${azureApiVersion}`; // Forward compatibility: // if display_name(deployment_name) not set, and '{deploy-id}' in AZURE_URL @@ -89,7 +85,7 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se } } - const fetchUrl = cloudflareAIGatewayUrl(`${baseUrl}`); + const fetchUrl = cloudflareAIGatewayUrl(`${baseUrl}/${path}`); console.log("fetchUrl", fetchUrl); const fetchOptions: RequestInit = { headers: {