Skip to content

fix: deprecate needsApproval on Tool#14694

Merged
lgrammel merged 4 commits intomainfrom
lg/C0q0AVr1
Apr 22, 2026
Merged

fix: deprecate needsApproval on Tool#14694
lgrammel merged 4 commits intomainfrom
lg/C0q0AVr1

Conversation

@lgrammel
Copy link
Copy Markdown
Collaborator

Background

Tool approval in AI SDK 7 is defined in the toolApproval property of generateText, streamText, and ToolLoopAgent.

Different applications might need different approval strategies for the same tools. It is the responsibility of the agent or app developer, not the tool developer, to define approval strategies. Therefore the tool execution approval mechanism was redesigned in AI SDK 7.

Summary

Deprecate needsApproval on Tool.

Future Work

  • remove needsApproval on Tool in future AI SDK major versions (earliest AI SDK 8).

Related Issues

Builds on #14690 and #14643

@lgrammel lgrammel merged commit 0458559 into main Apr 22, 2026
17 checks passed
@lgrammel lgrammel deleted the lg/C0q0AVr1 branch April 22, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants