Can't use file attachments (PDF)
What Happened?
I'm trying to use the file-type content to attach a PDF to the message, but it returns this error when running Sonnet 3.7: 'File content parts in user messages' functionality not supported
However, running directly towards Anthropic API, it works.
This would be a really useful feature, as now we have to manually fallback to Anthropic API when including files.
What Should Have Happened?
No response
Relevant Code Snippet
This example does not work with the portkey provider, but it does work with Anthropic https://github.com/vercel-labs/ai-sdk-preview-pdf-support/blob/main/app/api/generate-quiz/route.ts
Your Twitter/LinkedIn
No response
Hey @Erikskogetun, sending files to anthropic should be working, can you try formatting your payload using the example provided here? https://portkey.ai/docs/integrations/llms/anthropic#processing-pdfs-with-claude
if the issue is still persistent, you could add a stack trace and I can take a look
file support is updated, you can send content part type file instead of image_url now
https://portkey.ai/docs/integrations/llms/anthropic#processing-pdfs-with-claude