@ai-sdk/anthropic 3.0.34 → 3.0.36

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.
@@ -1755,6 +1755,7 @@ async function convertToAnthropicMessagesPrompt({
1755
1755
  switch (output.type) {
1756
1756
  case "content":
1757
1757
  contentValue = output.value.map((contentPart) => {
1758
+ var _a2;
1758
1759
  switch (contentPart.type) {
1759
1760
  case "text":
1760
1761
  return {
@@ -1807,6 +1808,20 @@ async function convertToAnthropicMessagesPrompt({
1807
1808
  });
1808
1809
  return void 0;
1809
1810
  }
1811
+ case "custom": {
1812
+ const anthropicOptions = (_a2 = contentPart.providerOptions) == null ? void 0 : _a2.anthropic;
1813
+ if ((anthropicOptions == null ? void 0 : anthropicOptions.type) === "tool-reference") {
1814
+ return {
1815
+ type: "tool_reference",
1816
+ tool_name: anthropicOptions.toolName
1817
+ };
1818
+ }
1819
+ warnings.push({
1820
+ type: "other",
1821
+ message: `unsupported custom tool content part`
1822
+ });
1823
+ return void 0;
1824
+ }
1810
1825
  default: {
1811
1826
  warnings.push({
1812
1827
  type: "other",