]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
server : move chat-template thinking probe inside the init try/catch (#24093)
authorJesse LaRose <redacted>
Thu, 9 Jul 2026 16:37:39 +0000 (12:37 -0400)
committerGitHub <redacted>
Thu, 9 Jul 2026 16:37:39 +0000 (18:37 +0200)
commit82fce65d8be40ba55048e06f2e14a01deb363d41
treedd3cf26fe3c9f6c0bc0815f7d51c5a4bc969b0f6
parent5c3a586860360394524d83f963a4a88ea08cce2d
server : move chat-template thinking probe inside the init try/catch (#24093)

A model whose chat template parses at init but fails parser generation
at apply time (e.g. uses {% call %}) throws std::invalid_argument from
common_chat_templates_support_enable_thinking(), which ran outside the
try/catch guarding common_chat_templates_init(). The throw was uncaught
and llama-cli aborted (SIGABRT) instead of failing to load. Moved the
probe inside that try/catch so an apply-time error fails load the same
way an init parse error does.

Signed-off-by: Jesse LaRose <redacted>
tools/server/server-context.cpp