
Vercel now serves FastAPI frontend directories and static file mounts directly from its CDN. The promotion happens automatically at build time, so requests for those files no longer invoke a Vercel Function.
According to the Vercel changelog, the new handling applies to frontend directories configured with app.frontend() and mounts created with FastAPI’s StaticFiles.
Removing the function invocation reduces cold starts and latency for requests to those paths. The change covers files such as compiled frontend assets, images, stylesheets and other content stored in a promoted directory.
FastAPI CDN Promotion Preserves Route Order
FastAPI evaluates routes in the order they are declared. Vercel keeps that precedence when it promotes static files to the CDN.
For example, an app can declare a function route for /static/manifest.json before mounting a StaticFiles directory at /static. Requests for that manifest will still reach the Vercel Function. Other matching files can be served by the CDN.
This lets an app combine generated responses and static assets under the same path without the CDN version overriding an earlier route.
| FastAPI configuration | Deployment behaviour |
|---|---|
app.frontend() directory | Promoted to the CDN at build time |
StaticFiles mount | Promoted to the CDN at build time |
| Route declared before a static mount | Continues to take priority |
| Promoted source directory | Remains available inside the function bundle by default |
Builders Can Change the Default Handling
Promoted directories stay in the function bundle, allowing the FastAPI app to read those files at runtime. Builders who only want the CDN copy can set tool.vercel.fastapi.static.exclude = true in pyproject.toml. This removes the source directories from the function bundle.
Vercel also provides controls to opt out of CDN promotion. Files covered by middleware or guarded by dependencies can be forced onto the CDN when the builder wants them promoted.
The update follows other CDN work from Vercel, including grouped CDN metadata lookups that cut P99 latency by 91%.
Frequently asked questions
What is Vercel FastAPI CDN promotion?
It is build-time handling that moves directories configured with app.frontend() and FastAPI StaticFiles mounts onto the Vercel CDN. Requests for promoted paths are served without invoking the app’s Vercel Function.
How does FastAPI CDN promotion affect route precedence?
FastAPI’s declaration order is preserved. A route declared before a StaticFiles mount continues to take priority over a CDN file at the same path.
When is FastAPI CDN promotion available on Vercel? Vercel announced the update on 10 September 2026. The changelog does not list separate plan or pricing requirements.
Sources
3 checkedHow we cover tool news: Create With's tool desk drafts these reports with AI from the sources listed above and checks them against those sources before publishing.





