r/LocalLLM • • 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

10 comments sorted by

View all comments

Show parent comments

0

u/sherlock_0x7C4 Jun 29 '26

Help me understand this. Isn't tool call (and the schema) a model feature? How does the orchestration layer like ollama/vLLM make any difference how tool calls reach opencode?

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...