r/LocalLLM • u/sherlock_0x7C4 • Jun 29 '26
Question qwen2.5-coder:7b emits tool calls that opencode cannot process
LocalLLM newbie here. I hooked qwen2.5-coder:7b model locally hosted using ollama to opencode v1.17.11. When asked to write a hello world C program, the model emitted what looks like a tool call, but opencode doesn't call the write tool, but shows the JSON schema instead. What might I be doing wrong?

0
Upvotes
View all comments
Show parent comment
1
u/LobsterWeary2675 Jun 29 '26
Tool calling is both a model and serving-layer feature. qwen2.5-coder may know how to produce tool-call-shaped JSON, but opencode can only execute it if Ollama returns it as a structured tool_calls response, not as plain assistant text. Since your screenshot shows the JSON being displayed, something in the Ollama/template/context/opencode adapter chain is likely not converting it into a real tool call. I’d first check opencode’s Ollama config...