Skip to content

Can't use file attachments (PDF) #1107

@Erikskogetun

Description

@Erikskogetun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions