fix(models): avoid spurious UserWarning on tool-call responses in _build_response_log#6073
fix(models): avoid spurious UserWarning on tool-call responses in _build_response_log#6073syedjafri06193 wants to merge 2 commits into
Conversation
…ild_response_log Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
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 @syedjafri06193, thank you for creating this PR! To help us review your contribution more efficiently, please address the following items from our contribution guidelines:
These details will save review time and help us merge your changes sooner. Thank you! |
|
CLA is signed (Google Individual CLA, Jun 08 2026). Requesting CLA check re-run. |
|
Hi @syedjafri06193 , Thank you for your contribution! It appears you haven't yet signed the Contributor License Agreement (CLA). Please visit https://cla.developers.google.com/ to complete the signing process. Once the CLA is signed, we'll be able to proceed with the review of your PR. Thank you! |
|
I have signed it
…On Thu, Jun 11, 2026 at 2:49 PM Rohit Yanamadala ***@***.***> wrote:
*rohityan* left a comment (google/adk-python#6073)
<#6073 (comment)>
Hi @syedjafri06193 <https://github.com/syedjafri06193> , Thank you for
your contribution! It appears you haven't yet signed the Contributor
License Agreement (CLA). Please visit https://cla.developers.google.com/
to complete the signing process. Once the CLA is signed, we'll be able to
proceed with the review of your PR. Thank you!
—
Reply to this email directly, view it on GitHub
<#6073?email_source=notifications&email_token=BTHVOAXVQLOM7NGVXNMDVX347MSM5A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRYGU2DANBSGIY2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4685404221>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BTHVOAVJWKPRV6JCFIAG4JT47MSM5AVCNFSNUABFKJSXA33TNF2G64TZHM4TKOBYGMYDMNJZHNEXG43VMU5TINRTGU4DKOBTGEZKC5QC>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Summary
Fixes #4685.
When the model returns a tool-call (function-call) response,
resp.textinternally iterates allPartobjects and emits aUserWarningfor every part that contains aFunctionCallinstead of plain text. This warning is unhelpful noise when the caller is just building a debug log string._safe_response_text(resp)before_build_response_log()that extracts text by directly iteratingcandidates[0].content.partsand joining onlypart.textvalues that are notNone, bypassing the warning-emitting property entirely.{resp.text}in_build_response_log()'s f-string with{_safe_response_text(resp)}.Test plan
UserWarning: there is no text partappears in logs.pytest tests/unittests/models/passes without new failures.🤖 Generated with Claude Code