fix: validate extended thinking blocks and tool use/result pairing#40
Merged
bigboateng merged 1 commit intomainfrom Dec 15, 2025
Merged
fix: validate extended thinking blocks and tool use/result pairing#40bigboateng merged 1 commit intomainfrom
bigboateng merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 2a28db5 in 39 seconds. Click for details.
- Reviewed
23lines of code in1files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .changeset/fix-extended-thinking-blocks.md:9
- Draft comment:
Extended Thinking Block Validation fix is clearly described. Consider adding a reference to related tests or documentation for easier context lookup. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. .changeset/fix-extended-thinking-blocks.md:11
- Draft comment:
Tool Use/Result Pairing fix is well-documented. It might help to clarify any backwards compatibility implications if the new per-message pairing changes behavior. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. .changeset/fix-extended-thinking-blocks.md:14
- Draft comment:
Error message quotes are clear. Double-check that these strings match the actual runtime error messages exactly. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. .changeset/fix-extended-thinking-blocks.md:17
- Draft comment:
Testing note is helpful. Consider including a reference or link to the extended thinking test results for future maintainability. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_PJUz2wtI3HjbKZFg
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
Important
Fixes critical message history issues by validating extended thinking blocks and tool use/result pairing to prevent 400 errors.
ensureThinkingBlocksForExtendedThinking()to filter out assistant messages without thinking blocks whenthinkingBudgetis enabled.cleanMessageHistory()to ensure tool_result blocks have corresponding tool_use blocks in the immediately previous message.This description was created by
for 2a28db5. You can customize this summary. It will automatically update as commits are pushed.