@ai-sdk/anthropic 2.0.42 → 2.0.44

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
@@ -11,7 +11,7 @@ import {
11
11
  } from "@ai-sdk/provider-utils";
12
12
 
13
13
  // src/version.ts
14
- var VERSION = true ? "2.0.42" : "0.0.0-test";
14
+ var VERSION = true ? "2.0.44" : "0.0.0-test";
15
15
 
16
16
  // src/anthropic-messages-language-model.ts
17
17
  import {
@@ -3139,13 +3139,14 @@ var anthropicTools = {
3139
3139
 
3140
3140
  // src/anthropic-provider.ts
3141
3141
  function createAnthropic(options = {}) {
3142
- var _a;
3142
+ var _a, _b;
3143
3143
  const baseURL = (_a = withoutTrailingSlash(
3144
3144
  loadOptionalSetting({
3145
3145
  settingValue: options.baseURL,
3146
3146
  environmentVariableName: "ANTHROPIC_BASE_URL"
3147
3147
  })
3148
3148
  )) != null ? _a : "https://api.anthropic.com/v1";
3149
+ const providerName = (_b = options.name) != null ? _b : "anthropic.messages";
3149
3150
  const getHeaders = () => withUserAgentSuffix(
3150
3151
  {
3151
3152
  "anthropic-version": "2023-06-01",
@@ -3161,7 +3162,7 @@ function createAnthropic(options = {}) {
3161
3162
  const createChatModel = (modelId) => {
3162
3163
  var _a2;
3163
3164
  return new AnthropicMessagesLanguageModel(modelId, {
3164
- provider: "anthropic.messages",
3165
+ provider: providerName,
3165
3166
  baseURL,
3166
3167
  headers: getHeaders,
3167
3168
  fetch: options.fetch,