Skip to content

Conversation

@blackgirlbytes
Copy link
Contributor

Summary

Fixes #6983

The Google/Gemini provider was silently dropping images attached to user messages in the CLI because the Image variant fell through to the catch-all case in format_messages().

Changes

  • Added handling for Image content in format_messages() using the inline_data format expected by Google API
  • Added test to verify the fix

Technical Details

The fix uses the same inline_data structure already used for images in tool responses, ensuring consistency with Google Gemini API specification.

Testing

  • All 23 google format tests pass
  • New test verifies image messages are properly formatted with inline_data.mime_type and inline_data.data

Fixes #6983

The Google/Gemini provider was silently dropping images attached to user
messages because MessageContent::Image fell through to the catch-all
 case in format_messages().

This adds handling for MessageContent::Image using the same inline_data
format already used for images in tool responses.
Copilot AI review requested due to automatic review settings February 5, 2026 16:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where the Google/Gemini provider was silently dropping images attached to user messages in the CLI. The fix adds proper handling for MessageContent::Image in the format_messages() function using the same inline_data format already used for images in tool responses.

Changes:

  • Added MessageContent::Image handling in format_messages() to format images with inline_data structure expected by Google API
  • Added test case to verify image messages are properly formatted with mime_type and data fields

@jh-block jh-block added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit b4e5d64 Feb 5, 2026
23 checks passed
@jh-block jh-block deleted the fix/google-image-support branch February 5, 2026 16:52
kuccello pushed a commit to kuccello/goose that referenced this pull request Feb 7, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
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.

Google/Gemini provider missing MessageContent::Image support for user messages

2 participants