Skip to content

fix(agents): Accept boolean choice answers on evaluation spans - #127986

Merged
ArthurKnaus merged 2 commits into
masterfrom
arthurknaus/agt-3124-decision-span-check-boolean-choice-value-works
Oct 19, 2026
Merged

ArthurKnaus merged 2 commits into
masterfrom
arthurknaus/agt-3124-decision-span-check-boolean-choice-value-works

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

OpenAI decision choices can be booleans. getsentry/sentry-javascript#25285 records the answer's choice as a string ("true"), which already renders correctly. That only happens when the SDK reshapes an answer that has a probabilities array, though. Without one, the raw boolean passes through, fails the choice schema, and shows up as an unrecognized answer.

This reads a boolean choice as its string form, so it matches the stringified probabilities keys and renders the same as the SDK-stringified answer.

Fixes AGT-3124

via @ArthurKnaus.

--

View Junior Session [Sentry]

OpenAI decision choices can be booleans. The JavaScript SDK records them as strings, but only when it reshapes an answer with a probabilities array, so a raw boolean choice can still reach us and was shown as an unrecognized answer. Read it as its string form so it renders like the SDK-stringified one.

Fixes AGT-3124

Co-Authored-By: Arthur Knaus <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner October 19, 2026 10:43
@linear-code

linear-code Bot commented Oct 19, 2026

Copy link
Copy Markdown

AGT-3124

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 19, 2026
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner October 19, 2026 10:48
@ArthurKnaus
ArthurKnaus merged commit d09669c into master Oct 19, 2026
77 checks passed
@ArthurKnaus
ArthurKnaus deleted the arthurknaus/agt-3124-decision-span-check-boolean-choice-value-works branch October 19, 2026 11:01
RudraPatel2003 pushed a commit that referenced this pull request Oct 19, 2026
OpenAI decision choices can be booleans.
getsentry/sentry-javascript#25285 records the answer's `choice` as a
string (`"true"`), which already renders correctly. That only happens
when the SDK reshapes an answer that has a `probabilities` array,
though. Without one, the raw boolean passes through, fails the choice
schema, and shows up as an unrecognized answer.

This reads a boolean `choice` as its string form, so it matches the
stringified `probabilities` keys and renders the same as the
SDK-stringified answer.

Fixes AGT-3124

This branch was successfully deployed

1 active deployment
Preview — f04a7425 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants