{"version":"2.1.212","anchor":"growthbook-authenticated-feature-flag-fetch-gradual-rollout","canonical_anchor":"growthbook-authenticated-feature-flag-fetch-gradual-rollout","heading":"GrowthBook Authenticated Feature Flag Fetch [Gradual Rollout]","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.212\/e\/growthbook-authenticated-feature-flag-fetch-gradual-rollout","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.212","markdown":"### GrowthBook Authenticated Feature Flag Fetch [Gradual Rollout]\n\nGrowthBook feature flag evaluation can now use an authenticated endpoint (`\/api\/eval-authed\/`) that attaches your auth headers, enabling per-user flag targeting. Falls back to the unauthenticated `\/api\/eval` endpoint on any error.\n\n**Details**\n\n- Controlled by `tengu_gb_eval_authed_enable` (default: false).\n- When enabled, GrowthBook's `fetchRemoteEvalCall` hook is monkey-patched once at startup (idempotent \u2014 a boolean sentinel prevents double-installation). Subsequent feature-flag evaluations POST to `<host>\/api\/eval-authed\/<clientKey>` instead of the standard `<host>\/api\/eval\/<clientKey>`.\n- Auth headers are sourced from the user's current authentication state via `getAuthHeaders()`: an OAuth access token adds `Authorization: Bearer <token>` and the `anthropic-beta` header; an API key adds `x-api-key`; gateway or third-party provider sessions attach no auth headers, leaving the request functionally unauthenticated despite hitting the authed endpoint.\n- On non-2xx response: logs `\"GrowthBook eval-authed returned non-ok; falling back to \/api\/eval\"` and re-runs the call via the original unauthenticated path.\n- On network or exception error: logs `\"GrowthBook eval-authed fetch threw; falling back to \/api\/eval\"` and falls back similarly.\n\n**Evidence**\n\n\"GrowthBook eval-authed fetch threw; falling back to \/api\/eval\" (search for `\"\/api\/eval-authed\/\"`)\n\n- Flag `tengu_gb_eval_authed_enable`: Not enough to say (read for one account on one subscription tier against v2.1.212; this account: no value returned, anonymous baseline: no value returned, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release."}