We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d6f928 commit 965f106Copy full SHA for 965f106
src/api/providers/openai.ts
@@ -17,8 +17,7 @@ export class OpenAiHandler implements ApiHandler, SingleCompletionHandler {
17
constructor(options: ApiHandlerOptions) {
18
this.options = options
19
// Azure API shape slightly differs from the core API shape: https://github.com/openai/openai-node?tab=readme-ov-file#microsoft-azure-openai
20
- const urlHost = new URL(this.options.openAiBaseUrl ?? "").host
21
- if (urlHost === "azure.com" || urlHost.endsWith(".azure.com")) {
+ if (this.options.openAiBaseUrl?.toLowerCase().includes("azure.com")) {
22
this.client = new AzureOpenAI({
23
baseURL: this.options.openAiBaseUrl,
24
apiKey: this.options.openAiApiKey,
0 commit comments