diff --git a/src/index.ts b/src/index.ts index e8013a515..16e4adbb3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -111,8 +111,8 @@ export class OpenAI extends Core.APIClient { const options: ClientOptions = { apiKey, organization, - baseURL: `https://api.openai.com/v1`, ...opts, + baseURL: opts.baseURL ?? `https://api.openai.com/v1`, }; if (!options.dangerouslyAllowBrowser && Core.isRunningInBrowser()) {