opencode
opencode copied to clipboard
[FEATURE]: Support for Structured Outputs in the OpenCode SDK
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?
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.
Possible once https://github.com/sst/opencode/pull/5463 is merged.
The experimental client does no support structure.