close
Skip to content

fix(providers): preserve tool input schemas - #53

Draft
ibetitsmike wants to merge 1 commit into
mainfrom
mike/tool-schema-fidelity
Draft

fix(providers): preserve tool input schemas#53
ibetitsmike wants to merge 1 commit into
mainfrom
mike/tool-schema-fidelity

Conversation

@ibetitsmike

Copy link
Copy Markdown

Anthropic currently reconstructs function tool schemas from only properties and required. Preserve the remaining top-level schema keys through the SDK's extra fields, and accept both typed and JSON-decoded required arrays. Bedrock receives the same fix because it reuses the Anthropic driver.

Google now inlines local #/$defs/... references with cycle and depth guards, then converts enum, anyOf, and nested required fields. additionalProperties, allOf, and oneOf remain dropped because genai.Schema cannot represent them.

The OpenAI chat-completions and responses drivers already pass InputSchema through verbatim, so they are unchanged.

Mux (AI agent) authored this change on Mike's behalf.

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