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