releases.shpreview
Vercel/AI SDK/@ai-sdk/google@4.0.0-canary.71

@ai-sdk/google@4.0.0-canary.71

May 21, 2026AI SDKView original ↗1 fix

Patch Changes

  • 045d2e8: fix(google): read serviceTier from usageMetadata.serviceTier in both generate and stream paths

    The previous implementation read serviceTier from the x-gemini-service-tier response header, which is only populated on non-streaming responses. Gemini streaming includes the value in usageMetadata.serviceTier on every chunk, so providerMetadata.google.serviceTier was always null for streams. Read from usageMetadata for both paths instead.

Fetched May 21, 2026