Qwen 3.6 enable_thinking — The MoE Pitfall That Broke My Agent JSON Parsing
The article discusses a quirk in Qwen 3.6 that causes issues with JSON parsing due to an unexpected reasoning output. The author experienced frustration when their agent returned malformed JSON, which included unnecessary reasoning tokens. A simple fix is provided, highlighting the importance of adjusting a specific keyword argument to avoid the problem.
- ▪Qwen 3.6 has a default reasoning mode that can interfere with JSON output.
- ▪The author encountered a JSONDecodeError due to the model's reasoning output being included in responses.
- ▪The solution involves setting enable_thinking=False in the apply_chat_template function.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3885340) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } SleepyQuant Posted on May 18 • Originally published at sleepyquant.rest Qwen 3.6 enable_thinking — The MoE Pitfall That Broke My Agent JSON Parsing #qwen #mlx #localai #llminference Qwen 3.6 enable_thinking — The MoE Pitfall That Broke My Agent JSON Parsing I lost two hours last week to a Qwen 3.6 quirk that doesn't show up in any quickstart guide. My agent kept returning malformed JSON.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).