You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API Error: 400 <provider>: 1 validation error for ResponseInputImageParam
detail
Field required [type=missing, input_value={'type': 'input_image', '...4EEQAAAABJRU5ErkJggg=='}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.13/v/missing
Here is a fix on a fork branch. This repo doesn't take PRs, so I'm leaving it here in case it's useful.
Cause: in internal/gateway/responses.go, the messages→responses translation builds input_image with only type and image_url. That happens in three places: a user message's image and a tool result's image list in buildResponses, and the user message that orphanedToolOutputs builds from a tool output with no call_id. openai-python ≥ 2.10 and the OpenAPI InputImageContent mark detail as required, so validators generated from those types (vLLM's Responses API, for example) return 400.
Change: each of those three places now sends "detail": "auto", which is the default OpenAI applies when detail is left out. Responses→Responses passthrough doesn't change.
Test (internal/gateway/input_image_detail_test.go). With the old responses.go it fails:
--- FAIL: TestResponsesInputImageHasDetail (0.01s)
input_image_detail_test.go:56: input_image without detail: map[image_url:data:image/png;base64,aGVsbG8= type:input_image]
input_image_detail_test.go:56: input_image without detail: map[image_url:data:image/png;base64,d29ybGQhIQ== type:input_image]
--- FAIL: TestOrphanedToolOutputImageHasDetail (0.00s)
input_image_detail_test.go:71: input_image without detail: {"input":[{"content":[{"text":"shot","type":"input_text"},{"image_url":"data:image/png;base64,aGVsbG8=","type":"input_image"}],"role":"user","type":"message"}],"model":"m"}
With the fix, both tests pass.
Checks (Go 1.26.8, linux/amd64, temporary HOME):
gofmt -l on the changed files: no output
GOOS=linux go vet -tags nogui ./..., GOOS=darwin go vet -tags nogui ./..., GOOS=windows go vet ./...: pass
GOOS=linux go build -tags nogui, GOOS=darwin go build -tags nogui, GOOS=windows go build: pass
Plain go vet / go build on linux and darwin: not run successfully. The box has no GTK/WebKit, and there's no cgo for darwin.
go test -tags nogui ./...: everything passes except tests that go through a proxy, which time out in this sandbox: TestPluginModelListThroughAccountProxy (gateway), TestPluginHTTP2TakesTheProxy and TestPluginProxy (plugin). TestPluginModelListThroughAccountProxy fails the same way on unmodified main here.
AI assistance disclosure: an AI coding assistant helped write this fix, the test and this comment. I reviewed the change and ran the checks listed above.
Activity
ump45nose commentedon Oct 10, 2026
Here is a fix on a fork branch. This repo doesn't take PRs, so I'm leaving it here in case it's useful.
Cause: in
internal/gateway/responses.go, the messages→responses translation buildsinput_imagewith onlytypeandimage_url. That happens in three places: a user message's image and a tool result's image list inbuildResponses, and the user message thatorphanedToolOutputsbuilds from a tool output with no call_id. openai-python ≥ 2.10 and the OpenAPIInputImageContentmarkdetailas required, so validators generated from those types (vLLM's Responses API, for example) return 400.Change: each of those three places now sends
"detail": "auto", which is the default OpenAI applies whendetailis left out. Responses→Responses passthrough doesn't change.Test (
internal/gateway/input_image_detail_test.go). With the oldresponses.goit fails:With the fix, both tests pass.
Checks (Go 1.26.8, linux/amd64, temporary HOME):
gofmt -lon the changed files: no outputGOOS=linux go vet -tags nogui ./...,GOOS=darwin go vet -tags nogui ./...,GOOS=windows go vet ./...: passGOOS=linux go build -tags nogui,GOOS=darwin go build -tags nogui,GOOS=windows go build: passgo vet/go buildon linux and darwin: not run successfully. The box has no GTK/WebKit, and there's no cgo for darwin.go test -tags nogui ./...: everything passes except tests that go through a proxy, which time out in this sandbox:TestPluginModelListThroughAccountProxy(gateway),TestPluginHTTP2TakesTheProxyandTestPluginProxy(plugin).TestPluginModelListThroughAccountProxyfails the same way on unmodifiedmainhere.Commit
2033ba78on top ofa5114d93(it merges cleanly onto the current main): main...ump45nose:magpie:fix/1474-input-image-detail(The test file is on the branch.)
AI assistance disclosure: an AI coding assistant helped write this fix, the test and this comment. I reviewed the change and ran the checks listed above.
yetone commentedon Oct 12, 2026
@zacharyxz 感谢详细的根因分析,抱歉这么久才回复。@ump45nose thanks for the fork branch and the failing test, and sorry for the wait.
我核对了当前 main(091593f7d):messages→responses 翻译构造的
input_image仍然只有type和image_url,三处都还在(internal/gateway/responses.go的orphanedToolOutputs约 661 行,buildResponses约 1036、1070 行),所以严格校验的 Responses 上游(vLLM 等)依然会 400,这个问题还没修。ump45nose 的补丁(commit 2033ba7,main...ump45nose:magpie:fix/1474-input-image-detail )正在审查:三处都补
"detail": "auto",加上它的测试。合入时提交会带上 ump45nose 的署名(作者或 Co-authored-by)。合入并发版后会在这里回复版本号,issue 保持打开等你确认。gateway: an image Claude Code sends to a Responses provider carries d…
gateway: the saved Anthropic-to-Responses body carries the image's de…
yetone commentedon Oct 12, 2026
@zacharyxz 已修好:Claude Code 发给 Responses 供应商的图片(
input_image)现在带上detail: "auto",vLLM 这类严格校验的上游不会再因为缺detail回 400。三处构造input_image的地方(用户消息里的图、工具结果里的图、孤立的工具输出)都覆盖了,测试在旧代码上会失败。修复来自 @ump45nose 的补丁,以 TA 为作者合入:bbc7ee0a9;另有 1e080cc 更新了一份保存的上游请求体样例。感谢 @ump45nose!
会随下一个版本发布。这个 issue 先保持打开,等你确认在你的环境里能用了再关。
yetone commentedon Oct 12, 2026
@zacharyxz @ump45nose 图片的
detail: auto已在 v0.1.1219 发布(magpie 里检查更新即可)。麻烦更新后确认一下,有问题直接在这里回复。zacharyxz commentedon Oct 13, 2026
感谢修复,已确认该补丁对
vllm/vllm-openai:nightly (0.30.1rc1.dev396+gac68c3087)部署的POST /v1/responses请求有效。yetone commentedon Oct 13, 2026
感谢在 vLLM nightly 上实测确认 🙏 关闭了,后续 /v1/responses 有别的兼容问题再开。
gateway: an image's detail reaches a Chat or Responses upstream; Resp…