releases.shpreview

WorkflowAgent respects tool.toModelOutput hook

ai@7.0.0-canary.168

1 fixThis release1 fixBug fixesAI-tallied from the release notes

Patch Changes

  • 1e4b350: Honor tool.toModelOutput in WorkflowAgent.

    WorkflowAgent now routes successful local, provider-executed, and approved tool results through each tool's optional toModelOutput hook, matching generateText, streamText, and ToolLoopAgent. Previously the hook was ignored and results were always serialized as text or json.

    Internally exports the shared tool-result model-output helpers from ai/internal, and uses the shared getErrorMessage behavior for workflow tool error results.

  • Updated dependencies [a3bb04a]

    • @ai-sdk/gateway@4.0.0-canary.102

Fetched June 10, 2026