· JavaScript

Vercel Functions support 20MiB request bodies in Public Beta for Node.js, Python, Bun

For developers working with Vercel Functions, the maximum size for incoming request bodies has been significantly increased to 20MiB, a jump from the previous 4.5MB limit, and this feature is…


For developers working with Vercel Functions, the maximum size for incoming request bodies has been significantly increased to 20MiB, a jump from the previous 4.5MB limit, and this feature is currently available in Public Beta. To activate this expanded capacity, developers must set the environment variable VERCEL_SUPPORT_LARGE_REQUEST_BODY=1. This opt-in setting affects the entire project within the environment where it is configured, allowing teams to validate the higher limit on a preview deployment prior to deploying it to production. A prerequisite for utilizing this larger body size is that the project's functions must be configured to use the performance memory setting of 4GB.

This enhancement extends coverage to functions built with the Node.js, Python, and Bun runtimes, as well as to Routing Middleware. However, it is important to note that functions and Routing Middleware operating on the Edge runtime will retain the original 4.5MB ceiling, responding with a 413 error if bodies exceed this amount. Consequently, migrating to leverage the larger limit necessitates switching to the Node.js runtime, specified via runtime: 'nodejs', or using proxy.ts within a Next.js setup.

A specific constraint exists regarding Routing Middleware when a project opts into this feature: it will receive the request headers and metadata, but it will not receive the request body, and this limitation is enforced at the project level. While the middleware continues to execute and can still access every other request header, any logic that depends on the request body will cease to function. This design choice helps prevent the body from being transmitted twice—once to the middleware and again to the intended target function—which could otherwise inflate both costs and the time taken for the first byte to arrive. When dealing with these substantial request payloads, developers should ensure they read the body immediately and refrain from keeping it resident in memory to avert potential memory issues and backpressure problems. Further details regarding the restrictions of Vercel Functions can be found in the Vercel Functions limitations documentation.

Why it matters

This increase in body size directly impacts developers building APIs that handle large payloads, such as file uploads. Developers should note that this change requires switching to the Node.js runtime for affected functions and middleware.

Earlier coverage

Related coverage

Also worth reading

  1. Next.js 16.5.0-canary.61 adds experimental image optimization support, Turbopack cache recovery
  2. Firefox UI features glowing progress bar in URL bar, user criticizes "AI slop
  3. Grafana 13.3 adds shared dashboard variables, Notebooks in public preview
  4. QCon San Francisco 2026: Netflix engineer presents staff-plus alignment for tech strategy
  5. Researchers show malicious webpage can hijack Meta Muse and access private chats