-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing #9263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
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
Contributor
Review completed. No new issues found. This commit refactors the reasoning history building logic into a dedicated helper method, improving code organization without changing functionality. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
daniel-lxs
approved these changes
Nov 14, 2025
mrubens
approved these changes
Nov 14, 2025
mini2s
added a commit
to zgsm-ai/costrict
that referenced
this pull request
Nov 17, 2025
Summary of Changes
Fixes this with OpeanAI Native provider

Details
reasoningitem for the provider.Net effect: reasoning state and assistant messages stay paired through context trimming, while the OpenAI-native provider still receives the exact reasoning payload it expects.
Important
Embed encrypted reasoning in assistant messages for improved context management, with tests ensuring correct behavior.
Task.ts.buildCleanConversationHistory()inTask.tsseparates embedded reasoning into distinct reasoning items.reasoning-preservation.test.tsto verify encrypted reasoning embedding.This description was created by
for 8a0bbfa. You can customize this summary. It will automatically update as commits are pushed.