# Flags SDK 4.1.0 - Product: Flags SDK (https://whatsnew.fyi/product/flags-sdk) - Vendor: Vercel - Date: 2026-06-05 - Version: 4.1.0 - Original notes: https://github.com/vercel/flags/releases/tag/flags%404.1.0 - Permalink: https://whatsnew.fyi/product/flags-sdk/releases/4.1.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — Support bulk evaluation of multiple flags at once through a new `bulkDecide` method in adapters, improving performance by up to 20x when evaluating 100 flags - **changed** — The `evaluate()` and `precompute()` functions now defer bulk evaluation to adapters that support it, falling back to individual flag evaluation otherwise - **changed** — Tracing now emits an `evaluate` span with a `flagCount` attribute, and uses `batch` spans for bulk-evaluated flag groups instead of individual per-flag `run` spans ###### Minor Changes - [#385](https://github.com/vercel/flags/pull/385) [`201f9d5`](https://github.com/vercel/flags/commit/201f9d5988d7fc307511e35638e66769d38cedb3) Thanks [@dferber90](https://github.com/dferber90)! - When applications call `evaluate()` or `precompute()` function from `flags/next` it now defers bulk evaluation to the underlying adapters in case those support it, or otherwise falls back to evaluating each flag individually. This speeds up evaluation for applications that need to evaluate multiple flags at once, as the runtime needs to handle fewer promises and more work is reused. In testing we have seen a 20x improvement when called with 100 flags. ```tsx import { evaluate } from "flags/next"; import { flagA, flagB } from "../flags"; // pass a list of flags const [valueA, valueB] = await evaluate([flagA, flagB]); // pass an object const { a, b } = await evaluate({ a: flagA, b: flagB }); ``` Adapters can opt into bulk evaluation by implementing a `bulkDecide` method and setting a stable `adapterId`. When both are present, flag evaluation groups flags that share the same `adapterId` and `identify` source and invokes `bulkDecide` once per group instead of calling `decide` per flag. Flags without a bulk-capable adapter still resolve through the normal per-flag path inside `evaluate()` and still benefit from now reusing the shared per-request headers, cookies, and overrides reads. Tracing reflects this grouping. `evaluate()` (and therefore `precompute()`) now emits an `evaluate` span carrying a `flagCount` attribute. Within it, bulk-evaluated flags no longer emit an individual per-flag `run` span; instead each adapter group emits a single `batch` span (carrying the `adapterId`, the `keys` evaluated in the batch, and `cachedCount`/`overrideCount`/`decidedCount` attributes summarizing how the batch resolved) so per-flag instrumentation overhead is not reintroduced. Flags that fall back to the per-flag path continue to emit their own `flag` span as before.