# Node.js Vercel Functions now support per-path request cancellation

By Steven Van · 2025-09-26

Adding one flag to vercel.json lets Node.js functions stop work when a request is cancelled, including mid-stream AI SDK calls.

Vercel Functions written in Node.js can now stop execution when a request is cancelled, instead of running to completion after a user has already navigated away, closed a tab, or hit stop on an AI chat. Support is enabled per path by adding **"supportsCancellation": true** to a function's entry in vercel.json. Once enabled, cancellation can be detected with Request.signal.aborted or an abort event listener; AI SDK users can forward req.signal as the abortSignal on a streamText call so a stopped chat also halts the model stream. Vercel says this cuts unnecessary compute, token generation, and data sent to a client that will never see it.

Full details are in [Vercel](<https://vercel.com/docs/functions/runtimes/node-js>)'s Node.js runtime documentation, via the [changelog entry](<https://vercel.com/changelog/node-js-vercel-functions-now-support-per-path-request-cancellation>).

![Vercel](<https://www.google.com/s2/favicons?domain=vercel.com&sz=128>)

Vercel

The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.

[View Vercel →](<https://creatorstoolbox.com/tools/vercel>)

[Original source](<https://vercel.com/docs/functions/runtimes/node-js>)

[Read Node.js Vercel Functions now support per-path request cancellation on Creators Toolbox](<https://creatorstoolbox.com/blog/vercel-node-js-vercel-functions-now-support-per-path-request-cancellation>)

---
Canonical source: https://creatorstoolbox.com/blog/vercel-node-js-vercel-functions-now-support-per-path-request-cancellation
