Skip to content

Fix Responses API image forwarding - #1

Open
City-Zero wants to merge 2 commits into
Liki4:masterfrom
City-Zero:fix/responses-input-image-forwarding
Open

Fix Responses API image forwarding#1
City-Zero wants to merge 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.

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