|
Entropic 2.11.1
Local-first agentic inference engine
|
Which grammar source constrains a decode (gh#134). More...
#include <string>

Go to the source code of this file.
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Enumerations | |
| enum class | entropic::GrammarSource { entropic::none , entropic::request , entropic::tool_call , entropic::count } |
| Which source, if any, constrains the decode. More... | |
Functions | |
| constexpr int | entropic::grammar_source_count () |
| Number of declared grammar sources, sentinel excluded. | |
| GrammarSource | entropic::resolve_grammar_source (const std::string &request_grammar, const std::string &tool_grammar) |
| Resolve which grammar wins. | |
| bool | entropic::grammar_sources_collide (const std::string &request_grammar, const std::string &tool_grammar) |
| Whether both sources are active — a config error worth reporting. | |
Which grammar source constrains a decode (gh#134).
Entropic has two grammar sources and they cannot compose — they constrain output to different languages:
GenerationParams::grammar, also fed by grammar_key and identity grammar:)common_chat_templates_applyKept as a pure function with no vendor types so the precedence rule — the only part carrying judgment — is unit-testable without a model. Before v2.10.4 the tool-call source was discarded at the render entirely, so a tools-staged tier decoded unconstrained; see llama_cpp_backend.cpp.
Definition in file grammar_source.h.