ai 6.0.250 → 6.0.253

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
@@ -1193,7 +1193,7 @@ import {
1193
1193
  } from "@ai-sdk/provider-utils";
1194
1194
 
1195
1195
  // src/version.ts
1196
- var VERSION = true ? "6.0.250" : "0.0.0-test";
1196
+ var VERSION = true ? "6.0.253" : "0.0.0-test";
1197
1197
 
1198
1198
  // src/util/download/download.ts
1199
1199
  var download = async ({
@@ -5949,6 +5949,7 @@ function processUIMessageStream({
5949
5949
  case "reasoning-start": {
5950
5950
  const reasoningPart = {
5951
5951
  type: "reasoning",
5952
+ id: chunk.id,
5952
5953
  text: "",
5953
5954
  providerMetadata: chunk.providerMetadata,
5954
5955
  state: "streaming"
@@ -8838,10 +8839,11 @@ var ToolLoopAgent = class {
8838
8839
  onStepFinish,
8839
8840
  ...options
8840
8841
  }) {
8842
+ const preparedCall = await this.prepareCall(options);
8841
8843
  return generateText({
8842
- ...await this.prepareCall(options),
8844
+ ...preparedCall,
8843
8845
  abortSignal,
8844
- timeout,
8846
+ timeout: timeout != null ? timeout : preparedCall.timeout,
8845
8847
  onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish)
8846
8848
  });
8847
8849
  }
@@ -8855,10 +8857,11 @@ var ToolLoopAgent = class {
8855
8857
  onStepFinish,
8856
8858
  ...options
8857
8859
  }) {
8860
+ const preparedCall = await this.prepareCall(options);
8858
8861
  return streamText({
8859
- ...await this.prepareCall(options),
8862
+ ...preparedCall,
8860
8863
  abortSignal,
8861
- timeout,
8864
+ timeout: timeout != null ? timeout : preparedCall.timeout,
8862
8865
  experimental_transform,
8863
8866
  onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish)
8864
8867
  });
@@ -9274,6 +9277,7 @@ var uiMessagesSchema = lazySchema2(
9274
9277
  }),
9275
9278
  z8.object({
9276
9279
  type: z8.literal("reasoning"),
9280
+ id: z8.string().optional(),
9277
9281
  text: z8.string(),
9278
9282
  state: z8.enum(["streaming", "done"]).optional(),
9279
9283
  providerMetadata: providerMetadataSchema.optional()
@@ -14137,13 +14141,12 @@ var AbstractChat = class {
14137
14141
  finishReason: activeResponse.state.finishReason
14138
14142
  });
14139
14143
  }
14140
- } catch (err) {
14141
- console.error(err);
14142
- }
14143
- if (this.activeResponse === activeResponse) {
14144
- this.activeResponse = void 0;
14144
+ } finally {
14145
+ if (this.activeResponse === activeResponse) {
14146
+ this.activeResponse = void 0;
14147
+ }
14148
+ clearActiveResumeRequest();
14145
14149
  }
14146
- clearActiveResumeRequest();
14147
14150
  }
14148
14151
  if (!isError && await this.shouldSendAutomatically()) {
14149
14152
  await this.makeRequest({