HeadlinesBriefing favicon HeadlinesBriefing.com

Tuning Model Reasoning in OpenWebUI with chat_template_kwargs

DEV Community •
×

Developers running llama.cpp models through OpenWebUI can now directly control reasoning depth. A new `chat_template_kwargs` parameter accepts a `reasoning_effort` setting—low, medium, or high. This provides predictable control over how thoroughly the model processes complex queries, moving beyond prompt engineering tricks.

Passing this parameter from OpenWebUI's model configuration ensures consistent behavior across all chats. The approach aligns with how many inference servers interpret chat template values. It's a practical solution for users who need different reasoning strengths for varied tasks, from quick answers to deep analysis.

To set it, navigate to Admin Panel → Settings → Models, select your model, and add `chat_template_kwargs` with a JSON value like `{"reasoning_effort": "high"}`. This configuration persists for the model, eliminating per-chat manual adjustments. The system sends it directly to the OpenAI-compatible endpoint.

Choosing the right level balances speed and depth. Low offers fast, minimal reasoning, while high drives thorough, multi-step thinking at a slower pace. Starting with medium is recommended for most cases, reserving high for complex problem-solving where detailed reasoning is critical.