Skip to content

fix: call to sanitize schema for complex union types#5366

Open
EugeneYushin wants to merge 3 commits intogoogle:mainfrom
EugeneYushin:sanitize-schema
Open

fix: call to sanitize schema for complex union types#5366
EugeneYushin wants to merge 3 commits intogoogle:mainfrom
EugeneYushin:sanitize-schema

Conversation

@EugeneYushin
Copy link
Copy Markdown

@EugeneYushin EugeneYushin commented Apr 17, 2026

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:

  • I have added or updated unit tests for my change.
  • 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

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • 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

@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 17, 2026

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.

@adk-bot adk-bot added the tools [Component] This issue is related to tools label Apr 17, 2026
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 17, 2026

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?

  • Contributor License Agreement (CLA): It looks like the CLA check has failed. Please sign the Contributor License Agreement so that we can accept your contribution.
  • Manual End-to-End (E2E) Tests: Could you please provide a plan and results for manual end-to-end testing? This is important to verify that the fix works as expected in an integrated environment.

Addressing these items will help us move forward with the review process. Thanks!

@adk-bot adk-bot added the mcp [Component] Issues about MCP support label Apr 17, 2026
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 17, 2026

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!

@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 17, 2026

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:

  • CLA: It looks like you haven't signed the Contributor License Agreement (CLA) yet. You can do so at https://cla.developers.google.com/.
  • E2E Tests: Could you please provide instructions on how to manually test your changes, including any necessary setup or configuration? Please also provide logs or screenshots to help reviewers better understand the fix.

You can find more information in our contribution guidelines.

Thanks!

@EugeneYushin EugeneYushin changed the title Sanitize schema call to sanitize schema for complex union types Apr 17, 2026
@EugeneYushin EugeneYushin changed the title call to sanitize schema for complex union types fix: call to sanitize schema for complex union types Apr 17, 2026
@EugeneYushin
Copy link
Copy Markdown
Author

@rohityan could you please take a look? This is somewhat similar to #5000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp [Component] Issues about MCP support tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FunctionDeclaration doesn't support dicts

2 participants