Repository navigation
fix(translation): preserve OpenAI Chat tool error flags - #920
ayushag-nv wants to merge 1 commit into
Conversation
Signed-off-by: ayushag <ayushag@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review. WalkthroughOpenAI Chat tool-result decoding now preserves ChangesTool-result error flag decoding
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Merge Risk: ⚪ Minimal · up to The change is limited to decoding tool-result error flags, with regression coverage for boolean and non-boolean values. No actionable merge-blocking risk is evident. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
A rabbit checks the message flow, Comment |
| Moved the decoder fix and regression test into #919 as requested. Closing this standalone PR; the fix is now carried by the example PR. |
Why
OpenAI Chat tool messages carrying
is_error: truecurrently decode to a tool result with no error flag. Routing algorithms then lose the caller's failure signal.What
Preserve boolean
is_errorvalues when decoding tool messages. Missing, null and non-boolean values remain unset.How
Read the field into
ToolResult.is_error, matching the Anthropic decoder. This changes decoding only; it does not add fields to outgoing OpenAI requests.Notes for reviewers
Where to Start Review
The one-line change in
codecs/openai_chat/buffered.rs, followed by the table-driven regression intests/request_translation.rs.Test Plan
The regression failed before the fix. All 233 translation-crate tests, formatting and strict Clippy pass.
This enables removal of the compatibility bridge in PreProc #919 after a published SDK release includes the fix. The example remains on SDK 0.3.0 for now.
Summary by CodeRabbit
Bug Fixes
is_errorwhen its value istrueorfalse. Missing, null, or non-boolean values remain unset.Tests