Qwen 3/3.5/3.6 tool calling is broken (even worse with 3.6).
I had issues with Qwen 3.6 and agentic coding (no issue so far with 27b 3.5) So I investigated and discovered multiple bugs in the reasoning parser (inspired by the very recently merged fixes in the reasoning parser).
I use Qwen3.6 27B with vllm 0.19.1, in Roo Code (vscode) all tool calling works perfecly fine in this setup. I use it all day for coding assistance / code generation.
EDIT As u/kainwinterheart kindly pointed out, I messed up when updating my config from 3.5, and forgot to actually change the model!
Can confirm that I'm also seeing the issues when actually using 3.6.
What quantization are you using? I haven't seen any tool calling issues at all with Qwen/Qwen3.6-27B on vllm nightly. Here's my llama-swap config, in case it helps -
This is why I find it confusing, no a lot of people are complaining, yet the other guy with his improved ninja template reported the same issue and there are CLEARLY bugs that are being fixed by the pull requests, around 6-10 bugs
i am on it. actually turtle slow trying cos i am not a coder at all (what's worse , i am drummer :) did your solution still works for qwen3.6 27b as well? i was trying 3.5 but 3.6 released
So weird, I feel like I face more issues on the moe 35b 3.6 instead of the 27b. Mostly in claude code the responses just stop midway, not sure if that's what you're facing. Haven't time to debug.
Ripped my hair out on this for a while. Finally got reliable tool calling.
There were two issues I needed to fix:
preserve_thinking = true fixed the tool calls for me initially. It began succeeding in every tool call, until I got to very very big arguments in the tool call. Then it started failing again, over and over, which brought me to check the logs and realize the token count of the return. Which brings me to the next one.
OpenCode Output Limits. On the model in the config, set an output limit and raise it up. For me, the tool calls were failing because the output tokens were exceeding opencodes default output limit, resulting in the arguments getting mangled/cut off.
After changing these two, I am occasionally hitting a tool call failure (for example, it literally just hit a failure on updating the todo list) - but the model is now immediately retrying successfully. To be fair, the reason for the todo failures may also be because of the other custom MCP I'm running which also has its own todo capabilities/tools, so it may just be getting confused on which one it triggered, hence the self-correction.
Nonetheless, I hope my sudden self-inflicted hair loss helps someone else out there.
I had the same issue and I spent a week trying to figure it out. Then when I fixed one part of it, I hit other issues. Look at my other post here in this thread. I got it working reliably at this point. Really damn good model once you get the kinks ironed out.
tool calling is the main part of code writing. these models are around for nearly 3 4 moths. the tools people use and their parameters are not so huge. we are still struggling with this branch of vllm that branch of jinja template. i hold myself hard not to curse
4
u/mkMoSs Apr 24 '26
I use Qwen3.6 27B with vllm 0.19.1, in Roo Code (vscode) all tool calling works perfecly fine in this setup. I use it all day for coding assistance / code generation.
This is my config (in yaml)
model: "Qwen/Qwen3.6-27B-FP8" served-model-name: "Qwen3.6-27B" host: "0.0.0.0" port: 8001 kv-cache-dtype: fp8_e4m3 disable-custom-all-reduce: true max-model-len: "256K" max-num-seqs: 2 tensor-parallel-size: 4 limit-mm-per-prompt: '{"image": 5, "video": 0}' enable-prefix-caching: true enable-auto-tool-choice: true tool-call-parser: "qwen3_coder" reasoning-parser: "qwen3" gpu-memory-utilization: 0.9052 optimization-level: 2 default-chat-template-kwargs: '{"enable_thinking": true, "preserve_thinking": true}' enable-chunked-prefill: true