Skip to content

reproduction: @ai-sdk/google: 429 error schema drops google.rpc.RetryInfo, so Gemini's - #18628

Draft
ai-sdk-factory[bot] wants to merge 1 commit into
mainfrom
bug-reproduction-18627-20260810041228662580
Draft

reproduction: @ai-sdk/google: 429 error schema drops google.rpc.RetryInfo, so Gemini's#18628
ai-sdk-factory[bot] wants to merge 1 commit into
mainfrom
bug-reproduction-18627-20260810041228662580

Conversation

@ai-sdk-factory

Copy link
Copy Markdown
Contributor

Bug

@ai-sdk/google: 429 error schema drops google.rpc.RetryInfo, so Gemini's retryDelay is unreachable from APICallError.data

Reproduction

  • On main, packages/google/src/google-error.ts still parses only code, message, and status, so this is not caused by the reported older package versions or a partial upgrade.
  • examples/ai-functions/src/reproduction/issue-18627-google-retry-info.ts observed a retryable 429 with no retry headers and RetryInfo in responseBody, while APICallError.data omitted error.details; the expected typed data included the 34.4s retry delay.
  • The missing typed delay prevents custom schedulers from reading Google's recommendation without reparsing responseBody; packages/ai/src/util/retry-with-exponential-backoff.ts only considers retry headers.
  • packages/google/src/__fixtures__/google-429-retry-info.json records the reported response shape, and packages/google/src/google-error.test.ts fails because the handler drops its details array.

Relevant Documentation

Related Issues

Reproduces #18627

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