Preserve explicit tool response content#469
Open
jstar0 wants to merge 1 commit into
Open
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
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
Fixes #467.
Tool::Responsenormalized omitted content, explicitnil, and explicit[]to the same empty array. The structured-content compatibility fallback then
treated every empty array as absent. It also classified JSON objects with a
Ruby
Hashcheck, so adapters such as representable objects that serialize toJSON objects were treated as non-object values.
Together, those behaviors could add synthesized text content even when a tool
explicitly selected an empty
contentarray, causing clients to expose thesame result twice.
Changes
Tool::Response.omitted/nil compatibility fallback.
The wire shape and existing fallback for omitted or nil content with array or
scalar structured values remain unchanged.
Verification
All checks passed. The default Rake task covered RuboCop, 1,434 Ruby tests, 40
server conformance checks, and 280 client conformance checks.
Breaking Changes
None.
Types of changes
Checklist