Skip to content

feat(adk): support multimodal input types (image/audio/video/document) - #1410

Merged
contextablemark merged 8 commits into
mainfrom
claude/assess-issue-1405-uLLFN
Apr 2, 2026
Merged

feat(adk): support multimodal input types (image/audio/video/document)#1410
contextablemark merged 8 commits into
mainfrom
claude/assess-issue-1405-uLLFN

Conversation

@contextablemark

@contextablemark contextablemark commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add support for the newer modality-specific input types (ImageInputContent, AudioInputContent, VideoInputContent, DocumentInputContent) in the ADK middleware converter, replacing reliance on the deprecated BinaryInputContent
  • InputContentDataSource (inline base64) maps to Part(inline_data=Blob(...)) and InputContentUrlSource (HTTPS/GCS URLs) maps to Part(file_data=FileData(file_uri=...)), leveraging ADK's native URI support
  • Legacy BinaryInputContent continues to work for backward compatibility
  • Fix: Disable save_input_blobs_as_artifacts in RunConfig — ADK's runner was replacing inline image data with artifact text placeholders before the model could see them, causing the model to say "I cannot see the image"
  • Adds E2E tests gated on GOOGLE_API_KEY covering inline images, document URLs, multi-image messages, and mixed text+image content
  • Adds test_multimodal_live.py interactive script for manual multimodal testing against a running server

Closes #1405

Test plan

  • 55 unit tests pass (8 new for multimodal types + 47 existing)
  • 4 E2E tests pass against live Gemini 2.5 Flash (inline image, two images, document URL, colour-stripe image)
  • E2E tests skip cleanly when GOOGLE_API_KEY is absent
  • No regressions in existing ADK middleware test suite (59 tests pass)
  • Manual end-to-end verification: image sent via HTTP → model correctly identifies colour as "Red"

🤖 Generated with Claude Code

claude and others added 5 commits April 1, 2026 18:24
…document)

Replace reliance on deprecated BinaryInputContent with support for the
newer modality-specific types: ImageInputContent, AudioInputContent,
VideoInputContent, and DocumentInputContent. Both InputContentDataSource
(inline base64 → Part.inline_data) and InputContentUrlSource (URI →
Part.file_data) are now handled, leveraging ADK's native URI support.
Legacy BinaryInputContent continues to work for backward compatibility.

Closes #1405

https://claude.ai/code/session_01RavM3Kc8e7nGXrhQ5LikEY
Add end-to-end tests that send real multimodal content to Google Gemini
through the ADK middleware. Tests are gated on GOOGLE_API_KEY and skipped
when the key is absent.

Covers:
- Inline base64 image → model describes dominant colour (red PNG)
- Two inline images compared → model identifies both colours
- URL-based image (Wikimedia Commons apple) → model identifies subject
- Mixed text + inline image → model answers question about image

https://claude.ai/code/session_01RavM3Kc8e7nGXrhQ5LikEY
Add end-to-end tests that send real multimodal content to Google Gemini
through the ADK middleware. Tests are gated on GOOGLE_API_KEY and skipped
when the key is absent.

Covers:
- Inline base64 image (256x256 solid red) → model acknowledges image
- Two inline images (red + blue) → model acknowledges both
- Document via HTTPS URL (RFC 2549 text) → model summarizes content
- Mixed text + image (colour stripes) → model identifies stripe colours

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add end-to-end tests that send real multimodal content to Gemini 2.5
Flash through the ADK middleware. Tests are gated on GOOGLE_API_KEY.

Covers:
- Inline base64 image (256x256 solid red) - model acknowledges image
- Two inline images (red + blue) - model acknowledges both
- Document via HTTPS URL (RFC 2549 text) - model summarizes content
- Mixed text + image (colour stripes) - model identifies stripe colours

Also adds an Unreleased section to CHANGELOG.md describing the new
multimodal input type support added in the prior commit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ag-ui-dojo Ready Ready Preview, Comment Apr 2, 2026 5:07am

