anyone has claude code fixed template?

#37
by gopi87 - opened

kindly share it here

Replace the block of thinking in the file chat_template.jinja with this one (it redirects Claude Code requests with the High level to the model’s existing XHigh level):

{%- if enable_thinking is undefined or enable_thinking is true %}
{%- set raw_reasoning_effort = reasoning_effort|default('xhigh') %}
{%- set resolved_reasoning_effort = 'xhigh' if raw_reasoning_effort in ('high', 'xhigh') else raw_reasoning_effort %}
{%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}
{{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}
{%- endif %}
{%- if resolved_reasoning_effort == 'xhigh' %}
{%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
{%- elif resolved_reasoning_effort == 'low' %}
{%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
{%- endif %}
{%- endif %}

Replace the block of thinking in the file chat_template.jinja with this one (it redirects Claude Code requests with the High level to the model’s existing XHigh level):

{%- if enable_thinking is undefined or enable_thinking is true %}
{%- set raw_reasoning_effort = reasoning_effort|default('xhigh') %}
{%- set resolved_reasoning_effort = 'xhigh' if raw_reasoning_effort in ('high', 'xhigh') else raw_reasoning_effort %}
{%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}
{{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}
{%- endif %}
{%- if resolved_reasoning_effort == 'xhigh' %}
{%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
{%- elif resolved_reasoning_effort == 'low' %}
{%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
{%- endif %}
{%- endif %}

let me try it

Sign up or log in to comment