fix(openai): include summary field in reasoning block encoding#612
Merged
mikehostetler merged 3 commits intoagentjido:mainfrom Apr 14, 2026
Merged
fix(openai): include summary field in reasoning block encoding#612mikehostetler merged 3 commits intoagentjido:mainfrom
mikehostetler merged 3 commits intoagentjido:mainfrom
Conversation
The OpenAI Responses API requires a `summary` field on reasoning items in the input. `encode_single_reasoning_detail` was omitting it, causing 400 errors on multi-turn conversations with reasoning models. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously, reasoning blocks from every assistant message accumulated in the input, bloating the context and slowing requests. Now only the most recent assistant's reasoning details are preserved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… context" This reverts commit 2f97ec4.
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.
Description
Adds the
summaryfield when encoding OpenAI Responses API reasoning blocks for multi-turn context. WhenReasoningDetails.textis present, encodes"summary": [{"type": "summary_text", "text": ...}]; otherwise encodes"summary": []. The OpenAI Responses API requires this field alongside encrypted content/signature in reasoning items sent back in conversation history.Type of Change
Breaking Changes
N/A
Testing
mix test)mix quality)Checklist
CHANGELOG.md(it is auto-generated by git_ops)Related Issues
N/A