@ai-sdk/anthropic 2.1.0-beta.10 → 2.1.0-beta.12

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
@@ -10,7 +10,7 @@ import {
10
10
  } from "@ai-sdk/provider-utils";
11
11
 
12
12
  // src/version.ts
13
- var VERSION = true ? "2.1.0-beta.10" : "0.0.0-test";
13
+ var VERSION = true ? "2.1.0-beta.12" : "0.0.0-test";
14
14
 
15
15
  // src/anthropic-messages-language-model.ts
16
16
  import {
@@ -450,7 +450,7 @@ async function convertToAnthropicMessagesPrompt({
450
450
  sendReasoning,
451
451
  warnings
452
452
  }) {
453
- var _a, _b, _c, _d, _e;
453
+ var _a, _b, _c, _d, _e, _f;
454
454
  const betas = /* @__PURE__ */ new Set();
455
455
  const blocks = groupIntoBlocks(prompt);
456
456
  let system = void 0;
@@ -626,6 +626,9 @@ async function convertToAnthropicMessagesPrompt({
626
626
  case "error-text":
627
627
  contentValue = output.value;
628
628
  break;
629
+ case "execution-denied":
630
+ contentValue = (_e = output.reason) != null ? _e : "Tool execution denied.";
631
+ break;
629
632
  case "json":
630
633
  case "error-json":
631
634
  default:
@@ -660,7 +663,7 @@ async function convertToAnthropicMessagesPrompt({
660
663
  for (let k = 0; k < content.length; k++) {
661
664
  const part = content[k];
662
665
  const isLastContentPart = k === content.length - 1;
663
- const cacheControl = (_e = getCacheControl(part.providerOptions)) != null ? _e : isLastContentPart ? getCacheControl(message.providerOptions) : void 0;
666
+ const cacheControl = (_f = getCacheControl(part.providerOptions)) != null ? _f : isLastContentPart ? getCacheControl(message.providerOptions) : void 0;
664
667
  switch (part.type) {
665
668
  case "text": {
666
669
  anthropicContent.push({