Repository navigation
fix(agents): Accept boolean choice answers on evaluation spans - #127986
Merged
ArthurKnaus merged 2 commits intoOct 19, 2026
Merged
ArthurKnaus merged 2 commits into
ArthurKnaus merged 2 commits into
Conversation
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]>
Refs AGT-3124 Co-Authored-By: Arthur Knaus <[email protected]>
vgrozdanic
approved these changes
Oct 19, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenAI decision choices can be booleans. getsentry/sentry-javascript#25285 records the answer's
choiceas a string ("true"), which already renders correctly. That only happens when the SDK reshapes an answer that has aprobabilitiesarray, though. Without one, the raw boolean passes through, fails the choice schema, and shows up as an unrecognized answer.This reads a boolean
choiceas its string form, so it matches the stringifiedprobabilitieskeys and renders the same as the SDK-stringified answer.Fixes AGT-3124
via @ArthurKnaus.
--
View Junior Session [Sentry]