Patch Changes
- b161730: fix(workflow):
WorkflowAgentnow acceptsonErrorandonAbortin the constructor, likeToolLoopAgent. They are called before the callbacks passed togenerate()orstream(). An error thrown by anonErrororonAbortcallback no longer replaces the error or result of the run. - c591e12: fix(workflow): tools called by
WorkflowAgentno longer receive the system prompt or the assistant message that contains the current tool call inoptions.messages. Themessagespassed toonToolExecutionStartandonToolExecutionEndno longer contain the system prompt either. This matchesToolLoopAgent,generateText, andstreamText. - ec23d2d: fix(workflow):
model,toolChoice,activeTools, and generation settings returned fromprepareStepinWorkflowAgentnow apply to the current step only, like inToolLoopAgent. Before, an override returned for one step stayed in effect for all later steps. - 1876747: fix(workflow):
WorkflowAgent.stream()now aggregatestotalUsagethe same way asToolLoopAgent. Token details such as cached and reasoning tokens are kept, and counts that the provider did not report stayundefinedinstead of becoming0. - Updated dependencies [6d50947]
- Updated dependencies [79d2004]
- @ai-sdk/provider-utils@5.0.81
- ai@7.0.172