148 return params.grammar.empty()
149 &&
params.grammar_from_tier
150 && !
params.resolved_grammar_key.empty();
162 const char* name =
"none";
Configuration structs with defaults.
Generation output with metrics.
Activate model on GPU (WARM → ACTIVE).
bool tier_grammar_unresolved(const GenerationParams ¶ms)
A TIER named a grammar and nothing resolved it (gh#154).
const char * grammar_source_name(GrammarSource source)
Stable wire name for a grammar source.
@ optional
optional: every escape asks the host's path approver
bool grammar_sources_collide(const std::string &request_grammar, const std::string &tool_grammar)
Whether both sources are active — a config error worth reporting.
GrammarSource
Which source, if any, constrains the decode.
@ request
GenerationParams::grammar (COMMON_GRAMMAR_TYPE_USER)
@ tool_call
Render-derived (COMMON_GRAMMAR_TYPE_TOOL_CALLS, needs prefill)
@ tier
The TIER's identity frontmatter grammar: stem (gh#154).
@ count
Sentinel — MUST remain last.
bool is_request_grammar(GrammarSource source)
Whether a source is applied as a request-side grammar.
GrammarSource resolve_grammar_source(const std::string &request_grammar, const std::string &tool_grammar, bool request_from_tier=false)
Resolve which grammar wins.
@ none
Child tools share the session's working dir (default)
GrammarProvenance describe_grammar(const GenerationParams ¶ms, const std::string &tool_grammar)
Describe what constrained one decode, for the result record (gh#154).
constexpr int grammar_source_count()
Number of declared grammar sources, sentinel excluded.
Generation parameters for a single inference call.
What constrained one decode, and what asked for it (gh#154).
std::string source
"request" | "tier" | "tool_call" | "none".