Skip to content

Bug: Regression: image_url validation fails for local file URIs (file:// protocol) in v1.0.0 #231

Description

@dmeehan1968

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions