Vibeleaderboard
← All Intel
Intel / repo

ai ai@7.0.169

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

Context

Version 7.0.169 of `ai`, the core package of Vercel's AI SDK, changes how the package checks data internally, in a way meant to be invisible to applications. The SDK uses Zod, a TypeScript library for describing and validating the shape of data, to check messages and other structures. This release moves its internal validation schemas to Zod Mini, a lighter variant of Zod, to reduce bundle size, the amount of JavaScript an application ships. According to the release notes, the public message schemas that applications use directly keep the classic Zod methods and error messages and still work with the supported Zod 3 and Zod 4 versions. The notes give no figure for how much smaller bundles become.

The second change fixes the message queue that `useChat`, the SDK's chat-interface , gained one release earlier in ai@7.0.168. Tool approval lets a user approve a tool call before it runs, and `sendAutomaticallyWhen` is a `useChat` option, a function that decides whether the hook should send the next request on its own, for example once approvals are in. When the queue sends a tool approval first, the request options for that send are now kept, and the queue waits while an asynchronous `sendAutomaticallyWhen` makes its decision. The wording implies that before this fix an approval sent from the queue could lose those options, and queued messages could go out before that decision was made. Anyone using `experimental_queue` together with tool approvals is the audience for this release.

Terms in this piece · Glossary
  • agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.
More from github-actions[bot]
Recommended reads
Comments

Checking sign-in…

Loading comments…