Update common.ts

This commit is contained in:
Richard C Lim 2025-02-01 19:50:50 -05:00 committed by GitHub
parent 4aa0ff789e
commit 7f13025590
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,11 +52,7 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se
if (isAzure) {
const isAIFoundation = serverConfig.azureUrl?.includes(".models.ai.azure.com");
if (isAIFoundation && serverConfig.azureUrl) {
// For AI Foundation, use the path directly without api-version
baseUrl = serverConfig.azureUrl;
// path = req.nextUrl.pathname.replaceAll("/api/azure/", "");
} else {
if (!isAIFoundation) {
const azureApiVersion =
req?.nextUrl?.searchParams?.get("api-version") ||
serverConfig.azureApiVersion;