ai 6.0.0-beta.85 → 6.0.0-beta.87

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
@@ -775,7 +775,7 @@ import {
775
775
  } from "@ai-sdk/provider-utils";
776
776
 
777
777
  // src/version.ts
778
- var VERSION = true ? "6.0.0-beta.85" : "0.0.0-test";
778
+ var VERSION = true ? "6.0.0-beta.87" : "0.0.0-test";
779
779
 
780
780
  // src/util/download/download.ts
781
781
  var download = async ({ url }) => {
@@ -5049,7 +5049,7 @@ var DefaultStreamTextResult = class {
5049
5049
  this._totalUsage = new DelayedPromise();
5050
5050
  this._finishReason = new DelayedPromise();
5051
5051
  this._steps = new DelayedPromise();
5052
- this.output = output;
5052
+ this.outputSpecification = output;
5053
5053
  this.includeRawChunks = includeRawChunks;
5054
5054
  this.tools = tools;
5055
5055
  let stepFinish;
@@ -5951,7 +5951,7 @@ var DefaultStreamTextResult = class {
5951
5951
  return this.partialOutputStream;
5952
5952
  }
5953
5953
  get partialOutputStream() {
5954
- if (this.output == null) {
5954
+ if (this.outputSpecification == null) {
5955
5955
  throw new NoOutputSpecifiedError();
5956
5956
  }
5957
5957
  return createAsyncIterableStream(
@@ -5966,6 +5966,21 @@ var DefaultStreamTextResult = class {
5966
5966
  )
5967
5967
  );
5968
5968
  }
5969
+ get output() {
5970
+ return this.finalStep.then((step) => {
5971
+ if (this.outputSpecification == null) {
5972
+ throw new NoOutputSpecifiedError();
5973
+ }
5974
+ return this.outputSpecification.parseCompleteOutput(
5975
+ { text: step.text },
5976
+ {
5977
+ response: step.response,
5978
+ usage: step.usage,
5979
+ finishReason: step.finishReason
5980
+ }
5981
+ );
5982
+ });
5983
+ }
5969
5984
  toUIMessageStream({
5970
5985
  originalMessages,
5971
5986
  generateMessageId,