Update common.ts

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

View File

@ -9,7 +9,7 @@ const serverConfig = getServerSideConfig();
export async function requestOpenai(req: NextRequest) {
const controller = new AbortController();
const isAzure = req.nextUrl.pathname.includes("azure/deployments");
const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(serverConfig.azureUrl && serverConfig.azureUrl.includes(".models.ai.azure.com"));
var authValue,
authHeaderName = "";