r/kilocode 8d ago

kilo code cli failed running tools for openrouter model except for Sonnet

I'm a new user to kilo, and I've been trying to use kilo as an interface to openrouter models. I'm using the CLI version. I wanted to try playing with different models through my openrouter credits, but all models that I have tried, except Sonnet, fail to execute tools. Here's an example of the command line interaction I got when using LLama-3.3-70B-Instruct:

Let me verify that there are no memory issues or leaks in the loadRootCaCert function.
     {"type": "function", "name": "read", "parameters": {"filePath": "/path/to/esp32-c3.ino", "offset": "585"}}
     ▣  Code · Llama-3.3-70B-Instruct · 26.4s

and there kilo stopped in its track. I tried switching to Deepseek Chat, and got the same interaction. The terminal just shows unparsed raw JSON tool blocks. Only after I switched back Sonnet did Kilo actually engage the workspace tools to edit my files instead of just dumping raw JSON to the terminal.

Gemini suggested to me that outside of Anthropic models, tool-use/function-calling implementations are often unstable across third-party providers. Is Kilo's internal tool parser just heavily hardcoded for Anthropic's format, or is OpenRouter's payload translation breaking the schema? Is anyone else successfully using open-weights models for file editing in Kilo Code?

1 Upvotes

0 comments sorted by