ai 3.1.21 → 3.1.23

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
@@ -1250,6 +1250,7 @@ async function generateText({
1250
1250
  maxRetries,
1251
1251
  abortSignal,
1252
1252
  maxAutomaticRoundtrips = 0,
1253
+ maxToolRoundtrips = maxAutomaticRoundtrips,
1253
1254
  ...settings
1254
1255
  }) {
1255
1256
  var _a, _b, _c;
@@ -1294,7 +1295,7 @@ async function generateText({
1294
1295
  // there are tool calls:
1295
1296
  currentToolCalls.length > 0 && // all current tool calls have results:
1296
1297
  currentToolResults.length === currentToolCalls.length && // the number of roundtrips is less than the maximum:
1297
- roundtrips++ < maxAutomaticRoundtrips
1298
+ roundtrips++ < maxToolRoundtrips
1298
1299
  );
1299
1300
  return new GenerateTextResult({
1300
1301
  // Always return a string so that the caller doesn't have to check for undefined.