Toolcall stops

#56
by cristianadam - opened

With llama-server (version 9860), "qwen3.6-froggeric-v21.3", and Opencode 1.17.10, I've got a few toolcall stops. Not at the beginning, but after a while.

Something like:

<tool_call>
<function=bash>
<parameter=command>
echo 'link (/url "title")' | ./build/main 2>&1
</parameter>
</function>
</tool_call>

My llama-server run script looks like this.

llama-server -hf ggml-org/Qwen3.6-35B-A3B-MTP-GGUF:Q8_0 \
    --spec-type draft-mtp --spec-draft-n-max 3 \
    --temp 0.6 \
    --top-p 0.95 \
    --top-k 20 \
    --presence-penalty 1.0 \
    --min-p 0.00 \
    --jinja --chat-template-file qwen-3.6_chat_template.jinja \
    -fa off \
    --host 192.168.178.148 -a "Qwen3.6 35b a3b"

Running on a Mac Studio M2.

I have in the meantime added:

    --reasoning-format deepseek \
    --chat-template-kwargs '{"preserve_thinking":true}' \     

and it looks that it works better. But maybe the issue hasn't occurred yet.

same issue

You found the exact fix. When using llama-server with coding harnesses like OpenCode or Claude Code, you should always include --reasoning-format deepseek.

This ensures llama-server extracts the block into the dedicated reasoning_content API field rather than dumping it as raw text into the content stream, allowing OpenCode to detect the tool call boundary cleanly.

The recommended launch configuration is:

llama-server -m your_model.gguf --jinja --chat-template-file chat_template.jinja --reasoning-format deepseek

Closing this discussion as resolved.

froggeric changed discussion status to closed

Sign up or log in to comment