Repository navigation
Description
🔴 Required Information
Describe the Bug:
With Gemini(use_interactions_api=True), media a tool returns never reaches the model. ADK moves a tool's types.Part media (images, PDFs and so on) into FunctionResponse.parts. _convert_part_to_interaction_content builds the function_result step only from FunctionResponse.response, so the parts are dropped silently. The model then answers about a chart or report it never saw.
The other model adapters already forward these parts: LiteLlm, AnthropicLlm, ApigeeLlm and the OCI integration all read function_response.parts. The Interactions API accepts media in a function result as a list of contents. google-genai declares image there in every supported release, and adds audio, video and document in 2.33.
Steps to Reproduce:
- Use
Gemini(model="gemini-3-flash-preview", use_interactions_api=True)with aFunctionToolthat returns{"metric": ..., "chart": types.Part.from_bytes(data=png, mime_type="image/png"), "report": types.Part.from_bytes(data=pdf, mime_type="application/pdf")}. - Let the model call the tool, then inspect the next request's
function_resultstep.
Expected Behavior:
The function_result carries the JSON response plus the image and the PDF.
Observed Behavior:
With a real google-genai client (2.34.0) and an httpx.MockTransport that records requests:
FunctionResponse.parts: [('image/png', 18), ('application/pdf', 20)]
function_result on the wire: {'call_id': 'call-1', 'result': {'metric': 'latency'}, 'is_error': False, 'name': 'render_report', 'type': 'function_result'}
Environment Details:
- ADK Library Version (pip show google-adk): 2.13.0 (also on
mainat e9e8f61) - Desktop OS: macOS
- Python Version (python -V): 3.11.16
Model Information:
- Are you using LiteLLM: No
- Which model is being used: Gemini (
gemini-3-flash-preview) through the Interactions API
🟡 Optional Information
Minimal Reproduction Code:
from google.adk.models import interactions_utils
from google.genai import types
part = types.Part(
function_response=types.FunctionResponse(
id="call-1",
name="render_report",
response={"metric": "latency"},
parts=[
types.FunctionResponsePart(
inline_data=types.FunctionResponseBlob(
mime_type="image/png", data=b"\x89PNG..."
)
)
],
)
)
print(interactions_utils._convert_part_to_interaction_content(part))
# {'type': 'function_result', ..., 'result': {'metric': 'latency'}} <- no imageHow often has this issue occurred?:
- Always (100%), whenever a tool returns media on the Interactions API
Activity
sanketpatil06 commentedon Nov 4, 2026
Hi @adityasingh2400, thank you for raising this issue along with clear details and reproduction steps. We have reproduced the issue on the latest main branch. We also appreciate you submitting PR #7885 to fix it, the team will review it. Thank you for your patience and understanding.
fix: send media a tool returns to the Interactions API
adk-bot commentedon Nov 5, 2026
Resolved by #7885 (imported and merged in commit 80bd338). Closing issue.