Skip to content

[DOCS] Sending images to an ADK agent (vision models) #810

Closed

Description

Summary

The Go ADK now forwards image FileParts on user messages to the configured LLM as an OpenAI-compatible image_url content part, so an ADK agent can read images (for example a captcha) when the operator configures a vision-capable model. Implemented in inference-gateway/adk#325 (closes inference-gateway/adk#117).

Behavior to document:

  • A client attaches an image with types.CreateFilePart(name, "image/png", &base64Bytes, nil) or with fileWithUri.
  • fileWithBytes is inlined as a data:<mediaType>;base64,<bytes> URL; fileWithUri is passed through unchanged, so the provider itself must be able to fetch that URL.
  • Text and image parts are sent in the same order they appear in the A2A message.
  • Only image/* on user-role messages is forwarded. Other media types (PDF, audio) are skipped, and agent-role file parts are never sent, because OpenAI-compatible assistant messages cannot carry images.
  • The operator picks the model via AGENT_CLIENT_MODEL. A model without vision support rejects the request and the task ends as failed with the provider error.
  • Agents that accept images should advertise them on the agent card, e.g. DefaultInputModes: ["text/plain", "image/png"].
  • Works with WithDefaultTaskHandlers() and with custom handlers calling RunWithStream, no extra configuration.

Affected pages: the Go ADK / A2A agent-building guides (message parts, LLM/model configuration, agent card input modes).

Acceptance Criteria

  • A short "sending images to an agent" section with the client snippet
  • Note that a vision-capable model must be configured, and that a non-vision model fails the task with the provider error
  • Note the DefaultInputModes guidance for image-accepting agents
  • Note the fileWithUri reachability caveat (internal artifact-server URLs are typically not reachable by hosted providers)

Activity

  1. added
    documentation
    on Sep 26, 2026
  2. moved this to Todo in 2026on Sep 26, 2026
  3. edenreich commented on Sep 26, 2026

    @edenreich
    Contributor

    @claude Can you document this?

  4. added theissue type on Sep 26, 2026
  5. inference-gateway-maintainer commented on Sep 26, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 1m 43s —— View job • docs/issue-810-20260926-0103 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-810-20260926-0103?quick_pull=1&title=Issue%20%23810%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23810%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documented image input for ADK agents

    • Read issue + repo conventions
    • Picked the page: adk.md, new ### Sending images to an agent under The A2A client
    • Wrote the section (client snippet, bytes-vs-URI, ordering, forwarding rules, model, agent card)
    • bun run lint:md, bun run format:check, bun run build - all pass
    • Committed and opened PR docs(adk): document image input for vision models #811

    Covers all four acceptance criteria: the client snippet with types.CreateFilePart, the vision-model requirement and failed task on a non-vision model, DefaultInputModes guidance, and the fileWithUri reachability caveat (internal artifact-server URLs are usually unreachable from hosted providers).

    PR: #811
    | Branch

  6. inference-gateway-releaser commented on Sep 26, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.17 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions