Repository navigation
@ai-sdk/workflow@2.0.105
Patch Changes
-
ff89832: fix(workflow): call
onAbortinstead ofonErrorwhen aWorkflowAgentcall is aborted during a model step with a custom abort reason.generate()still rejects with that reason.stream()now resolves with the steps that finished, as it does for an abort without a reason. -
2473a71: fix(workflow):
WorkflowAgentuses the last value yielded by an async generator tool as the tool result, likeToolLoopAgent. A generator that throws after yielding produces a tool error. -
f43ee39: fix(workflow): log the default step limit warning when
WorkflowAgent.generate()stops at the default limit. -
7ce7ffc: fix(workflow): log provider warnings in
WorkflowAgentWorkflowAgent.generate()andWorkflowAgent.stream()now log the warnings of every model call through the AI SDK warning logger, likeToolLoopAgent. TheAI_SDK_LOG_WARNINGSglobal controls the output. -
f6809e3: fix(workflow): align the
prepareStepresults ofWorkflowAgentwithToolLoopAgent. Returnedinstructions(or the deprecatedsystem) replace the instructions of the step and carry forward to later steps, returnedproviderOptionsare merged with the agent options, and returnedheadersare merged over the headers of the call. -
9307549: feat(workflow): support
experimental_refineToolInputinWorkflowAgent, in the constructor and per call. Refined tool inputs are used for tool execution, step results, callbacks, and the next model call, like inToolLoopAgent. -
bf1dd2a: fix(workflow):
WorkflowAgent.stream()keeps the tool call in the step result when the model calls an unknown tool or passes input that does not match the schema. The call is markedinvalidand the step has atool-errorpart, as ingenerate()andToolLoopAgent. The model still receives the error as a tool result. -
453d880: fix(workflow): call the
onInputAvailabletool hook instream()when the provider sends a tool call without streaming its input first. -
5c0e984: fix(workflow): report the provider name and model ID of the called model in the steps of
WorkflowAgent.stream()results, matchingToolLoopAgentandWorkflowAgent.generate() -
2559173: feat(workflow): support
toolApprovalinWorkflowAgentWorkflowAgentaccepts atoolApprovalconfiguration in the constructor and pergenerate()orstream()call. The configuration takes precedence over a tool'sneedsApprovalsetting, and its functions run in workflow context, outside of the durable model steps. Calls that the configuration approves run in the same step, and calls that it denies receive anexecution-deniedtool result without pausing the workflow. -
b9f6c82: feat(workflow): support
toolOrderinWorkflowAgentWorkflowAgentacceptstoolOrderin the constructor, per call ingenerate()andstream(), and fromprepareCallandprepareStep. Listed tools are sent first in the listed order, and the remaining tools follow in alphabetical order. -
f1de9cb: feat(workflow): support the
timeoutobject inWorkflowAgentgenerate()andstream()accepttimeout: { totalMs, stepMs, firstChunkMs, chunkMs }in addition to a number.stepMslimits each model call. Instream(),firstChunkMsandchunkMslimit the wait for model output. Invalid timeout values are rejected with anInvalidArgumentError. A timeout now also ends a model step when the provider stream ignores the abort signal. -
Updated dependencies [3c09e00]
-
Updated dependencies [f43ee39]
-
Updated dependencies [7ce7ffc]
-
Updated dependencies [f6809e3]
-
Updated dependencies [2559173]
-
Updated dependencies [f1de9cb]
- ai@7.0.173