hard coded reasoning_effort field from the api payload and force it into the jinja kwargs (request by @henk717). field name also hardcoded.

This commit is contained in:
Concedo 2026-05-06 17:35:26 +08:00
parent 2905c6254f
commit 15e86c4f9b

View file

@ -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: