fix(attempt): re-run OpenAI transcript sanitizers after contextEngine.assemble()#46234
Closed
Br1an67 wants to merge 1 commit into
Closed
fix(attempt): re-run OpenAI transcript sanitizers after contextEngine.assemble()#46234Br1an67 wants to merge 1 commit into
Br1an67 wants to merge 1 commit into
Conversation
Contributor
Greptile SummaryThis PR re-applies the two OpenAI Responses-specific transcript sanitizers (
Confidence Score: 4/5
Last reviewed commit: 3cf4bb7 |
….assemble() When a contextEngine plugin is active, assemble() runs AFTER sanitizeSessionHistory(). The assembled messages can re-introduce call_id|fc_id pairs that OpenAI Responses rejects. Re-apply downgradeOpenAIReasoningBlocks and downgradeOpenAIFunctionCallReasoningPairs after assemble() when the model API is openai-responses or openai-codex-responses. Closes openclaw#42794 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Closing to manage active PR count. Will reopen when slot is available. |
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
Re-apply
downgradeOpenAIReasoningBlocksanddowngradeOpenAIFunctionCallReasoningPairsaftercontextEngine.assemble()when the model API is openai-responses or openai-codex-responses. This prevents assembled messages from re-introducing call_id|fc_id pairs that OpenAI Responses rejects.Change Type
Scope
src/)Linked Issue/PR
Closes #42794
Security Impact
Repro + Verification
attempt.test.ts(64 tests) all passHuman Verification
Enable a contextEngine plugin, send messages that trigger function calls, verify no transcript sanitizer bypass errors.
Compatibility / Migration
Backward compatible — only adds post-assemble sanitization for openai-responses/codex models.
Risks and Mitigations
Low risk — mirrors existing sanitization logic from sanitizeSessionHistory().