-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Open
bendrucker
wants to merge
30
commits into
pydantic:main
Choose a base branch
from
bendrucker:vercel-ai-tool-approval
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+633
−17
Open
Changes from all commits
Commits
Show all changes
30 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a closer look at docs later, will focus primarily on the code for now