Skip to content

feat(Flags): Return the reason field for both /flags and /identities - #205

Merged
khvn26 merged 1 commit into
mainfrom
feat/flags-reason
Nov 4, 2026
Merged

khvn26 merged 1 commit into
mainfrom
feat/flags-reason

Conversation

@emyller

@emyller emyller commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

SDKs and users can't tell why the proxy served a flag — a segment override, an identity override, a split, or the environment default — because /flags and /identities drop the evaluation reason the engine already computes.

Changes

  • Every flag served by /flags and /identities includes its reason, e.g. STATIC, DEFAULT, TARGETING_MATCH; segment=<name>, or SPLIT; weight=<weight>.

Note: Flagsmith's API documents reason on these responses but doesn't serialize it yet, so the proxy returns it ahead of the API.

Closes #204

Review effort: 1/5

🤖 Generated with Claude Code

…ties`

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@emyller
emyller requested a review from a team as a code owner November 4, 2026 17:05
@emyller
emyller requested review from khvn26 and removed request for a team November 4, 2026 17:05
@khvn26
khvn26 merged commit 40a9ea9 into main Nov 4, 2026
3 checks passed
@khvn26
khvn26 deleted the feat/flags-reason branch November 4, 2026 17:07
emyller pushed a commit that referenced this pull request Nov 4, 2026
🤖 I have created a release *beep* *boop*
---


## [2.24.0](v2.23.0...v2.24.0) (2026-11-04)


### Features

* **Flag Dependency:** Support `$.flags` context values in segment conditions ([#202](#202)) ([04794ae](04794ae))
* **Flags:** Return the `reason` field for both `/flags` and `/identities` ([#205](#205)) ([40a9ea9](40a9ea9))
* Send Flagsmith-identifying User-Agent to the Flagsmith API ([#203](#203)) ([3182eac](3182eac))


### Dependency Updates

* Bump flagsmith-flag-engine to 11.0.0 ([#198](#198)) ([2612bfd](2612bfd))


### Other

* **CI:** pre-commit autoupdate ([#191](#191)) ([137f311](137f311))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return the reason field for both /flags and /identities

2 participants