Skip to content

feat(gemini): Phase 4 -- vision / multimodal (inlineData)#1655

Merged
bug-ops merged 1 commit intomainfrom
feat-gemini-phase-4-vision-mul
Mar 13, 2026
Merged

feat(gemini): Phase 4 -- vision / multimodal (inlineData)#1655
bug-ops merged 1 commit intomainfrom
feat-gemini-phase-4-vision-mul

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 13, 2026

Summary

  • Converts MessagePart::Image to Gemini inlineData parts ({ "inlineData": { "mimeType": "...", "data": "<base64>" } })
  • Multiple images per message and mixed text + image parts both supported
  • supports_vision() now returns true
  • 4 new unit tests: single image conversion, multiple images, mixed text+image, camelCase serialization

Closes #1596. Part of epic #1592.

Test plan

  • cargo nextest run -p zeph-llm — all 5231 tests pass
  • cargo clippy --workspace --features full -- -D warnings — clean
  • cargo +nightly fmt --check — clean
  • test_image_part_converted_to_inline_data verifies base64 encoding + mimeType round-trip
  • test_multiple_images_in_single_message verifies 2 images produce 2 inlineData parts
  • test_mixed_text_and_image_parts verifies text and image parts coexist in correct order
  • test_inline_data_serializes_to_camel_case verifies inlineData/mimeType JSON field names

@github-actions github-actions bot added enhancement New feature or request documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes size/M Medium PR (51-200 lines) and removed enhancement New feature or request labels Mar 13, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 13, 2026 16:53
Wire up MessagePart::Image conversion to Gemini inlineData parts format.
- Add GeminiInlineData struct with camelCase serde serialization
- Add inline_data field to GeminiPart
- Handle MessagePart::Image in convert_message_parts (base64-encode raw bytes)
- Set supports_vision() to true
- Add unit tests: single image, multiple images, mixed text+image, serialization

Closes #1596. Part of epic #1592.
@bug-ops bug-ops force-pushed the feat-gemini-phase-4-vision-mul branch from b9c72f2 to 282d445 Compare March 13, 2026 17:04
@github-actions github-actions bot added the enhancement New feature or request label Mar 13, 2026
@bug-ops bug-ops merged commit 5ce62f1 into main Mar 13, 2026
15 checks passed
@bug-ops bug-ops deleted the feat-gemini-phase-4-vision-mul branch March 13, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request llm zeph-llm crate (Ollama, Claude) rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(gemini): Phase 4 -- vision / multimodal (inlineData)

1 participant