[PR #9319] feat: Add support for json schema in run command: opencode run --json <json schema> #13073

Closed
opened 2026-02-16 18:17:57 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9319

State: closed
Merged: No


Fixes #9320

What does this PR do?

Allows you to constrain run commands output to a specific JSON schema.

  • Inspired by llama.cpp's functionality
  • Utilizes passed in model
  • Throws error if used with "--format json"

How did you verify your code works?

image
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9319 **State:** closed **Merged:** No --- Fixes #9320 ### What does this PR do? Allows you to constrain run commands output to a specific JSON schema. * Inspired by llama.cpp's functionality * Utilizes passed in model * Throws error if used with "--format json" ### How did you verify your code works? <img width="1078" height="390" alt="image" src="https://github.com/user-attachments/assets/92d502f7-8083-4dbd-ad57-611608ce7587" />
yindo added the pull-request label 2026-02-16 18:17:57 -05:00
yindo closed this issue 2026-02-16 18:17:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13073