WorkflowAgent respects tool.toModelOutput hook
ai@7.0.0-canary.168
Patch Changes
-
1e4b350: Honor
tool.toModelOutputinWorkflowAgent.WorkflowAgentnow routes successful local, provider-executed, and approved tool results through each tool's optionaltoModelOutputhook, matchinggenerateText,streamText, andToolLoopAgent. Previously the hook was ignored and results were always serialized astextorjson.Internally exports the shared tool-result model-output helpers from
ai/internal, and uses the sharedgetErrorMessagebehavior for workflow tool error results. -
Updated dependencies [a3bb04a]
- @ai-sdk/gateway@4.0.0-canary.102
Fetched June 10, 2026

