@ai-sdk/anthropic 2.0.41 → 2.0.43

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.41" : "0.0.0-test";
14
+ var VERSION = true ? "2.0.43" : "0.0.0-test";
15
15
 
16
16
  // src/anthropic-messages-language-model.ts
17
17
  import {
@@ -2408,7 +2408,8 @@ var AnthropicMessagesLanguageModel = class {
2408
2408
  data: part.content.content.source.data
2409
2409
  }
2410
2410
  }
2411
- }
2411
+ },
2412
+ providerExecuted: true
2412
2413
  });
2413
2414
  } else if (part.content.type === "web_fetch_tool_result_error") {
2414
2415
  controller.enqueue({
@@ -3138,13 +3139,14 @@ var anthropicTools = {
3138
3139
 
3139
3140
  // src/anthropic-provider.ts
3140
3141
  function createAnthropic(options = {}) {
3141
- var _a;
3142
+ var _a, _b;
3142
3143
  const baseURL = (_a = withoutTrailingSlash(
3143
3144
  loadOptionalSetting({
3144
3145
  settingValue: options.baseURL,
3145
3146
  environmentVariableName: "ANTHROPIC_BASE_URL"
3146
3147
  })
3147
3148
  )) != null ? _a : "https://api.anthropic.com/v1";
3149
+ const providerName = (_b = options.name) != null ? _b : "anthropic.messages";
3148
3150
  const getHeaders = () => withUserAgentSuffix(
3149
3151
  {
3150
3152
  "anthropic-version": "2023-06-01",
@@ -3160,7 +3162,7 @@ function createAnthropic(options = {}) {
3160
3162
  const createChatModel = (modelId) => {
3161
3163
  var _a2;
3162
3164
  return new AnthropicMessagesLanguageModel(modelId, {
3163
- provider: "anthropic.messages",
3165
+ provider: providerName,
3164
3166
  baseURL,
3165
3167
  headers: getHeaders,
3166
3168
  fetch: options.fetch,