Request Review

github-actions[bot]
github-actions Bot previously approved these changes Apr 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: PR author contextablemark has CODEOWNERS access to all changed files (excluding root rule)

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Python Preview Packages

Version 0.0.0.dev1775106306 published to TestPyPI.

Warning: These packages are built from contributor code that may not yet have been vetted for correctness or security. Install at your own risk and do not use in production.

Install with uv

Add the TestPyPI index to your pyproject.toml:

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = true

Then install the packages you need:

# Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1775106306' --index testpypi

# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1775106306' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1775106306' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1775106306' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1775106306' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1775106306' --index testpypi

Install with pip

pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  ag-ui-protocol==0.0.0.dev1775106306

Use --extra-index-url https://pypi.org/simple/ so pip can resolve
transitive dependencies (pydantic, fastapi, etc.) from real PyPI.


Commit: 00d0ff5

@pkg-pr-new

pkg-pr-new Bot commented Apr 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@ag-ui/a2a-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a-middleware@1410

@ag-ui/a2ui-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-middleware@1410

@ag-ui/mcp-apps-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-apps-middleware@1410

@ag-ui/middleware-starter

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/middleware-starter@1410

@ag-ui/a2a

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a@1410

@ag-ui/adk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/adk@1410

@ag-ui/ag2

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/ag2@1410

@ag-ui/agno

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/agno@1410

@ag-ui/aws-strands

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/aws-strands@1410

@ag-ui/claude-agent-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-agent-sdk@1410

@ag-ui/crewai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/crewai@1410

@ag-ui/langchain

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langchain@1410

@ag-ui/langgraph

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langgraph@1410

@ag-ui/langroid

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langroid@1410

@ag-ui/llamaindex

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/llamaindex@1410

@ag-ui/mastra

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mastra@1410

@ag-ui/pydantic-ai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/pydantic-ai@1410

@ag-ui/server-starter

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/server-starter@1410

@ag-ui/server-starter-all-features

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/server-starter-all-features@1410

@ag-ui/vercel-ai-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/vercel-ai-sdk@1410

create-ag-ui-app

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/create-ag-ui-app@1410

@ag-ui/client

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/client@1410

@ag-ui/core

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/core@1410

@ag-ui/encoder

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/encoder@1410

@ag-ui/proto

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/proto@1410

commit: 64c8e15

ADK's runner was replacing inline_data parts with artifact text
placeholders ("Uploaded file: artifact_xxx") before the model could
see them, causing the model to report it cannot view images.

Setting save_input_blobs_as_artifacts=False in RunConfig preserves
inline binary data so the model receives actual image/audio/video
content.

Also adds a test_multimodal_live.py script for interactive testing
of multimodal messaging against a running ADK server.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-actions[bot]
github-actions Bot previously approved these changes Apr 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: PR author contextablemark has CODEOWNERS access to all changed files (excluding root rule)

The new multimodal input types (ImageInputContent, AudioInputContent,
etc.) were added in ag-ui-protocol 0.1.15. Without this pin, CI
installs an older version from PyPI which lacks these types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-actions[bot]
github-actions Bot previously approved these changes Apr 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: PR author contextablemark has CODEOWNERS access to all changed files (excluding root rule)

- test_default_run_config_returns_valid_config: expect False instead of
  True now that we preserve inline data for multimodal support
- test_from_app_with_unsupported_mime_type: allow RUN_ERROR since the
  invalid mime type blob now reaches the API instead of being stored
  as an artifact

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: PR author contextablemark has CODEOWNERS access to all changed files (excluding root rule)

@contextablemark
contextablemark merged commit d70978d into main Apr 2, 2026
28 checks passed
@contextablemark
contextablemark deleted the claude/assess-issue-1405-uLLFN branch April 2, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: [adk] Update support for multimodal messaging

2 participants