Description
What happened?
When sending a message via POST /session/:id/prompt_async with a format field:
{
"format": {
"type": "json_schema",
"schema": {
"type": "object",
"properties": {
"status": { "type": "string", "enum": ["created", "needs_info"] },
"summary": { "type": "string" }
},
"required": ["status", "summary"]
},
"retryCount": 2
}
}
The prompt is accepted (204), the LLM runs and completes successfully. But when calling GET /session/:id/message to retrieve messages, the server returns 400:
{"name":"BadRequest","data":{"message":"Expected OutputFormatJsonSchema, got {\"type\":\"json_schema\",\"schema\":{...}}"}}
The format field matches the OutputFormatJsonSchema definition in the OpenAPI spec at GET /doc exactly (type, schema, retryCount with additionalProperties: false). The message listing endpoint's deserialization rejects what the prompt endpoint accepted.
This appears to be a regression in the May 10-11 2026 releases that tightened HTTP API validation. The same workflow worked on versions before May 10.
Plugins
None (using opencode serve as HTTP API server with MCP servers configured via opencode.json)
OpenCode version
1.14.48
Steps to reproduce
Steps to reproduce:
- Start opencode serve --port 4096
- Create a session: POST /session with {"title": "test"}
- Send a prompt with format: POST /session/:id/prompt_async with body containing "format": {"type": "json_schema", "schema": {"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]}, "retryCount": 2}
- Wait for the LLM to complete (poll GET /session/status until not busy)
- List messages: GET /session/:id/message
- Observe 400 Bad Request with "Expected OutputFormatJsonSchema" error
Screenshot and/or share link
No response
Operating System
Linux (OpenShift container), also reproducible on macOS 25.4.0
Terminal
N/A (HTTP API usage via Python httpx client)
Description
What happened?
When sending a message via POST /session/:id/prompt_async with a format field:
The prompt is accepted (204), the LLM runs and completes successfully. But when calling GET /session/:id/message to retrieve messages, the server returns 400:
The format field matches the OutputFormatJsonSchema definition in the OpenAPI spec at GET /doc exactly (type, schema, retryCount with additionalProperties: false). The message listing endpoint's deserialization rejects what the prompt endpoint accepted.
This appears to be a regression in the May 10-11 2026 releases that tightened HTTP API validation. The same workflow worked on versions before May 10.
Plugins
None (using opencode serve as HTTP API server with MCP servers configured via opencode.json)
OpenCode version
1.14.48
Steps to reproduce
Steps to reproduce:
Screenshot and/or share link
No response
Operating System
Linux (OpenShift container), also reproducible on macOS 25.4.0
Terminal
N/A (HTTP API usage via Python httpx client)