From 15e86c4f9be34e05ef03fdcfd352a0341127286b Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Wed, 6 May 2026 17:35:26 +0800 Subject: [PATCH] hard coded reasoning_effort field from the api payload and force it into the jinja kwargs (request by @henk717). field name also hardcoded. --- koboldcpp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koboldcpp.py b/koboldcpp.py index 3822c4f1e..59d5dc4f1 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -3995,7 +3995,10 @@ ws ::= | " " | "\n" [ \t]{0,20} jinja_output = None jinjatools = genparams.get('tools', []) if use_jinja and cached_chat_template: - jinja_output = format_jinja(messages_array,jinjatools,cached_jinja_kwargs) + copied_jinja_kwargs = dict(cached_jinja_kwargs or {}) + if "reasoning_effort" in genparams and genparams["reasoning_effort"] is not None: + copied_jinja_kwargs["reasoning_effort"] = genparams["reasoning_effort"] + jinja_output = format_jinja(messages_array,jinjatools,copied_jinja_kwargs) if jinja_output: messages_string = jinja_output for pair in thinkformats: