Skip to content

Commit 5275f2e

Browse files
Updated OpenAiHandler to support Azure GCC region (RooCodeInc#3235)
- Added a check for azureApiVersion to determine if the endpoint is an Azure endpoint. - Included conditions to check for 'azure.com' and 'azure.us' in the openAiBaseUrl. - Ensured that the openAiModelId does not include 'deepseek' when determining the Azure endpoint.
1 parent 7cf68ff commit 5275f2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/providers/openai.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export class OpenAiHandler implements ApiHandler {
1818
// Use azureApiVersion to determine if this is an Azure endpoint, since the URL may not always contain 'azure.com'
1919
if (
2020
this.options.azureApiVersion ||
21-
(this.options.openAiBaseUrl?.toLowerCase().includes("azure.com") &&
21+
((this.options.openAiBaseUrl?.toLowerCase().includes("azure.com") ||
22+
this.options.openAiBaseUrl?.toLowerCase().includes("azure.us")) &&
2223
!this.options.openAiModelId?.toLowerCase().includes("deepseek"))
2324
) {
2425
this.client = new AzureOpenAI({

0 commit comments

Comments
 (0)