@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.
@@ -4114,7 +4114,7 @@ var AnthropicMessagesLanguageModel = class {
4114
4114
  providerOptions,
4115
4115
  stream
4116
4116
  }) {
4117
- var _a, _b, _c, _d, _e, _f, _g, _h;
4117
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
4118
4118
  const warnings = [];
4119
4119
  if (frequencyPenalty != null) {
4120
4120
  warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
@@ -4660,6 +4660,12 @@ var AnthropicMessagesLanguageModel = class {
4660
4660
  }
4661
4661
  );
4662
4662
  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) {
4663
+ for (const server of (_h = baseArgs.mcp_servers) != null ? _h : []) {
4664
+ server.tool_configuration = {
4665
+ allowed_tools: (_i = server.tool_configuration) == null ? void 0 : _i.allowed_tools,
4666
+ enabled: false
4667
+ };
4668
+ }
4663
4669
  const emittedInlineDefinitions = new Set(
4664
4670
  messagesPrompt.messages.flatMap(
4665
4671
  (message) => message.role === "system" ? message.content.flatMap(
@@ -4698,7 +4704,7 @@ var AnthropicMessagesLanguageModel = class {
4698
4704
  ...betas,
4699
4705
  ...toolsBetas,
4700
4706
  ...userSuppliedBetas,
4701
- ...(_h = anthropicOptions == null ? void 0 : anthropicOptions.anthropicBeta) != null ? _h : []
4707
+ ...(_j = anthropicOptions == null ? void 0 : anthropicOptions.anthropicBeta) != null ? _j : []
4702
4708
  ]),
4703
4709
  usesJsonResponseTool: jsonResponseTool != null,
4704
4710
  toolNameMapping,