Repository navigation
Description
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
Tool-result messages reach the Inkling chat template without the tool's name, so the rendered header is <|message_tool|><|content_text|> instead of <|message_tool|>get_weather<|content_text|>.
The template names a tool result from message.name, or from the earlier assistant tool_calls[].id that matches tool_call_id. The front end removes both:
openai_to_messages(terminal/serve/frontend.py~678–696) builds each tool message as{"role", "content", "_call_id"}and never copiesname._order_chat_tool_results(~663–666) then pops_call_idfrom every message and tool call before the template renders, so the id match can't happen either.- The Anthropic
/v1/messagespath (~881–901) storestool_use_idas_call_idand goes through the same_order_chat_tool_results, so it loses the name the same way.
Sending name on the tool message doesn't help, because it is dropped too. Clients that follow the OpenAI format send only tool_call_id; Pi 1.6.0 is one.
Expected: the tool name appears in the tool-result header, as the chat template intends. For example, keep name on tool messages, or resolve it from the matching assistant call before _call_id is popped.
Impact: the model sees every tool result without being told which tool produced it. Single round trips still answered correctly in my tests (22/22), but agent sessions with several tools in flight lose that cue on every result. I haven't measured the effect on long tool chains.
Smallest steps or command that reproduce it
- Start the server from source with Inkling-2-Mini.
- Send
/v1/chat/completionswithtoolsdeclaringget_weatherand these messages: a user asks for the weather; an assistant turn with oneget_weathercall,id: "call_1"; atoolmessage withtool_call_id: "call_1"and the result. Usechat_template_kwargs: {"reasoning_effort": "medium"}. - Log the prompt Strata tokenizes, for example by wrapping
encode_prompt, and compare it with llama.cpp's/apply-templatefor the same messages and the same GGUF.
| prompt tokens | tool-result header | |
|---|---|---|
| llama.cpp (same GGUF, same template) | 728 | <|message_tool|>get_weather<|content_text|> |
| Strata 0.2.21 | 725 | <|message_tool|><|content_text|> |
Strata 0.2.21, name added to the tool message |
725 | <|message_tool|><|content_text|> |
The same conversation without the tool round trip renders byte-identically on both, so the difference is only the header.
Reproduction status
Reproduced locally
Strata version
v0.2.21 (d46f5f268), terminal/serve/server.py started directly, strata-inkling 0.1.67 built from source
Graphics card, memory and system
Apple M4 Pro, 48 GB unified memory, macOS 27.2 (Metal)
Model, size and settings
Inkling-2-Mini, ggml-org IQ4_NL GGUF (17.6 GB), --max-context 131072, one slot, drafting off, vision off, reasoning effort medium
Logs
Rendered tool-result turn from the logged prompt (Strata), for a get_weather round trip (Lisbon):
<|message_tool|><|content_text|>{"location":"Lisbon","temperature":18,"unit":"celsius","condition":"light rain","humidity_percent":82}<|end_message|>
llama.cpp /apply-template for the same messages:
<|message_tool|>get_weather<|content_text|>{"location":"Lisbon","temperature":18,"unit":"celsius","condition":"light rain","humidity_percent":82}<|end_message|>
Activity
github-actions commentedon Nov 24, 2026
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
github-actions commentedon Nov 24, 2026
Thanks, this follows the format now.
Niko1221 commentedon Nov 24, 2026
Thank you, this is a precise report and your numbers match what we see.
We reproduced it. The front end removes the tool call ids before the chat template runs, and it never copies the tool's name onto the result, so the Inkling header comes out as
<|message_tool|><|content_text|>. With the name filled in from the call that the result answers, the header becomes<|message_tool|>get_weather<|content_text|>, also when two calls are answered in the other order. The Anthropic/v1/messagespath goes through the same function, so it is fixed by the same change.This is not new in 0.2.21 and not a regression: Inkling has had this since it was added. It does not touch the other model families.
We plan to fix it for the next release. The change is small and only in the server's Python part (
terminal/serve/frontend.py, where the ids are removed), no new engine is needed. There is nothing to change on the client side meanwhile: anamefield on the tool message is dropped too, as you saw.subourbonite commentedon Nov 24, 2026
I have a PR coming for this, it's just taking a while to run through the full test suite. If you don't need/want the PR, feel free to close it.
subourbonite commentedon Nov 25, 2026
PR is up on #7073
fix(serve): a tool result keeps the name of the call it answers, so I…