We’re using @ai-sdkai-sdk/openai-compatible with Vercel AI Gateway “https://ai-gateway.vercel.sh/v1”
Error when sending PDF file part to any LLMs that support PDF: AI_UnsupportedFunctionalityError: ‘File content parts in user messages’ functionality not supported.
For references, with the same code, we have no issues when making requests via OpenRouter.
Our file part is being sent as array buffer. We tried to convert to base 64, it would suppress the error but then the LLM respond that it can’t read the file.
mapped_content.push({
type: “file”,
mimeType: “application/pdf”,
filename: filename,
data: await blob.arrayBuffer()
})
We hope this issue can be resolved because we prefer AI Gateway over OpenRouter. Thanks.