@ai-sdk/anthropic 3.0.0-beta.21 → 3.0.0-beta.22

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.
@@ -1009,6 +1009,18 @@ async function convertToAnthropicMessagesPrompt({
1009
1009
  cache_control: void 0
1010
1010
  };
1011
1011
  }
1012
+ if (contentPart.mediaType === "application/pdf") {
1013
+ betas.add("pdfs-2024-09-25");
1014
+ return {
1015
+ type: "document",
1016
+ source: {
1017
+ type: "base64",
1018
+ media_type: contentPart.mediaType,
1019
+ data: contentPart.data
1020
+ },
1021
+ cache_control: void 0
1022
+ };
1023
+ }
1012
1024
  throw new UnsupportedFunctionalityError2({
1013
1025
  functionality: `media type: ${contentPart.mediaType}`
1014
1026
  });