Vibeleaderboard
← All Intel
Intel / repo

ai ai@7.0.160

Source
github.com
Author
github-actions[bot]
Date

Context

This patch to the AI SDK, Vercel's TypeScript library for building AI apps and agents, adds steering.queue() to the experimental steering feature that arrived a few days earlier in ai@7.0.154. Steering lets an application add a user message to an while it is still running. Before this release, a follow-up could only be sent with steer(), which inserts the message at the next step boundary in the middle of the task and is meant for corrections, or as a new request after the run ended (release notes).

queue() holds a message until the model finishes its current task, which the documentation defines as giving a final answer without tool calls. The loop then continues with the queued message, so an agent can complete what it is doing before picking up a follow-up. Queued messages are delivered one per task, in order, after any pending steering messages. If the answer was cut off by the length limit or a content filter, the task does not count as finished and the queued message is not delivered. The method works with generateText, streamText and ToolLoopAgent (commit).

The release also fixes a bug that meant streamed data parts were never checked against their schemas. The code looked up dataPartSchemas by the full chunk type, such as data-weather, instead of the bare part name, weather, so useChat and Chat never validated those parts. Invalid data parts now raise a TypeValidationError, so an app that has been data parts that do not match its declared schemas will start seeing errors after it upgrades.

Terms in this piece · Glossary
  • AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
  • streaming — Sending a model's response token by token as it is generated, so the reader sees text immediately instead of waiting for the whole answer.
More from github-actions[bot]
Recommended reads
Comments

Checking sign-in…

Loading comments…