@ai-sdk/provider-utils 4.0.67 → 4.0.68

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
@@ -947,7 +947,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
947
947
  }
948
948
 
949
949
  // src/version.ts
950
- var VERSION = true ? "4.0.67" : "0.0.0-test";
950
+ var VERSION = true ? "4.0.68" : "0.0.0-test";
951
951
 
952
952
  // src/get-from-api.ts
953
953
  var getOriginalFetch = () => globalThis.fetch;
@@ -2676,11 +2676,13 @@ function isParsableJson(input) {
2676
2676
  import {
2677
2677
  EventSourceParserStream
2678
2678
  } from "eventsource-parser/stream";
2679
+ var DEFAULT_MAX_EVENT_SIZE = 64 * 1024 * 1024;
2679
2680
  function parseJsonEventStream({
2680
2681
  stream,
2681
- schema
2682
+ schema,
2683
+ maxEventSize = DEFAULT_MAX_EVENT_SIZE
2682
2684
  }) {
2683
- return stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream()).pipeThrough(
2685
+ return stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream({ maxBufferSize: maxEventSize })).pipeThrough(
2684
2686
  new TransformStream({
2685
2687
  async transform({ data }, controller) {
2686
2688
  if (data === "[DONE]") {