FastAPI frontends and static files served from CDN
FastAPI frontends and static files are now automatically promoted to the Vercel CDN at build time, serving requests directly from the CDN without invoking your Function. Route precedence and runtime access are preserved, with configuration options to exclude directories or override CDN behavior.
FastAPI frontends and static files, served with or , are now promoted to the at build time. Requests for those paths are served directly from the CDN, without invoking your Vercel Function.app.frontend()StaticFilesVercel CDN
FastAPI evaluates routes in declaration order. A route declared before a mount takes priority over any CDN file at that path. This precedence is preserved.StaticFiles
Promoted source directories remain in the function bundle so the app can read from them at runtime. To exclude them and serve only from the CDN, set in .tool.vercel.fastapi.static.exclude = truepyproject.toml
Frontends guarded by are kept on the function as the CDN cannot run dependency checks. Similarly, static files which sit behind are also kept on the function. To override this and always promote to CDN, set . To opt out of the CDN entirely, set it to instead.dependenciesmiddlewaretool.vercel.fastapi.static.cdn = truefalse
For more information see the .Vercel FastAPI documentation
Source: original entry ↗
More from Vercel
Follow Vercel to get its new changes in your feed and email digest.
Muse Wonder now available on AI Gateway
Meta's Muse Wonder model is now accessible through Vercel's AI Gateway, supporting coding tasks, multi-step agent workflows, and computer use with a 1M-token context window. Users can access the model via a single API key without creating a separate Meta account and use it for text, image, PDF processing, tool calling, and structured outputs.
Agents can now buy domains with the Vercel CLI
Vercel CLI now enables agents to discover, check availability, and initiate domain purchases through structured commands, with purchase confirmation remaining under user control via interactive terminal or dashboard approval.
New Pro teams default to 30-day deployment retention
Pro teams now default to a 30-day deployment retention period to balance keeping recent history available while reducing storage costs. You can configure a longer retention period in team settings if needed.