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.

The unsloth quants face the same issue, see https://huggingface.co/unsloth/Laguna-S-2.1-GGUF/discussions/11/

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 ;)

Sign up or log in to comment