Vercel Functions Support 20MiB Request Bodies in Public Beta
·2026.11.20 22:00
Key point
The feature is available in Public Beta for Node.js, Python, and Bun runtimes, requiring a 4GB memory setting and an environment variable to enable.
Details
- Vercel Functions now accept inbound request bodies up to 20MiB, up from 4.5MB, in Public Beta
- Opt-in requires setting the VERCEL_SUPPORT_LARGE_REQUEST_BODY=1 environment variable and using the 4GB performance memory setting
- Applies to Node.js, Python, and Bun runtimes, as well as Routing Middleware; Edge runtime functions remain capped at 4.5MB
- Routing Middleware receives headers and metadata but no request body to avoid sending the body twice and increasing cost and time to first byte
- Developers should read the body promptly and avoid holding it in memory to prevent backpressure and memory issues
Runtime and Middleware Constraints
- Edge runtime functions and Routing Middleware keep the 4.5MB cap and return 413 on oversize bodies
- Moving Edge functions to the larger limit requires switching to the Node.js runtime using runtime: 'nodejs' or proxy.ts in Next.js
- Body-dependent middleware behavior becomes unavailable when the project opts in, as middleware still runs but does not receive the request body
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.