Improved Node.js compatibility for Edge Middleware and Edge Functions
Vercel Routing Middleware and Edge Functions now support additional Node.js APIs including AsyncLocalStorage, EventEmitter, Buffer, assert, util.promisify, util.callbackify, and util.types, expanding compatibility with existing npm packages.
This changelog entry is historical. Edge Functions are deprecated for new projects. Use with the Node.js runtime and . Use for request-time routing before a response completes.Note:Vercel FunctionsFluid computeRouting Middleware
Vercel and now support more Node.js modules. You may want to make use of these modules directly, but many of these low-level are pieces of core functionality that other modules depend on. Adding support for these APIs expands the compatibility of existing npm packages.Routing MiddlewareEdge FunctionsAPIs
The following APIs are now supported:
You can take advantage of these additional APIs in Routing Middleware and Edge Functions with your next deployment. For current projects, use with the Node.js runtime by default. Existing Edge Runtime projects can use the .Vercel FunctionsEdge Runtime reference
**AsyncLocalStorage: **Support for maintaining data for an invocation between different asynchronous execution contexts, which allows you to pass state to the context even when the function is hot and module context is preserved.
**EventEmitter: **API to build event-driven systems that serves as a core building block for communication between libraries that control I/O and listeners that process data when events occur.A flexible
**Buffer: **The most common way of handling binary data in Node.js, available globally or importable from .
buffer**assert: **A set of assertion functions to validate invariants and logical rules that are very useful to explicitly test assumptions in your code path that need to run in Edge Functions.
and **util.callbackify: **A helper function to convert a callback-style function signature into one that returns a , and a helper function to convert a function that returns a into one that accepts a callback.util.promisify
PromisePromise**util.types: **A set of functions to validate that objects are of a given type.
Source: original entry ↗
More from Vercel
Follow Vercel to get its new changes in your feed and email digest.
OpenAI Decisions API now available on AI Gateway
OpenAI's Decisions API is now accessible through Vercel's AI Gateway with an OpenAI-compatible endpoint, enabling decision models to answer typed questions and return probabilities, choices, and scores for routing, triage, and guardrails use cases. Support is available across the OpenAI SDK, AI SDK, HTTP API, and CLI with the latest versions.
Timestamp attributes now supported in Vercel Flags
Vercel Flags now supports timestamp attributes for entities, allowing you to create time-based targeting rules. Use this feature to run limited-time campaigns, show content between specific dates, or target users based on registration date.
Glyph Cluster now available in stealth on AI Gateway
Glyph Cluster, a reasoning model for coding and long-context analysis, is now available as a stealth model on Vercel's AI Gateway for Pro and Enterprise plan teams with purchased AI Gateway credits at no cost during the stealth period. The model supports function calling, streams responses, and can be accessed via AI SDK, OpenAI-compatible APIs, and coding agents.