github vercel/ai @ai-sdk/provider-utils@5.0.75

latest releases: @ai-sdk/zai@3.0.47, @ai-sdk/xai@5.0.39, @ai-sdk/workflow-harness@1.0.174...
5 hours ago

Patch Changes

  • 89aff56: feat(provider-utils): add an experimental_binaryFields option to createJsonResponseHandler

    Providers whose JSON responses carry large base64 strings (images, files) can list their paths, e.g. createJsonResponseHandler(schema, { experimental_binaryFields: ['images[*]'] }). The body is then read as a stream and canonical base64 strings of 64 KiB and more are decoded to Uint8Array while they arrive, instead of holding about four copies of the body in memory (chunks, concatenated bytes, text, parsed string). rawValue, validation errors and APICallError.responseBody contain a short placeholder string instead of the data. Handlers without the option are unchanged. readResponseWithSizeLimit accepts an optional onChunk callback that receives each chunk instead of the chunks being collected.

  • Updated dependencies [36802d4]

  • Updated dependencies [e0143b0]

  • Updated dependencies [934100c]

  • Updated dependencies [892af4d]

  • Updated dependencies [41465fd]

  • Updated dependencies [9754014]

  • Updated dependencies [4bb73b0]

  • Updated dependencies [2e44144]

    • @ai-sdk/provider@4.0.36

Don't miss a new ai release

NewReleases is sending notifications on new releases.