Skip to main content

Module structured_output

Module structured_output 

Source
Expand description

Tokenizer-aware hard constraints for structured output.

A factory owns the tokenizer trie and grammar compiler and is shared by an engine. Each request gets an independent matcher with no shared mutable grammar state.

Structs§

StructuredOutputBudgetPlan
Immutable per-request output budget used when a structured grammar starts after a reasoning delimiter.
StructuredOutputFactory
Shared, immutable tokenizer and grammar compilation state.
StructuredOutputMaskOutcome
Allocation-free hot-path result of one structured-output mask operation.
StructuredOutputProcessor
Per-request structured-output parser state.
StructuredOutputProgress
Terminal/debug snapshot that distinguishes activation failures from an incomplete grammar without retaining generated text.

Enums§

StructuredOutputPhase
Typed phase returned after applying a structured-output constraint.
StructuredOutputTokenClass
Privacy-safe lexical class for the tail of an incomplete grammar.