Skip to content

feat: multimodal ContentPart message input (text + inline images) - #9

Merged
jkyberneees merged 2 commits into
mainfrom
feat/multimodal-input
Sep 19, 2026
Merged

jkyberneees merged 2 commits into
mainfrom
feat/multimodal-input

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Adds ordered text + inline-image parts on user messages.

  • ContentPart/TextPart/ImagePart on Message.Parts (user role only; cannot combine with Content)
  • Serializers for all four wire formats: OpenAI data-URL parts, Anthropic base64 source blocks, Gemini inlineData, Responses input_image
  • image/jpg alias normalized to image/jpeg on the wire
  • Empty text parts rejected; per-image 10 MiB and aggregate 32 MiB caps enforced before network I/O
  • Backwards-compatible: text-only requests serialize identically

Adversarial review findings fixed (wire normalization, empty-part validation, indexed cap error); independent verification CLEAN; full suite + race green.

- normalize image/jpg alias to image/jpeg on the wire for all four formats
  (Anthropic and Gemini reject the informal alias)
- reject empty text parts at validation (Anthropic/Gemini emit invalid
  degenerate blocks otherwise)
- aggregate image-cap error carries the message index
- README documents part rules, caps, and MIME normalization
@jkyberneees
jkyberneees merged commit 72c0471 into main Sep 19, 2026
7 checks passed
@jkyberneees
jkyberneees deleted the feat/multimodal-input branch September 19, 2026 12:38
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.

1 participant