fix: call to sanitize schema for complex union types#5366
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Response from ADK Triaging Agent Hello @EugeneYushin, thank you for your contribution! Before we can proceed with the review, could you please address the following points from the contribution guidelines?
Addressing these items will help us move forward with the review process. Thanks! |
|
Response from ADK Triaging Agent Hello @EugeneYushin, thank you for creating this PR! Before we can merge this, could you please sign our Contributor License Agreement (CLA)? You can do so here: https://cla.developers.google.com/ Also, could you please provide manual end-to-end (E2E) tests to help us verify the fix? This information will help reviewers to review your PR more efficiently. Thanks! |
|
Response from ADK Triaging Agent Hello @EugeneYushin, thank you for your contribution! Before we can merge this PR, we need to address a couple of items from our contribution guidelines:
You can find more information in our contribution guidelines. Thanks! |
|
Hi @EugeneYushin , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share. |
|
Hi @sasha-gitg , can you please review this. |
|
@sasha-gitg @rohityan guys, any luck you'd share your love with this one? |
Merge #5366 ### Link to Issue or Description of Change **1. Link to an existing issue (if applicable):** - Closes: [#5364](#5364) **Problem:** Using python functions with dicts in its signature breaks Gemini schema. **Solution:** Sanitize schema same way it's done in [McpTool](https://github.com/google/adk-python/blob/b3e99628ee1b87b61badf56e67f8ddee15e6fe54/src/google/adk/tools/mcp_tool/mcp_tool.py#L204) ### Testing Plan **Unit Tests:** - [x] I have added or updated unit tests for my change. - [x] All unit tests pass locally. ``` > pytest ./tests/unittests ... =================================================================================== 5531 passed, 2233 warnings in 98.83s (0:01:38) =================================================================================== ``` **Manual End-to-End (E2E) Tests:** * Install changes locally instead of PyPi ``` google-adk = { path = "<path-to-fork>/adk-python", editable = true } uv sync --all-packages --group dev ... Installed 2 packages in 2ms ~ adk==0.1.0 (from file:///Users/...) - google-adk==1.31.0 + google-adk==1.31.0 (from file:///...fork/adk-python) ``` * Follow "Steps to Reproduce" from Issue link ``` The current UTC timestamp is 2026-04-17T11:46:10.953127+00:00. ``` ### Checklist - [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [x] I have performed a self-review of my own code. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have added tests that prove my fix is effective or that my feature works. - [x] New and existing unit tests pass locally with my changes. - [x] I have manually tested my changes end-to-end. - [ ] Any dependent changes have been merged and published in downstream modules. ### Additional context Follow up: #5000 Co-authored-by: Bo Yang <ybo@google.com> COPYBARA_INTEGRATE_REVIEW=#5366 from EugeneYushin:sanitize-schema e4a88f9 PiperOrigin-RevId: 933812097
|
Thank you @EugeneYushin for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 9808451. Closing this PR as the changes are now in the main branch. |
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
Using python functions with dicts in its signature breaks Gemini schema.
Solution:
Sanitize schema same way it's done in McpTool
Testing Plan
Unit Tests:
Manual End-to-End (E2E) Tests:
Checklist
Additional context
Follow up: #5000