@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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 2.1.0-beta.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 9a51b92: support OPENAI_BASE_URL env
8
+
3
9
  ## 2.1.0-beta.8
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -4074,12 +4074,17 @@ var openaiTranscriptionResponseSchema = import_v419.z.object({
4074
4074
  });
4075
4075
 
4076
4076
  // src/version.ts
4077
- var VERSION = true ? "2.1.0-beta.8" : "0.0.0-test";
4077
+ var VERSION = true ? "2.1.0-beta.9" : "0.0.0-test";
4078
4078
 
4079
4079
  // src/openai-provider.ts
4080
4080
  function createOpenAI(options = {}) {
4081
4081
  var _a, _b;
4082
- const baseURL = (_a = (0, import_provider_utils17.withoutTrailingSlash)(options.baseURL)) != null ? _a : "https://api.openai.com/v1";
4082
+ const baseURL = (_a = (0, import_provider_utils17.withoutTrailingSlash)(
4083
+ (0, import_provider_utils17.loadOptionalSetting)({
4084
+ settingValue: options.baseURL,
4085
+ environmentVariableName: "OPENAI_BASE_URL"
4086
+ })
4087
+ )) != null ? _a : "https://api.openai.com/v1";
4083
4088
  const providerName = (_b = options.name) != null ? _b : "openai";
4084
4089
  const getHeaders = () => (0, import_provider_utils17.withUserAgentSuffix)(
4085
4090
  {