opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: Support for Structured Outputs in the OpenCode SDK

Open K-Mistele opened this issue 1 month ago • 5 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I would love to use opencode for some existing workflows we have which currently depend on the Claude Code SDK's structured output feature which allows generating JSON (generateObject-style) from an extant session:

https://platform.claude.com/docs/en/agent-sdk/structured-outputs

Any change this would be possible to add to OpenCode?

K-Mistele avatar Dec 16 '25 17:12 K-Mistele

This issue might be a duplicate of existing issues. Please check:

  • #992: AI_APICallError: "stream=true" with structured outputs is currently not supported for reasoning models.

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Dec 16 '25 17:12 github-actions[bot]

Possible once https://github.com/sst/opencode/pull/5463 is merged.

The experimental client does no support structure.

seuros avatar Dec 16 '25 18:12 seuros