-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: use toolbox-adk and align validation to allow default loading
#3978
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
base: main
Are you sure you want to change the base?
Conversation
Removes verbose comments, improves type hints (dict -> Mapping), and restores validation check for toolset/tool names.
Adds 'from __future__ import annotations' and fixes Pyink formatting validation errors (docstring Indentation, trailing comma, line wrapping).
Uses TYPE_CHECKING import to reference toolset_adk.CredentialConfig for the credentials parameter, improving static analysis without adding runtime dependencies.
Summary of ChangesHello @anubhav756, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Response from ADK Triaging Agent Hello @anubhav756, thank you for creating this PR! To help us review this PR, could you please associate the GitHub issue with this PR? If there is no existing issue, could you please create one? In addition, could you please provide a This information will help reviewers to review your PR more efficiently. Thanks! |
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.
Code Review
This pull request updates the ToolboxToolset to use the toolbox-adk package, replacing toolbox-core. This simplifies the implementation by delegating tool loading to toolbox-adk. The change also removes the validation that required either toolset_name or tool_names, allowing all tools to be loaded by default. My review focuses on the correctness of this refactoring. I've found a critical issue with type compatibility in the get_tools method and a minor issue with docstring formatting. Please see my detailed comments.
5cab383 to
364455b
Compare
toolbox-adk and align validation to allow default loading
364455b to
3015b86
Compare
3015b86 to
babd420
Compare
| raise ValueError("tool_names and toolset_name cannot both be None") | ||
|
|
||
| try: | ||
| from toolbox_adk import ToolboxToolset as RealToolboxToolset # pylint: disable=import-outside-toplevel |
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.
nit: NativeToolboxToolset?
|
Hi @anubhav756 , Thank you for your contribution! We appreciate you taking the time to submit this pull request. |
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
ToolboxToolsetto wraptoolbox-adk#3888Note
This PR includes changes that depend on functionality introduced in #3888. Please review and merge #3888 first.
2. Or, if no issue exists, describe the change:
Problem:
The sample agent code was using the legacy
toolbox-corepackage, which is being superseded bytoolbox-adk. Additionally,ToolboxToolsethad a validation check enforcing eithertoolset_nameortool_namesto be present, preventing the default behavior of loading all tools when parameters are omitted (whichtoolbox-adksupports).Solution:
toolbox-adk.ToolboxToolsetto allow default loading of all tools, aligning withtoolbox-adkbehavior.Testing Plan
Unit Tests:
Manual End-to-End (E2E) Tests:
toolbox-adklocally.ToolboxToolsetcan now be instantiated without arguments to load all tools.Checklist