ADR 0053: The model’s thinking shown
Date: 2026-10-04. Status: accepted. Amended on 2026-10-11: thinking chosen per model and per call (below). Amended on 2026-11-01: thinking written into the reply (at the end). Amended on 2026-11-16: off on llama.cpp sends a budget of 0 (at the end).
Context
A reasoning model thinks before it answers. Ollama streams that thinking as message.thinking chunks whether or
not the request sets think: probed on 2026-10-04 with ornith:9b against /api/chat with streaming on, “Is 91
prime? One word.” gave 42 thinking chunks and then 2 chunks of reply, and the same pattern with think: true. On
this Mac the models that report thinking among their capabilities are qwen3.8:27b, gemma4:12b, gemma4:26b,
and ornith:9b.
wisp’s Ollama executor decoded only content and tool_calls. The thinking was dropped, the turn looked idle for as
long as the model thought, and usage reported reasoningTokenCount: 0, hard-coded. ThreadRecord already had a
.reasoning entry kind, unused.
Two facts about the framework, probed on 2026-10-04 with a scripted executor:
- The executor channel has a reasoning event (
.reasoning(action: .appendText(_:tokenCount:))). The session keeps what it carries as aTranscript.Reasoningentry before the reply, and usage’sreasoningTokenCountcounts it. streamResponseyields a snapshot only when the reply’s text changes, so a model that thinks yields nothing until it answers. A face cannot learn that the model is thinking from the stream. A task-local value bound aroundstreamResponseandrespondis visible inside the executor.
What /api/chat’s think accepts was read from the installed Ollama 0.35.1 binary on 2026-10-04, from its own
refusal message: invalid think value: %q (must be "high", "medium", "low", "max", true, or false).
Decision
- The executor decodes the thinking and sends each chunk to the framework as a reasoning event, so the session keeps it as a reasoning entry. Ollama reports no count of its own for thinking and streams a token a chunk, so the chunks are its reasoning tokens in the request’s usage.
- The turn is told as it happens, through wisp’s own channel.
Agentbinds aReasoningObserveras a task local around each turn’s requests; the executor’sThinkingStretchtells it when thinking begins (the first thinking chunk) and ends (the first reply or tool-call chunk, or the end of the stream). The observer recordsmodel.reasoningat both edges:phasestart, andphaseendwith the text verbatim, its bytes, tokens, and seconds. Calls outside a turn (distillation, the summary, an assessment) have no observer and record nothing. - Every face shows it from those events.
ChatActivitysaysthinkingwhile it lasts; the plain chat’s working line reads… 9 s · thinking (6 s), one line redrawn each second as before rather than an animation, which its line-based output does not suit.wisp chat --json’sactivityline gainsthinking: true.wisp-tui’s busy box draws the operator’s thought bubble (2026-10-04):.,.o,.oO,.oO( thinking ),.oO( thinking. ),.oO( thinking.. ),.oO( thinking... ), then the last four looping, a frame every 280 ms, the loop waking for each frame. When thinking ends, chat shows∴ thought for 4.2 s, 42 tokenswith the thinking folded under it as a tool’s output is, and the JSONeventline carries it asoutput, whichwisp-tuifolds the same way. - Kept for the person, never for the model. The store keeps the thinking as the turn’s
.reasoningentry, linked to itsmodel.reasoningendevent.ContextComposerleaves every reasoning entry out of every request, the turn’s own included; condensing leaves it where it is;memoryrecalls it only as “(the model’s thinking, kept for the person and not recalled)”; and the Ollama executor never sends one back./showtakes its entry number or event id,/inspect thinking [N]shows every stretch or a turn’s, and over MCPwisp://threads/{thread_id}/reasoninglists them and…/reasoning/{id}reads one. ollama.think, a setting:true,false,low,medium,high, ormax, sent asthinkonly to a model that reportsthinking; unset sends nothing and leaves the model’s default. It is Ollama’s setting, underollama, sincemodelis a model name and the other backends have no such switch yet.
Consequences
- Time a reasoning model spends thinking reads as thinking, and its tokens are counted.
- A turn after one that thought starts a new session, because the session holds a reasoning entry the composition leaves out. That costs nothing with Ollama, whose executor sends every message each request; an in-process runtime that keeps its processed prefix (MLX) should compare without reasoning entries when that matters.
- Within a turn the framework’s session still holds the turn’s reasoning entries between requests of its tool loop; whether a runtime sees them is its executor’s choice, and Ollama’s sends none.
- Core AI and MLX report thinking the same way when their executors send reasoning events through a
ThinkingStretch; that is left to their own work. - Tests without a model: the Ollama stream with thinking chunks (decoded, counted, audited, linked, not sent back,
thinkin the body only when configured and offered), the stretch’s edges, the activity and the protocol flag, the rendered line and fold,/showand/inspect thinking, recall, condensing, the MCP resources, and inwisp-tuithe frames, their order and loop, the wake, the box, and the panel.
Refined 2026-10-06: MLX’s thinking shown. wisp’s MLX executor now does what the Ollama executor does, through
the same ThinkingStretch. MLX streams one text, so the thinking is split from it by the chat template’s own tags,
read from the template rather than assumed: the first tag with think in its name whose closing tag the template
also holds (<think> and </think> in Qwen3’s). PrefixEngine splits each streamed chunk
(ThinkingSplitter: a tag split across chunks held until whole, the template’s newlines around a tag dropped,
unclosed thinking kept as thinking, a tool call ending it) and starts inside the block when the rendered prompt’s
end has an unclosed opening tag, as a template that writes it into the generation prompt leaves it. The executor
sends the thinking as reasoning events, counts a token a chunk within the tokens generated, and tells the turn’s
observer at both edges; the composition leaves the reasoning entry out as for Ollama, so no request carries it.
mlx.think (true or false) sets the template’s enable_thinking for a model whose template takes it, overriding
the declared reasoning that set it before; it has no levels, since the template’s flag has none. The prefix cache
is unaffected: the slot keeps the rendered prompt, which never holds the thinking. Probed on this Mac on
2026-10-06 with mlx:Qwen3-1.7B-4bit and mlx.think: true: 181 tokens of thinking in 2.0 s, shown and folded, and the
reply No. without a tag; mlx.think: false gave a 6-token reply with no thinking.
What mlx.think unset means changed the same day (ADR 0052, refined 2026-10-06,
“the MLX gap”): a model declared reasoning is still asked to think, and any other is left to its template’s default
instead of being told not to, as an unset ollama.think leaves a model to Ollama; a schema reply thinks first.
Amendment, 2026-10-11: thinking chosen per model and per call. ollama.think, mlx.think, and llamacpp.think
applied to every request to every model of their runtime. The granite comparison of 2026-10-09 and 2026-10-10
(measurements.md, “granite4.1 against granite4.2, with and without thinking”) showed what that
cost: granite4.2:8b thinking matched granite4.1:8b on every delegation suite at 4 to 15 times the time (a median of
34.7 s against 9.0 s a case of edit_file, 5.3 s against 0.3 s a schema reply, 14.4 s against 3.0 s a classifier
verdict, its classifier half alone about six hours), and with ollama.think false it matched 4.1’s speed on the
tools and got every draft right. Turning ollama.think off would have taken thinking from gemma4:12b and
qwen3.8:27b too. The operator asked on 2026-10-10 for thinking to be chosen per model and per call.
- Per model first.
<runtime>.models.<name>.thinkbeside the model’scontextLength:ollama.models.<name>.thinktakes whatollama.thinktakes (true,false,low,medium,high,max);mlx.models.<name>.thinkandllamacpp.models.<name>.thinktaketrueorfalse; each is validated as the runtime’s setting is, andlmstudio.models.<name>.thinkis refused at load, since LM Studio sets thinking per model in its app. A model’s own setting comes ahead of the runtime’s; an Ollama name is found with or without its:latesttag; an MLX entry that sets onlythinkdeclares nothing, as one that sets only a window does.wisp config set,/config set, andwisp configtake them;wisp modelsshows the default a model is sent beside itsthinkingcapability, asthinking (false). - Per call: wisp’s own calls ask for no thinking. A request-scoped choice,
RequestThinking.current, a task local as the turn’sReasoningObserveris, which each executor reads as it builds a request: Ollama’sthink, llama.cpp’schat_template_kwargs.enable_thinking, MLX’s template flag. Nothing in the configuration changes. The calls that ask for none, throughRequestThinking.sideCall, which also unbinds the observer as before: the model classifier’s verdict (ModelRiskClassifier), the fact distiller and the running summary (both fromhandOn), the assessment, and, since 2026-10-12, each chunk ofmemory’scondense(WispThread.condenserAsk, whose fresh session is also toldthinkingoff, since its own turn binds what its requests ask). A schema reply (Agent.respond(to:schema:), and sorespondwith aschema,triage,summarise_diff,scan_secretsandredactwiththorough, and every condenser’s model pass) asks for none unless the conversation chose its thinking. Each answers a narrow question of a fixed shape; ongranite4.2:8bthinking bought none of them anything measurable. - Drafts keep the model’s default. The writing step of
draft_changeandwisp draftkeeps the model’s configured thinking (keepsThinking); its summary step, a schema reply, does not. This is a choice, not a measurement: ongranite4.2:8bnot thinking got every draft right (10/10, 2/2, 2/2) where thinking got 9/10, 2/2, and 0/2, so thinking did not help drafts there; but a draft is the one writing task among them, and a model whose thinking helps its writing should keep it. The per-model setting decides, as it does for a conversation’s turns. - Open-ended turns keep the default. A conversation’s turns, in chat,
wisp respond, and over MCP, ask nothing unless the conversation chose: the model’s own setting, else the runtime’s, else nothing sent. - The caller over MCP chooses.
respondtakesthink(true,false, or one of Ollama’s levels) when a thread starts, and refuses it on an existing thread, as it refusesmodel,tools, andinstructions. It is kept on the thread’s agent (Agent.thinking), asked of every turn, and shown asthinkinwisp://threadsandwisp://threads/{thread_id}. A level is refused as the thread opens on a runtime whose switch is only on or off (ResolvedModel.checkThink). - A model that cannot think is sent nothing, whatever is asked: an Ollama model that does not report
thinking; a llama.cpp model neither declared nor reportedreasoningand with nothinkconfigured; an MLX model whose template does not takeenable_thinking, which keeps its default; Apple’s models and Core AI’s, which have no switch. A level asked of llama.cpp or MLX is sent as on. - Audited where requests are audited.
promptcarriesthink, what the turn’s requests send (absent when they send nothing);context.distillation,context.summary, andcontext.assessmentcarry thethinktheir call sent, and a model classifier’sclassifier.verdicthas it in itsmetadata(logging.md).
Consequences: granite4.2:8b can be the delegation model with thinking off (ollama.models.granite4.2:8b.think false)
while gemma4:12b and qwen3.8:27b keep theirs; the classifier and the condensers stop paying for thinking on a
thinking model; an MCP caller can turn thinking off for a thread of fixed commands and leave it on for a complex
task. A schema reply that asks for no thinking no longer thinks before its constraint starts on MLX (the refinement of
2026-10-06, above); that phase now runs only where thinking is kept. MLX’s bridge executor (mlx.executor bridge)
decides for itself and takes no per-call choice. Tests without a model: the resolution order and the validation, the
request bodies (FakeOllama, FakeChatServer, the MLX engine’s rendered prompt) for a turn, a side call, a draft, and a
model that cannot think, the scripted model’s record of what each request asked, respond’s think on a new thread
and refused on an existing one, the listing’s note, and the audit fields.
Amendment, 2026-10-15: /think in chat, and thinking in the status line. A person in wisp chat or wisp-tui
could set a model’s thinking only with /config set <runtime>.models.<name>.think, which is read as a session starts,
so a running conversation kept what it began with; and nothing on screen said whether the model was thinking. The
owner asked for a command that sets the current model’s default, and for the status line to show it between the model
and the directory. /think on|off|LEVEL writes <runtime>.models.<name>.think through the same path /config set
takes (validated, audited as config.change with source chat), and sets the conversation’s own choice, the one
respond’s think sets for an MCP thread, so it applies from the next turn; the loop keeps each model’s choice for
the session and gives it back when /model returns to that model, since the session’s configuration is still the one
it started with. It is refused, with nothing written, for a model with no thinking to set: one that cannot think
(thinkSent sends nothing), or whose runtime has no such setting (Apple’s models; LM Studio, which sets it in its
app). A level is checked against the runtime first (checkThink), so /think high on an MLX model is refused as
respond refuses it. A bare /think shows the value and, where the face has a chooser, offers on, off, and the
runtime’s levels. The status carries think: what the next turn’s request sends (on, off, a level), default
when it sends nothing and the runtime decides, or null for a model with no thinking to set; the plain chat writes it
after the gauge as think off, and wisp-tui draws it there as a status-bar item whose Enter sends /think. Choosing
the conversation’s thinking also keeps a schema reply’s thinking as chosen, as it does for an MCP thread. Tests without
a model: the command’s save, its effect on the conversation and the status, its refusals, the completion, the plain
status line, the protocol field, and wisp-tui’s item.
Amendment, 2026-10-17: llama.cpp’s thinking on a par with Ollama’s. The owner asked for the same experience on
llama.cpp as on Ollama: users expect a setting to mean the same whatever serves the model, and experts to be able to
set the behaviour they want. Three things fell short, found running Ternary-Bonsai-2-9B-Q2_0 (Qwen3.5-9B, whose
template thinks by default) on llama.cpp 0.7.0. wisp never knew a llama.cpp model thinks unless it was declared by
hand, since only LM Studio’s listing says so; so wisp’s own calls sent it nothing, and the model classifier thought
for up to 4,000 tokens before each one-word verdict, about 24 s each, where the same verdict without thinking came at
once. /think and respond refused levels, which Ollama takes. And false reached only a template that reads
enable_thinking.
- A template that thinks is found from
/props, which wisp reads already: one that takesenable_thinking, writes a<think>block, or takesreasoning_effort(chat_template_caps.supports_reasoning_effort; 0.7.0’s caps have no flag for thinking itself) is reportedreasoning, so the listing saysthinking,/thinkoffers the levels, and wisp’s own calls ask for none. A matching word in a template that does not think would make wisp send a switch the template ignores, harmless; a template that thinks under another word is reached by configuring it. - Ollama’s values, meaning what they mean to Ollama.
llamacpp.thinkandllamacpp.models.<name>.thinktaketrue,false, or a level.falsesendsenable_thinking: falseandreasoning_effort: "none", which the server turns into no thinking whatever the template’s switch is called. A level sendsenable_thinking: truewiththinking_budget_tokens, the level’s budget fromllamacpp.thinkingBudget.<level>(1,024, 4,096, 16,384, no limit atmax), and the level asreasoning_effortto a template that takes one (maxashigh). A budget rather than a word because most templates take no effort: Bonsai’s thought the same 3,088 tokens withreasoning_effort: "low"as without, and 261 with a budget of 256. The per-request budget works on 0.7.0 though the server’s README names only--reasoning-budget, so it is the one field here that a later llama.cpp could drop; a request’s budget replaces the server’s. - MLX keeps
trueandfalse, and a level inmlx.models.<name>.thinkis refused as the file loads rather than read as on without saying so. Its template flag has no levels; a budget there would be wisp’s own executor ending the block, which is not built. - Compatibility. A level in
llamacpp.thinkorllamacpp.models.<name>.thinkis refused by wisp 0.26.3 and earlier, which read them as booleans (checked on 2026-10-17), so a config written with one does not load in an older wisp.
Tests without a model: the template’s reading from /props, the fields each value sends, the levels and budgets
through a turn and a schema reply against the fake server, the listing’s quantisation, the settings’ kinds, defaults,
and validation. Measured live on llama.cpp 0.7.0: off answered at once, a budget of 64 ended a sum’s thinking at 64
tokens with the same answer, 1 s instead of 4 (backends.md, “llama.cpp”).
Later the same day: since the per-request budget is the one undocumented field, a build that dropped it would let
every level think without a limit and say nothing. A reply that thinks past its budget, beyond the end of the block
(16 tokens or a twentieth of the budget), is now logged as an error once per model and server in a process, and
wisp doctor asks a llama.cpp server whose model thinks to keep to 32 tokens (the llama.cpp thinking budget
finding; 0.7.0 used 37). The executor does not stop such a reply, which is the model’s own answer, nor turn the
level into true silently; the log and the doctor say what happened.
Amended on 2026-11-01: thinking written into the reply. With thinking off, granite4.2:8b through Ollama sometimes
reasons anyway and writes it into content, closed by a lone </think>: 9 of the audit log’s 492 replies by that day,
none with an opening tag and none with thinking Ollama separated. Its template writes the opening tag into the prompt
(<think>\n with thinking on, <think></think> off), so the block begins where the output does. wisp passed it on as
the reply, which verification then marked unsupported. The splitter the MLX executor uses (ThinkingFormat,
ThinkingSplitter) moved into WispCore, and ReplyRelay, which the Ollama and OpenAI-compatible executors share,
splits by it for a model that thinks: text that opens with <think> is thinking from the start and streams as such;
other text is held until a closing tag makes what came before it thinking, or the reply ends and it was all reply.
Once the runtime sends thinking of its own it is the one separating, and the text streams as the reply. The person
chose holding over streaming and cleaning the record afterwards, so the screen and the record never differ; a reply
to respond never streamed, and in chat the cost is a reply from a thinking model with thinking off shown whole.
Tests without a model: both shapes through Ollama’s executor and LM Studio’s, a reply without tags, and a model that
cannot think left alone.
Amended on 2026-11-16: off on llama.cpp sends a thinking budget of 0. Nemotron 3.5 Bolt E4B on llama.cpp 1.0.0, asked
for a classifier’s verdict with enable_thinking: false, reasoning_effort: "none", and the verdict’s schema, wrote a
plan the server returned as thinking before the JSON: 449 tokens a verdict, where the same request without the schema
thought none, and a verdict took 10.3 s against 1.9 s through Ollama (measurements.md, “Nemotron
3.5 Bolt E4B on Ollama and on wisp’s llama.cpp router”). Adding thinking_budget_tokens: 0 left 121 tokens, none of
them thinking. Off now sends all three; a level and on are unchanged.