-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add tool approval integration for Vercel AI adapter #3772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
2351450
Add tool approval integration for Vercel AI adapter
bendrucker 8d4eeec
Add robustness improvements and tests for tool approval
bendrucker 6b04e4b
Skip doc examples that are incomplete snippets
bendrucker 04b4ba4
Also skip linting for incomplete doc snippets
bendrucker ce1a938
Add tests to cover edge cases for tool approval extraction
bendrucker b670068
Use public interface for denied_tool_ids tests
bendrucker b471351
Fix coverage: add pragma comments and caching test
bendrucker 8a8e3f1
Address PR review: add tests and fix documentation
bendrucker 5fbfa72
Address PR review comments for tool approval
bendrucker d11c76b
Use 'AI SDK UI v6' instead of 'AI SDK v6' for frontend requirement
bendrucker 451b0c9
Remove unnecessary tool_call_id checks (always present)
bendrucker 935a7e5
Inline extraction into from_request and remove private method tests
bendrucker b084f13
Consolidate tool approval tests to use from_request()
bendrucker c838e5b
Remove trailing blank lines (ruff)
bendrucker f374e45
Add edge case tests for tool approval extraction coverage
bendrucker 0855421
Fix coverage: remove duplicate starlette check function
bendrucker 8dd01ba
Add test for explicit deferred_tool_results parameter
bendrucker e8a57ca
rm dead pragma no cover
bendrucker a6f0e1a
Address PR review feedback for tool approval feature
bendrucker 8c1497f
Fix coverage: remove unused stream_function in test
bendrucker 7e2505f
Trigger CI rerun
bendrucker aa5f2d0
Add tool approval docs with correct parameter name
bendrucker 907bd2b
Address PR review: move enable_tool_approval to Vercel-specific classes
bendrucker 07bf987
Fix test snapshot: remove run_id from first request/response pair
bendrucker 7c3145e
Fix test snapshot and import ordering
bendrucker e3d5e6a
Add timestamp field to ModelRequest snapshots for CI compatibility
bendrucker ac27619
Fix test snapshot: historical messages don't have timestamp/run_id
bendrucker 39c6ac2
Preserve denial reason from ToolApprovalResponded
bendrucker f325008
Format test_vercel_ai.py
bendrucker c19330a
Merge origin/main and adapt tool approval to use sdk_version
bendrucker 508e5fc
Merge remote-tracking branch 'origin/main' into vercel-ai-tool-approval
bendrucker 04ecd93
Add sdk_version parameter to VercelAIAdapter.dispatch_request
bendrucker c659eb6
Extract shared helper for tool approval iteration logic
bendrucker 5857583
Replace error-path deferred tool results test with happy-path round-trip
bendrucker dbdfb07
Fix import ordering in Vercel AI adapter
bendrucker de2a4bc
Eliminate dispatch_request duplication in VercelAIAdapter
bendrucker 6459809
Add missing starlette skipif marker to dispatch_request tool approval…
bendrucker c3d7ee9
Add missing **kwargs docstring entries to fix D417 lint errors
bendrucker 5a6c9d9
Forward **kwargs in VercelAIAdapter.dispatch_request to super()
bendrucker 29820c4
Forward **kwargs in VercelAIAdapter.from_request to cls()
bendrucker e6597de
Simplify VercelAIAdapter.dispatch_request docstring
bendrucker bc40714
Move annotation-only imports under TYPE_CHECKING in Vercel adapter
bendrucker 3bc65fc
Update docs to reference addToolApprovalResponse (AI SDK v6)
bendrucker fdfa3f4
Prefix internal helpers with _ in request_types
bendrucker 973daa8
Remove Args section from dispatch_request override docstring to fix D417
bendrucker 4c7f023
Merge remote-tracking branch 'origin/main' into vercel-ai-tool-approval
bendrucker ff93775
Move iter_tool_approval_responses to _utils to avoid reportPrivateUsage
bendrucker 79cecc3
Update test snapshots for approval field after merge
bendrucker c1918bf
Delegate VercelAIAdapter.from_request to super() and use Self return …
bendrucker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.