From 185a4ed7a605a8b22ab51beb417c155e85c811ef Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 13:26:45 +0200 Subject: Make thinking a config key, on by default Measured live: with reasoning on, a two-line question took 21 s of thinking before its first token, against about 5 s for questions that needed little. thinking = false in config.toml skips it. Co-Authored-By: Claude Opus 5.5 --- assistant.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assistant.py b/assistant.py index a36d43e..937700a 100644 --- a/assistant.py +++ b/assistant.py @@ -51,6 +51,7 @@ DEFAULTS = { "tell, say you do not know. Never guess them."), "tool_rounds": 3, "temperature": None, # None: the llama-server preset's + "thinking": True, # False skips the model's reasoning "env": {}, } OPEN = {"env"} # free-form tables: replaced whole, not merged @@ -480,7 +481,7 @@ def ask(messages, calls, tools=None): context_size(model) body = {"model": model, "messages": messages, "stream": True, "stream_options": {"include_usage": True}, - "chat_template_kwargs": {"enable_thinking": True}} + "chat_template_kwargs": {"enable_thinking": CFG["thinking"]}} if tools: body["tools"] = tools if CFG["temperature"] is not None: -- cgit v1.2.3