Vibeleaderboard
← All Intel
Intel / repo

ai @ai-sdk/workflow@2.0.104

Source
github.com
Author
github-actions[bot]Top Viber
Date
Why it matters

WorkflowAgent now matches ToolLoopAgent: prepareStep overrides apply only to the current step, tools no longer receive the system prompt, and usage keeps token details. Check code that relied on the old behavior.

Key takeaways · AI-distilled
  • WorkflowAgent now takes onError and onAbort callbacks in its constructor, as ToolLoopAgent does. They run before callbacks passed to generate() or stream(), and an error thrown inside one no longer replaces the run's own error or result.
  • Tools called by WorkflowAgent no longer receive the or the assistant message holding the current tool call in options.messages, matching ToolLoopAgent, generateText and streamText. Tools that read those messages will see less .
  • Overrides returned from prepareStep in WorkflowAgent, including model, toolChoice, activeTools and generation settings, now apply only to the current step. Before this fix an override set for one step stayed in effect for every later step.
  • WorkflowAgent.stream() now aggregates totalUsage like ToolLoopAgent: cached and reasoning details are kept, and counts the provider did not report stay undefined instead of being recorded as 0.
Terms in this piece · Glossary
  • system prompt — The standing instructions a model receives before any user input — defining its role, rules, tools, and tone for the whole conversation.
  • token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
  • context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
More from github-actions[bot]
Recommended reads
Comments

Checking sign-in…

Loading comments…