From 310701ba1bebc21384383558e0e410be5dbc7736 Mon Sep 17 00:00:00 2001 From: Pierre F Date: Thu, 28 Aug 2025 22:23:18 +0200 Subject: [PATCH] fixed crash with "auto" mode, trigger was missing --- common/chat.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/chat.cpp b/common/chat.cpp index ff4ca39ad7..89fbf479b8 100644 --- a/common/chat.cpp +++ b/common/chat.cpp @@ -1835,6 +1835,10 @@ static common_chat_params common_chat_params_init_hermes_2_pro(const common_chat //thinking grammar logic depending on if thinking_forced_open was to true (so already opened (and maybe closed)) and if thinking is even allowed std::string thinking_grammar_logic = ""; // thinking tag was closed or not supported/wanted if (extra_context["enable_thinking"]) { + data.grammar_triggers.push_back({ + COMMON_GRAMMAR_TRIGGER_TYPE_WORD, + data.thinking_forced_open ? "" : "" + }); if (data.thinking_forced_open) { //thinking tag was already opened by used so we don't need to add it again thinking_grammar_logic = "(thinking-content thinking-end) ";