Skip to content

feat(app): normalize multiple image input shapes - #10

Merged
peach0x33a merged 1 commit into
peach0x33a:masterfrom
wuyougan:dev
Oct 2, 2026
Merged

peach0x33a merged 1 commit into
peach0x33a:masterfrom
wuyougan:dev

Conversation

@wuyougan

@wuyougan wuyougan commented Oct 2, 2026

Copy link
Copy Markdown

Clients send images in several shapes:

  • image_url (string)
  • input_image (Responses)
  • image.source (Anthropic)
    that were previously rejected, breaking vision support for those clients.

ContentPart.UnmarshalJSON now normalizes all of them to the canonical {"type":"image_url","image_url":{"url":...}} form through methods on rawContentPart. The upstream wire format and remote-URL rejection are unchanged.

README.md and TestContentPartNormalizesImageShapes cover the new shapes.

Clients send images in several shapes — string image_url, Responses input_image, and Anthropic image.source — that were previously rejected, breaking vision for those clients. ContentPart.UnmarshalJSON now normalizes all of them to the canonical {"type":"image_url","image_url":{"url":...}} form through methods on rawContentPart. The upstream wire format and remote-URL rejection are unchanged; README and TestContentPartNormalizesImageShapes cover the new shapes.
@peach0x33a
peach0x33a merged commit a1f364f into peach0x33a:master Oct 2, 2026
3 checks passed
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.

2 participants