Skip to content

Vercel's AI SDK fixes a gap in resumed tool-call approvals

A resumed tool call could reach your approval policy with a stripped-down tool definition, missing the metadata the same call carried the first time round.

Source: Vercel

Vercel shipped ai@7.0.162 on 3 November, patching how its AI SDK validates resumed tool calls against approval policies.

When a tool call needs approval, the SDK pauses it and resumes once that approval comes back. Until this release, a resumed call could reach your policy function without the server-defined metadata, dynamic status and title that the same tool carried on its first call, so the policy was checking an incomplete definition the second time round. The changelog describes the fix as restoring “server-defined tool metadata, dynamic status, and title when validating tool approval continuations, so approval policies receive the same tool definition fields as new model calls.”

pnpm add ai@7.0.162

Why it matters: if you’re building agents with approval gates in the AI SDK, this is the kind of gap that lets a resumed call pass a check it should have failed, not because the policy logic is wrong but because it was handed less information than it had the first time. Anyone using the approvals feature should update.

Share

Related reading

More from The Wire

All briefs