@ai-sdk/anthropic 2.0.34 → 2.0.35

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/anthropic
2
2
 
3
+ ## 2.0.35
4
+
5
+ ### Patch Changes
6
+
7
+ - 1091a20: support ANTHROPIC_BASE_URL
8
+
3
9
  ## 2.0.34
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var import_provider4 = require("@ai-sdk/provider");
31
31
  var import_provider_utils20 = require("@ai-sdk/provider-utils");
32
32
 
33
33
  // src/version.ts
34
- var VERSION = true ? "2.0.34" : "0.0.0-test";
34
+ var VERSION = true ? "2.0.35" : "0.0.0-test";
35
35
 
36
36
  // src/anthropic-messages-language-model.ts
37
37
  var import_provider3 = require("@ai-sdk/provider");
@@ -3087,7 +3087,12 @@ var anthropicTools = {
3087
3087
  // src/anthropic-provider.ts
3088
3088
  function createAnthropic(options = {}) {
3089
3089
  var _a;
3090
- const baseURL = (_a = (0, import_provider_utils20.withoutTrailingSlash)(options.baseURL)) != null ? _a : "https://api.anthropic.com/v1";
3090
+ const baseURL = (_a = (0, import_provider_utils20.withoutTrailingSlash)(
3091
+ (0, import_provider_utils20.loadOptionalSetting)({
3092
+ settingValue: options.baseURL,
3093
+ environmentVariableName: "ANTHROPIC_BASE_URL"
3094
+ })
3095
+ )) != null ? _a : "https://api.anthropic.com/v1";
3091
3096
  const getHeaders = () => (0, import_provider_utils20.withUserAgentSuffix)(
3092
3097
  {
3093
3098
  "anthropic-version": "2023-06-01",