|
Entropic 2.9.4
Local-first agentic inference engine
|
gh#103 (v2.8.2): family-aware tool-call CLOSE markers, derived from the resolved common_chat format. More...


Go to the source code of this file.
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Functions | |
| std::string | entropic::close_marker_for_format (common_chat_format fmt) |
| Map a resolved common_chat format to its single-tool-call close marker. | |
| void | entropic::append_sequential_stop (GenerationParams ¶ms, const std::string &marker) |
| Append a tool-call close marker to params.stop for sequential mode. | |
gh#103 (v2.8.2): family-aware tool-call CLOSE markers, derived from the resolved common_chat format.
Pure mapping (no model, no I/O) so the vendor-coupled marker table is CPU-unit-testable in isolation. A "sequential" tier appends the returned marker to GenerationParams.stop, so the decode loop halts at the first closed tool call (one tool per turn — observe-between-actions). The marker is RETAINED in the generated content (check_stop_sequences does not truncate), so common_chat still parses the complete <tool_call>…</tool_call> block.
Markers track the vendored PEG parser defaults (extern/llama.cpp/common/chat-peg-parser.cpp:442-443, section_end). They are vendor-coupled and MUST be re-checked on a llama.cpp pin bump and are validated empirically per family by the gh#103 model test. Any format without a confirmed per-call close marker (CONTENT_ONLY, and — conservatively — GEMMA4, whose section_end is not unambiguous in the vendored source) returns "" → the orchestrator injects no stop and the tier keeps the default batch behavior (terminal directives still halt the loop post-parse). "" is always safe: it can never corrupt a parse or fire a spurious stop.
Definition in file tool_call_markers.h.