Azure open ai - gpt-5.4-mini
@ai-sdkai-sdk/react - 2.0.187
@ai-sdk/azure - 2.0.17
ai - 5.0.121
When sending file attachments more than 50 mb throwing failed to download file. File urls can not be larger than 32 mb. I am sending pdf as url below 32 like 30mb files working fine. Could you please help? Any docs to see how many file can be support
Hi,
The important part of the error is:
File URLs can not be larger than 32 MB
So the request is likely being rejected by the file URL / attachment path before the model can process the PDF.
Since ~30 MB files work and larger files fail, I would treat 32 MB as the practical limit for this URL-based attachment flow unless the AI SDK/Azure provider team confirms otherwise.
For larger PDFs, I would avoid sending the entire file inline through useChat. A more reliable pattern is:
-
Upload the PDF separately.
-
Parse or extract the PDF text server-side.
-
Split the text into chunks.
-
Send only the relevant chunks to the model.
-
For larger documents, use a RAG/vector-search flow instead of attaching the whole PDF to each chat request.
It would also be useful if someone from the AI SDK/Vercel team could confirm whether the 32 MB limit comes from useChat, the AI SDK attachment handling, Azure OpenAI, or the file-fetching layer.