@ai-sdk/openai 2.1.0-beta.8 → 2.1.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  // src/openai-provider.ts
2
2
  import {
3
3
  loadApiKey,
4
+ loadOptionalSetting,
4
5
  withoutTrailingSlash,
5
6
  withUserAgentSuffix
6
7
  } from "@ai-sdk/provider-utils";
@@ -4109,12 +4110,17 @@ var openaiTranscriptionResponseSchema = z19.object({
4109
4110
  });
4110
4111
 
4111
4112
  // src/version.ts
4112
- var VERSION = true ? "2.1.0-beta.8" : "0.0.0-test";
4113
+ var VERSION = true ? "2.1.0-beta.9" : "0.0.0-test";
4113
4114
 
4114
4115
  // src/openai-provider.ts
4115
4116
  function createOpenAI(options = {}) {
4116
4117
  var _a, _b;
4117
- const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : "https://api.openai.com/v1";
4118
+ const baseURL = (_a = withoutTrailingSlash(
4119
+ loadOptionalSetting({
4120
+ settingValue: options.baseURL,
4121
+ environmentVariableName: "OPENAI_BASE_URL"
4122
+ })
4123
+ )) != null ? _a : "https://api.openai.com/v1";
4118
4124
  const providerName = (_b = options.name) != null ? _b : "openai";
4119
4125
  const getHeaders = () => withUserAgentSuffix(
4120
4126
  {