@ai-sdk/anthropic 3.0.139 → 3.0.140

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
@@ -12,7 +12,7 @@ import {
12
12
  } from "@ai-sdk/provider-utils";
13
13
 
14
14
  // src/version.ts
15
- var VERSION = true ? "3.0.139" : "0.0.0-test";
15
+ var VERSION = true ? "3.0.140" : "0.0.0-test";
16
16
 
17
17
  // src/anthropic-messages-language-model.ts
18
18
  import {
@@ -4180,7 +4180,7 @@ var AnthropicMessagesLanguageModel = class {
4180
4180
  providerOptions,
4181
4181
  stream
4182
4182
  }) {
4183
- var _a, _b, _c, _d, _e, _f, _g, _h;
4183
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
4184
4184
  const warnings = [];
4185
4185
  if (frequencyPenalty != null) {
4186
4186
  warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
@@ -4726,6 +4726,12 @@ var AnthropicMessagesLanguageModel = class {
4726
4726
  }
4727
4727
  );
4728
4728
  if ((toolChoice == null ? void 0 : toolChoice.type) === "tool" && ((anthropicToolChoice == null ? void 0 : anthropicToolChoice.type) === "auto" || jsonResponseTool != null) || (toolChoice == null ? void 0 : toolChoice.type) === "none" && jsonResponseTool != null) {
4729
+ for (const server of (_h = baseArgs.mcp_servers) != null ? _h : []) {
4730
+ server.tool_configuration = {
4731
+ allowed_tools: (_i = server.tool_configuration) == null ? void 0 : _i.allowed_tools,
4732
+ enabled: false
4733
+ };
4734
+ }
4729
4735
  const emittedInlineDefinitions = new Set(
4730
4736
  messagesPrompt.messages.flatMap(
4731
4737
  (message) => message.role === "system" ? message.content.flatMap(
@@ -4764,7 +4770,7 @@ var AnthropicMessagesLanguageModel = class {
4764
4770
  ...betas,
4765
4771
  ...toolsBetas,
4766
4772
  ...userSuppliedBetas,
4767
- ...(_h = anthropicOptions == null ? void 0 : anthropicOptions.anthropicBeta) != null ? _h : []
4773
+ ...(_j = anthropicOptions == null ? void 0 : anthropicOptions.anthropicBeta) != null ? _j : []
4768
4774
  ]),
4769
4775
  usesJsonResponseTool: jsonResponseTool != null,
4770
4776
  toolNameMapping,