Skip to content

Input field (enum ResponsesInput) validation error #150

Description

@peshovec

Description

Hello, i am trying to wire opencode, oh-my-pi to agentic-api and hit some issues.
Was able to reproduce the very same error with simple curls.

`curl http://10.24.0.111:9000/v1/responses -H "content-type: application/json" -d '{"input":[{"role":"user","content":[{"type":"input_text","text":"hi new"}]}],"model":"dummy"}'

{"error":{"code":"invalid_request_error","message":"json error: data did not match any variant of untagged enum ResponsesInput at line 1 column 76","type":"invalid_request_error"}}`

As advised by deepwiki - passed the "type":"message" to the body

curl http://10.24.0.111:9000/v1/responses -H "content-type: application/json" -d '{"input":[{"type":"message","role":"user","content":[{"type":"input_text","text":"hi new"}]}],"model":"dummy"}'
this works

Steps to reproduce

  1. run simple curl with input key in the body the same format as oh-my-pi
    curl http://10.24.0.111:9000/v1/responses -H "content-type: application/json" -d '{"input":[{"role":"user","content":[{"type":"input_text","text":"hi new"}]}],"model":"dummy"}'

  2. observe error
    {"error":{"code":"invalid_request_error","message":"json error: data did not match any variant of untagged enum ResponsesInput at line 1 column 76","type":"invalid_request_error"}}

  3. error from the agentic-api log (i added request body logging when building the container myself, to make my troubleshooting easier)
    `2026-07-30T07:00:54.523587Z TRACE axum::serve: connection 10.0.2.100:46524 accepted
    2026-07-30T07:00:54.523924Z DEBUG agentic_server::handler::common:
    received request body

body={"input":[{"role":"user","content":[{"type":"input_text","text":"hi new"}]}],"model":"dummy"}
2026-07-30T07:00:54.523993Z WARN agentic_server::handler::common: executor error (400 Bad Request): json error: data did not match any variant of untagged enum ResponsesInput at line 1 column 76`

Expected behavior

Honestly did not know what is the expected as i read the open responses schema validation can be very strict.
Probably a runtime parameter can "loose" it strictness or likewise.

Actual behavior

agentic-api reject the re`uest body with executor 400 error, due to malformed input key in the body

Environment

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions