Describe the bug
In version 1.0.0, passing a local file URI (e.g., file:///path/to/file.png) to the image_url field results in a 400 Bad Request validation error. Previously, local file URIs did not trigger this validation failure.
To Reproduce
Send a payload to the ACP containing a local file URI in the image_url parameter:
{
"type": "image",
"mimeType": "image/png",
"data": "[redacted image/png payload as base64]",
"uri": "file:///Users/dmeehan/Desktop/Screenshot.png"
}
Expected behavior
The local file URI should either be accepted and resolved correctly, or ignored if inline data is provided. It should not fail schema validation with a 400 error. It should also handle escaped URI's - e.g. %20 for spaces.
Actual behavior
The API returns a 400 Bad Request response:
{
"type": "error",
"error": {
"type": "invalid_request_error",
"code": "invalid_value",
"message": "Invalid 'input[0].content[0].image_url'. Expected a valid URL, but got a value with an invalid format.",
"param": "input[0].content[0].image_url"
},
"status": 400
}
Environment:
- OS: macOS
- AgentClientProtocol Codex ACP Version: 1.0.0
Additional Context
- In previous versions of Codex ACP, combining
data (base64) along with a file:// URI succeeded. It is possible the uri property was previously ignored when data was present, and v1.0.0 introduced stricter validation that now rejects the file protocol.
- A temporary workaround is to completely omit the file URI and only send the base64 data property.
Describe the bug
In version 1.0.0, passing a local file URI (e.g.,
file:///path/to/file.png) to theimage_urlfield results in a400 Bad Requestvalidation error. Previously, local file URIs did not trigger this validation failure.To Reproduce
Send a payload to the ACP containing a local file URI in the
image_urlparameter:{ "type": "image", "mimeType": "image/png", "data": "[redacted image/png payload as base64]", "uri": "file:///Users/dmeehan/Desktop/Screenshot.png" }Expected behavior
The local file URI should either be accepted and resolved correctly, or ignored if inline data is provided. It should not fail schema validation with a
400error. It should also handle escaped URI's - e.g. %20 for spaces.Actual behavior
The API returns a
400 Bad Requestresponse:{ "type": "error", "error": { "type": "invalid_request_error", "code": "invalid_value", "message": "Invalid 'input[0].content[0].image_url'. Expected a valid URL, but got a value with an invalid format.", "param": "input[0].content[0].image_url" }, "status": 400 }Environment:
Additional Context
data(base64) along with afile://URI succeeded. It is possible theuriproperty was previously ignored whendatawas present, and v1.0.0 introduced stricter validation that now rejects thefileprotocol.