Skip to content

fix: harden tool output trimming contracts - #4204

Merged
seratch merged 1 commit into
mainfrom
fix/tool-output-trimmer-contract
Aug 5, 2026
Merged

fix: harden tool output trimming contracts#4204
seratch merged 1 commit into
mainfrom
fix/tool-output-trimmer-contract

Conversation

@seratch

@seratch seratch commented Aug 5, 2026

Copy link
Copy Markdown
Member

This pull request fixes recurring edge cases in ToolOutputTrimmer by handling canonical structured text, image, and file outputs through bounded, replay-stable summaries. It prioritizes useful text previews, omits opaque payloads, reports omitted content types when space permits, and leaves malformed or unknown output shapes unchanged.

It also replaces broad recursive schema trimming with traversal of known JSON Schema positions, preserving property names, instance data, dependency information, and unfamiliar extensions. Regression coverage now exercises the canonical SDK producer through trimming and Chat Completions replay.

@seratch seratch added this to the 0.20.x milestone Aug 5, 2026
@seratch
seratch enabled auto-merge (squash) August 5, 2026 11:01
@seratch
seratch merged commit f6a32fe into main Aug 5, 2026
10 checks passed
@seratch
seratch deleted the fix/tool-output-trimmer-contract branch August 5, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant