Skip to content

Fix Responses API image forwarding - #1

Merged
Liki4 merged 2 commits into
Liki4:masterfrom
City-Zero:fix/responses-input-image-forwarding
Aug 25, 2026
Merged

Fix Responses API image forwarding#1
Liki4 merged 2 commits into
Liki4:masterfrom
City-Zero:fix/responses-input-image-forwarding

Conversation

@City-Zero

Copy link
Copy Markdown

Problem

Requests to POST /v1/responses that include an input_image part are accepted, but the image is not forwarded in the upstream structured contents field. Multimodal models therefore receive only the accompanying text.

Fix

  • Preserve input_image parts while converting Responses user messages.
  • Convert them to upstream image_url content parts.
  • Keep the existing text conversion unchanged.

Verification

  • Added a regression test for a Responses message containing both input_text and input_image.
  • go test ./...
  • go vet ./...
  • Manually verified /v1/responses with a base64 PNG using dfmodel.

Anthropic Messages and OpenAI Chat multimodal paths were also checked and already forward image content correctly.

@Liki4

Liki4 commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Problem

Requests to POST /v1/responses that include an input_image part are accepted, but the image is not forwarded in the upstream structured contents field. Multimodal models therefore receive only the accompanying text.

Fix

  • Preserve input_image parts while converting Responses user messages.
  • Convert them to upstream image_url content parts.
  • Keep the existing text conversion unchanged.

Verification

  • Added a regression test for a Responses message containing both input_text and input_image.
  • go test ./...
  • go vet ./...
  • Manually verified /v1/responses with a base64 PNG using dfmodel.

Anthropic Messages and OpenAI Chat multimodal paths were also checked and already forward image content correctly.

oh jesus 我没意料到会有人用 orz

@Liki4
Liki4 merged commit a084392 into Liki4:master Aug 25, 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.

3 participants