ai 6.0.250 → 6.0.252

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.252" : "0.0.0-test";
1197
1197
 
1198
1198
  // src/util/download/download.ts
1199
1199
  var download = async ({
@@ -8838,10 +8838,11 @@ var ToolLoopAgent = class {
8838
8838
  onStepFinish,
8839
8839
  ...options
8840
8840
  }) {
8841
+ const preparedCall = await this.prepareCall(options);
8841
8842
  return generateText({
8842
- ...await this.prepareCall(options),
8843
+ ...preparedCall,
8843
8844
  abortSignal,
8844
- timeout,
8845
+ timeout: timeout != null ? timeout : preparedCall.timeout,
8845
8846
  onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish)
8846
8847
  });
8847
8848
  }
@@ -8855,10 +8856,11 @@ var ToolLoopAgent = class {
8855
8856
  onStepFinish,
8856
8857
  ...options
8857
8858
  }) {
8859
+ const preparedCall = await this.prepareCall(options);
8858
8860
  return streamText({
8859
- ...await this.prepareCall(options),
8861
+ ...preparedCall,
8860
8862
  abortSignal,
8861
- timeout,
8863
+ timeout: timeout != null ? timeout : preparedCall.timeout,
8862
8864
  experimental_transform,
8863
8865
  onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish)
8864
8866
  });
@@ -14137,13 +14139,12 @@ var AbstractChat = class {
14137
14139
  finishReason: activeResponse.state.finishReason
14138
14140
  });
14139
14141
  }
14140
- } catch (err) {
14141
- console.error(err);
14142
- }
14143
- if (this.activeResponse === activeResponse) {
14144
- this.activeResponse = void 0;
14142
+ } finally {
14143
+ if (this.activeResponse === activeResponse) {
14144
+ this.activeResponse = void 0;
14145
+ }
14146
+ clearActiveResumeRequest();
14145
14147
  }
14146
- clearActiveResumeRequest();
14147
14148
  }
14148
14149
  if (!isError && await this.shouldSendAutomatically()) {
14149
14150
  await this.makeRequest({