Feature description
Add high-level helpers for structured JSON generation, building on the existing grammar/GBNF capabilities.
Motivation
Many app integrations need reliable machine-readable output. Users should not have to manually write grammars or prompt wrappers for common JSON-object / JSON-schema use cases.
Proposed scope
- Provide an ergonomic API for strict JSON-object generation.
- Consider JSON Schema to grammar/GBNF conversion for a practical MVP subset.
- Add validation and helpful errors when a schema cannot be represented safely.
- Make the helper compatible with streaming where possible, or clearly document limitations.
- Include examples for extraction/classification-style app tasks.
Related work
Acceptance criteria
- Public API docs explain supported schema features and limitations.
- Examples demonstrate generating typed JSON and validating the final output.
- Tests cover success, invalid schema, and malformed model-output cases.
Feature description
Add high-level helpers for structured JSON generation, building on the existing grammar/GBNF capabilities.
Motivation
Many app integrations need reliable machine-readable output. Users should not have to manually write grammars or prompt wrappers for common JSON-object / JSON-schema use cases.
Proposed scope
Related work
Acceptance criteria