mirror of
https://github.com/ollama/ollama.git
synced 2026-09-21 13:38:14 -05:00
The runner compiled a format as a JSON Schema, the one grammar kind its xgrammar binding exposed. A structural tag holds a schema as one node of a larger tree and also expresses what a schema cannot: free text around constrained spans, a thinking region that closes before constrained content, tool calls pinned to their schemas. The runner now compiles structural tags only; its client wraps the API's formats into one, which compiles to the same grammar as before. The JSON token and vocabulary caps go with it: neither bounds compile cost, which follows the grammar's state count. The byte and nesting caps stay.