fix: prevent recursive Google tool schemas from aborting model calls (#19490)
## Background Recursive Zod tool schemas caused @ai-sdk/google to abort generateText and streamText during request preparation, preventing any provider request. ## Root Cause Google tool preparation always converted schemas to its OpenAPI-compatible format, whose cycle detection throws UnsupportedFunctionalityError for recursive local references; the reproduction confirmed requests were never sent. ## Summary Recursive schemas now fall back to Google's parametersJsonSchema field, while non-recursive schemas retain existing conversion behavior. Added a patch changeset. ## Testing Added tool-preparation and request-body regression tests verifying recursive schemas are preserved and requests proceed. ## End-to-end Validation - `pnpm -C examples/ai-functions exec tsx --eval '<recursive generateText/streamText validation>'` — both calls reached mocked Google requests, preserved the recursive schema, and returned tool calls. ## Related Issues Fixes #19488 Closes #19489 --------- Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: wottpal <3930150+wottpal@users.noreply.github.com>
A
ai-sdk-factory[bot] committed
92e08e6f2e1d036d608ab217bfa768e1af75183c
Parent: ff35434
Committed by GitHub <noreply@github.com>
on 8/25/2026, 3:30:04 PM