@ai-sdk/provider-utils 3.0.46 → 3.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -760,7 +760,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
760
760
  }
761
761
 
762
762
  // src/version.ts
763
- var VERSION = true ? "3.0.46" : "0.0.0-test";
763
+ var VERSION = true ? "3.0.47" : "0.0.0-test";
764
764
 
765
765
  // src/get-from-api.ts
766
766
  var getOriginalFetch = () => globalThis.fetch;
@@ -1177,11 +1177,13 @@ function isParsableJson(input) {
1177
1177
  import {
1178
1178
  EventSourceParserStream
1179
1179
  } from "eventsource-parser/stream";
1180
+ var DEFAULT_MAX_EVENT_SIZE = 64 * 1024 * 1024;
1180
1181
  function parseJsonEventStream({
1181
1182
  stream,
1182
- schema
1183
+ schema,
1184
+ maxEventSize = DEFAULT_MAX_EVENT_SIZE
1183
1185
  }) {
1184
- return stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream()).pipeThrough(
1186
+ return stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream({ maxBufferSize: maxEventSize })).pipeThrough(
1185
1187
  new TransformStream({
1186
1188
  async transform({ data }, controller) {
1187
1189
  if (data === "[DONE]") {