fix: capture reasoning text from content parts#5
Open
royalpinto007 wants to merge 1 commit into
Open
Conversation
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.
Summary
Closes #4.
This PR updates transcript parsing so reasoning response items with text inside
contentparts are captured in parsed model steps.Before
Reasoning items that used
contentarrays were parsed without reasoning text.Result:
step.reasoningstayed undefined, even though the payload contained useful reasoning text.After
The parser now reads text from reasoning
contentparts and joins them into the model step reasoning field.Example result:
Why
Reasoning text is useful observability context. Dropping it makes traces less complete and can make Codex runs harder to debug.
Testing
pnpm test -- plugins/tracing/test/transcript.test.tspnpm run typecheckpnpm run buildSummary by cubic
Fixes transcript parsing to capture reasoning text from
contentarrays in reasoning response items. Parsed steps now include complete reasoning, improving trace clarity.contentarrays and collecttextvalues alongsidesummaryand stringcontent, joining with newlines intostep.reasoning.contentparts is captured.Written for commit 907d1e1. Summary will update on new commits.