Skip to content

Fix: Handle unexpected 'parameters' argument in FunctionTool.run_async #1656

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 1 commit into from
Jul 2, 2025

Conversation

hangfei
Copy link
Collaborator

@hangfei hangfei commented Jun 26, 2025

The LLM occasionally includes an unexpected 'parameters' argument when calling tools, specifically observed with 'transfer_to_agent'. This change makes FunctionTool.run_async more robust by filtering arguments against the function signature before invocation.

This resolves issue #1637.

This is generated by Jules Agent.

@hangfei
Copy link
Collaborator Author

hangfei commented Jun 26, 2025

@boyangsvl does this change make sense or we should still let model handle it all?

@hangfei hangfei added ready to pull [Status] This PR is ready to be importing back to Google and removed ready to pull [Status] This PR is ready to be importing back to Google labels Jun 26, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The LLM occasionally includes an unexpected 'parameters' argument when calling tools, specifically observed with 'transfer_to_agent'. This change makes FunctionTool.run_async more robust by filtering arguments against the function signature before invocation.

This resolves issue #1637.

Update test_function_tool.py

fix typing

fix: add `from __future__ import annotations`
@hangfei hangfei force-pushed the fix-transfer-to-agent-parameters-issue branch from c2db1b8 to 0959b06 Compare July 2, 2025 00:23
@hangfei hangfei added the ready to pull [Status] This PR is ready to be importing back to Google label Jul 2, 2025
@copybara-service copybara-service bot merged commit 9bd539e into main Jul 2, 2025
11 of 12 checks passed
coder-aditi pushed a commit to coder-aditi/adk-python that referenced this pull request Jul 2, 2025
…meters-issue

PiperOrigin-RevId: 778334126
@hangfei hangfei deleted the fix-transfer-to-agent-parameters-issue branch July 2, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to pull [Status] This PR is ready to be importing back to Google
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants