feat(schema): wire OpenAI ReasoningExtension into Reasoning block#1063
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1063 +/- ##
==========================================
- Coverage 83.14% 83.09% -0.05%
==========================================
Files 162 162
Lines 23060 23104 +44
==========================================
+ Hits 19173 19199 +26
- Misses 2632 2641 +9
- Partials 1255 1264 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8debd91 to
8267766
Compare
9c836b5 to
ae3acb8
Compare
shentongmartin
approved these changes
Jun 10, 2026
shentongmartin
left a comment
Contributor
There was a problem hiding this comment.
LGTM. The previous concern around ReasoningContent.Index has been clarified as internal streaming merge behavior, and the runtime blocker has been addressed.
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
Adds an OpenAI-specific reasoning extension to the schema and carries it through reasoning concatenation, so OpenAI reasoning content (and its per-content index) survives stream aggregation alongside the existing
TextandSignaturefields.API Changes
openai.ReasoningExtensionandopenai.ReasoningContenttypes.ReasoningContentholds the reasoning text and an optionalIndex *intmarking its position in the final response.openai.ConcatReasoningExtensions, which merges streamed chunks by index — same-index chunks are concatenated, results are ordered by index, and a missing index returns an error.Reasoning.OpenAIExtension *openai.ReasoningExtensionfield on the schemaReasoningblock.Key Changes
concatReasoningnow collects each chunk'sOpenAIExtensionand folds them viaConcatReasoningExtensions, propagating any concat error. It also skips nil reasoning entries during aggregation.