Since 3.11.0, the root entry of @vercel/functions requires ./affinity, and affinity.js requires @vercel/oidc. A library that needs only waitUntil or getDeadline now also loads the OIDC client on each cold start.
A local test on Node 26 measured about 24 ms for require("@vercel/functions"), against about 1 ms for wait-until.js and deadline.js alone. The package exports ., ./headers, ./oidc, ./middleware and ./db-connections, so a library cannot import the two functions alone.
Can you add one of these changes?
- Subpath exports
./wait-untiland./deadline. - A lazy require of
./affinityinindex.js, so the OIDC client loads only when a caller uses the affinity functions.
A related question: is Symbol.for("@vercel/request-context") a supported contract? If yes, a library can read the request context and need no import.