# What changed in flags

> 18 changes in flags 4 from its official release notes, upgrade guides and advisories: 2 breaking, 1 deprecations, 2 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/flags/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## flags 4

### Breaking changes

- The Edge Config adapter package is renamed to @flags-sdk/global-config. (4.3.0) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.3.0)
- Declaring a feature flag without a decide function, or with an adapter missing one, now throws an error at declaration time. (4.0.3) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.0.3)

### Deprecations

- Previous Edge Config names remain available as deprecated aliases. (4.3.0) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.3.0)

### New APIs and options

- Adds an adapter hook for observing values set by the Flags SDK override cookie. It is not supported for general use unless Vercel has explicitly enabled it. (4.3.1) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.3.1)
- Adapters can opt into bulk evaluation by implementing bulkDecide and setting a stable adapterId; flags with matching adapterId and identify source are evaluated together. (4.1.0) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.1.0)

### Performance

- evaluate() and precompute() defer bulk evaluation to capable adapters, falling back to per-flag evaluation otherwise; shared request reads are reused. (4.1.0) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.1.0)
- Reduces microtask queue overhead by replacing the async IIFE around decide() with a direct call and Promise.resolve(). (4.0.6) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.0.6)
- Caches the resolved next/headers module locally so only the first call awaits the dynamic import, reducing overhead in flag evaluation. (4.0.6) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.0.6)

### Behavior and default changes

- Global Config environment variables replace the Edge Config names; previous environment variables remain honored as fallbacks. (4.3.0) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.3.0)
- The flags discovery endpoint returns cache-control: no-store. (4.2.4) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.2.4)
- Accepts a NextRequest or Web Request directly outside App Router, including in routing middleware, instead of requiring a Pages Router IncomingMessage or manually flattened headers. (4.2.1) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.2.1)
- Accepts a NextRequest or Web Request directly outside App Router, including in routing middleware, instead of requiring a Pages Router IncomingMessage or manually flattened headers. (4.2.1) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.2.1)
- Tracing emits an evaluate span with flagCount and one batch span per bulk-evaluated adapter group instead of individual per-flag run spans. (4.1.0) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.1.0)

### Fixes and other changes

- Removed @sveltejs/kit from peer dependencies to prevent npm from auto-installing it and causing Vite peer dependency conflicts in non-SvelteKit projects. (4.2.3) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.2.3)
- Next.js control-flow errors are re-thrown without marking flag evaluation spans as errored; genuine evaluation failures still mark spans as errored. (4.2.2) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.2.2)
- Recognizes hanging promise rejection as an internal Next.js error. (4.1.1) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.1.1)
- Guards internal flag hooks when Vercel does not expose the expected runtime helpers during evaluation. (4.0.5) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.0.5)
- When an app goes from precomputing flags to precomputing none, the SDK serializes __no_flags__ so the app still rewrites and prerenders the page. (4.0.4) — [release notes](https://github.com/vercel/flags/releases/tag/flags%404.0.4)
