Patch Changes
-
89aff56: feat(provider-utils): add an
experimental_binaryFieldsoption tocreateJsonResponseHandlerProviders 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 toUint8Arraywhile they arrive, instead of holding about four copies of the body in memory (chunks, concatenated bytes, text, parsed string).rawValue, validation errors andAPICallError.responseBodycontain a short placeholder string instead of the data. Handlers without the option are unchanged.readResponseWithSizeLimitaccepts an optionalonChunkcallback 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