fix(google): preserve provider error details in APICallError.data (#18629)
Sole Author: Patrick Ribbsaeter (@patrickswedish) · Immutable Commit SHA: 4160f385b178277d6084896d2d83e97bf2c2f34b
Google Gemini provider error-schema fix preserving structured google.rpc.QuotaFailure and google.rpc.RetryInfo payloads inside APICallError.data on HTTP 429 responses.
PR #18629
ADOPTED UPSTREAM · VERIFIED
4160f38
Immutable Git SHA
TypeScript
Sdk
Provider Suite Green
CI & Test Matrix
01 · Engineering problem
The failure mode
Google's generative AI error schema stripped error.details on HTTP 429 responses before constructing APICallError.data, discarding structured QuotaFailure and RetryInfo retryDelay payloads.
02 · Technical response
What changed
- 01Extended the Google provider error Zod schema to retain optional details[] payloads.
- 02Added end-to-end 429 failed-response handler fixtures verifying QuotaFailure and RetryInfo survival.
03 · Verified outcome
Evidence-backed result
- ✓Passed 20/20 Vercel CI checks on commit 4160f385b178277d6084896d2d83e97bf2c2f34b and adopted into vercel/ai mainline.
04 · Cryptographic Git record
Immutable source evidence
Independent open-source engineering authored solely by Patrick Ribbsaeter (@patrickswedish). Company and project names identify the public repository context only under nominative fair use. No employment, client, vendor, or partnership relationship is implied unless explicitly stated.