Tool calling in pi completely broken in 92b968eeba0fbb790ef4216e2a70ef079ed19b07

#14
by xhochy - opened

After I updated the GGUFs to 92b968eeba0fbb790ef4216e2a70ef079ed19b07, tool calls no longer work in the pi coding agent. I'm using the llama.cpp build from https://github.com/poolsideai/llama.cpp/tree/laguna with the latest pi release.

User: What is this repository?
Response:
I'll look at the repository structure and key files to understand what this is.<tool_call>bash<arg_key>command</arg_key><arg_value>ls -la</arg_value></tool_call><tool_call>read<arg_key>path</arg_key><arg_value>/Users/uwe.korn/Development/conda-forge/bazel-feedstock/README.md</arg_value></tool_call>

Also stored at https://huggingface.co/datasets/xhochy/conda-forge-agent-traces/blob/main/2026-07-23T18-13-58-574Z_019f902f-2cae-73d4-accd-61423434fb3e.jsonl

It was working with revision e08e1fe855bb2d43f96ad78e24495283f3426c67:
https://huggingface.co/datasets/xhochy/conda-forge-agent-traces/blob/main/2026-07-23T18-16-33-077Z_019f9031-8835-779a-af0d-d474bb397f61.jsonl

I can bisect (as there is at least one GGUF inbetween), but that will take a while due to download times. I have documented my setup also at https://uwekorn.com/2026/07/23/laguna-s-2.1-seems-to-look-pretty-good.html

I got the same problem with the newest q4 version (i think: e163b2c98908809a71245d6bb68b2226994d9969cb2a438eccb72196a1c4147a).
Not one functioning tool call anymore.

Using --chat-template-file with https://huggingface.co/poolside/Laguna-S-2.1-GGUF/blob/main/chat_template.jinja fixes the issue for me with the newer GGUFs.

As this is older than what has been embedded in the models, I don't know whether it should be preferred or the embedded needs some one fixes.

Using --chat-template-file with https://huggingface.co/poolside/Laguna-S-2.1-GGUF/blob/main/chat_template.jinja fixes the issue for me with the newer GGUFs.

As this is older than what has been embedded in the models, I don't know whether it should be preferred or the embedded needs some one fixes.

Can confirm. It works for me with the explicitly added template. Seems the integrated template got botched.
btw. the above template has the {%- set preserve_thinking = preserve_thinking | default(false) -%} line doubled ;)

can confirm that tool calls work with edd093522473dc7313b0738d8b4116b7f8b9745f even without explicitly calling the -chat-template-file.

Tested this morning with the latest Q4_K_M and llama.cpp main branch. It seems to be working pretty well now. While using Pi, I tested it by one-shotting a build out for a little web dev project that has some tricky features in the plan. It handled it very well and produced a much better result than Qwen3.6-27B and Gemma4-31B.

The thinking traces are very interesting. It does seem to be more creative in the way it approaches problems than other open-weight models, but at the cost of thinking quite a lot.

The new GGUFs also work fine for me.

xhochy changed discussion status to closed

Sign up or log in to comment