Skip to content

fix: encode structured programmatic tool errors as JSON#3932

Merged
seratch merged 1 commit into
mainfrom
fix/programmatic-structured-tool-error-outputs
Jul 24, 2026
Merged

fix: encode structured programmatic tool errors as JSON#3932
seratch merged 1 commit into
mainfrom
fix/programmatic-structured-tool-error-outputs

Conversation

@seratch

@seratch seratch commented Jul 24, 2026

Copy link
Copy Markdown
Member

This pull request fixes HTTP 400 errors when programmatic function tools with structured output schemas are rejected, blocked by guardrails, or time out.

SDK-generated errors are now encoded as JSON objects in provider-facing tool outputs while preserving existing public output values and direct function-call behavior. Approval rejections also retain valid outputs across streaming, serialized state, and resumed execution.

@seratch seratch added this to the 0.19.x milestone Jul 24, 2026
@seratch
seratch enabled auto-merge (squash) July 24, 2026 03:08
@seratch
seratch merged commit 658bfc4 into main Jul 24, 2026
9 checks passed
@seratch
seratch deleted the fix/programmatic-structured-tool-error-outputs branch July 24, 2026 03:09
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