Article

Fix Vercel AI SDK tool denials and rotate approval secrets

For developers using signed tool approvals, check the affected setup, deploy ai 7.0.178, rotate the signing secret and renew pending approvals.

Editorial illustration for Fix Vercel AI SDK tool denials and rotate approval secrets: code brackets represent developer tools. Not documentary evidence.

Vercel’s November 20, 2026 release of AI SDK 7.0.178 fixes a case where a tool action denied by server policy could later be accepted as approved. If your app uses signed tool approvals, automatic denials and client-supplied chat history, deploy the fixed package and rotate the approval secret. Updating the library does not invalidate signatures already issued.

This matters for tools that change records, send messages or access private resources—the actions covered by the tool-approval guide.

Which apps need the tool-approval fix?

Inspect the deployed server configuration, not just the package on a developer’s laptop. Look for these three conditions together:

  • The app sets experimental_toolApprovalSecret, which attaches server-issued cryptographic proof to approval requests.

  • Its tool policy can return an automatic denied decision.

  • The server accepts conversation history supplied by the client, as in the documented useChat pattern.

The merged change covers generateText, streamText and ToolLoopAgent. Its explanation highlights policies based on chat history: omitting earlier messages could change the later policy decision while leaving the signature valid. That is different from breaking the signature or stealing the secret. The maintainer’s reproduction is not evidence of real-world exploitation.

A current server-side denial still prevents execution: the continuation validator checks the signature, validates input and evaluates the policy again. The problem matters when client-chosen history changes what that policy sees.

Provider-executed tools do not use these SDK approvals. WorkflowAgent’s automatic decisions were already unsigned and are unchanged. Not every AI SDK app uses the affected path.

Do not disable signing. The documented trust model warns that client-crafted history can bypass human approval without additional protection.

Upgrade first, then replace the signing secret

  1. Deploy the fixed package. ai 7.0.178 is published on npm. Update the dependency and lockfile through your normal release process, then confirm every affected serving instance uses the new build. Its metadata requires Node.js 22 or newer and Zod ^3.25.76 || ^4.1.8; these are compatibility requirements, not necessarily new changes in this patch.

  2. Replace the approval-signing secret through your existing protected secret manager. The setup guidance calls for at least 32 bytes of high-entropy randomness and a consistent value across instances that issue or verify approvals. Keep the value server-side, out of client code, logs and support messages.

The operational implication is to complete the code rollout before letting instances use the replacement key: old code could otherwise sign new denials with it. Retire old-key verification across the serving deployment. This sequence follows from the documented signing change and key-based verifier; it is not a deployment recipe specific to one hosting platform.

The update stops signing new automatic denials; replacing the secret invalidates signatures issued under the old key.

The cited release does not establish a complete affected-version range or a backport for another major line. If your app runs a different line, obtain current maintainer guidance rather than assuming this patch number is a compatible upgrade.

What happens to pending approvals?

Rotation also invalidates legitimate requests awaiting a user’s decision. The release instructions require those approvals to be requested again. Give users a fresh decision for work still needed; do not approve it automatically or continue accepting the old key merely to preserve existing prompts.

An AI_InvalidToolApprovalSignatureError after the change can therefore be an expected refusal of an old approval. The error reference also lists missing signatures and changed tool arguments as causes. It means the approval was rejected before tool execution, not that an attack has necessarily occurred.

If fresh requests fail intermittently, check that issuing and verifying instances use the same replacement key. That follows from the cross-instance key requirement. Investigate the request and deployment state without switching signature checks off.

Check allowed and denied actions before closing the rollout

Use a controlled application check with harmless stand-ins for consequential actions. Based on the maintainers’ regression cases and signature-error behavior, the acceptance conditions should include:

  • A newly automatically denied call cannot execute when submitted as approved.

  • An old-key approval is rejected before the action runs.

  • A fresh legitimate manual approval works across the intended serving instances.

  • An ordinary denial still lets the conversation continue without running the denied tool.

For teams also upgrading Pi extensions, the separate guide to preserving custom tool validation in Pi 1.5 addresses input rules that must remain effective before an action. That is a different check from approval-signature verification.

What the patch does not replace

A signature is not a single-use permission. The maintainers’ remaining-work notes explicitly say that signed manual and automatic approvals can be submitted again; preventing reuse needs server-side state.

The signature payload binds request identifiers, the tool name and input, but has no separate user, tenant or expiry field. Application-specific identity checks may exist elsewhere. The practical implication is to retain authenticated-user permissions, authoritative budget or business records, and duplicate-action controls—often called idempotency—rather than relying on client chat history alone.

If your team also manages Gemini CLI integrations, its system MCP trust checks concern the files behind approved tools, not these signatures. Treat each product’s authorization controls separately.

For this fix, completion means patched serving code, retirement of the old approval key and fresh requests for pending decisions. Those steps address the documented signed-denial issue; they do not replace the application’s own access rules.