Devstral toolcalling format not supported #618

Closed
opened 2026-02-16 17:27:36 -05:00 by yindo · 1 comment
Owner

Originally created by @ggaabe on GitHub (Jul 10, 2025).

Originally assigned to: @thdxr on GitHub.

I'm hosting devstral small locally using LM Studio and trying to run opencode with it. Devstral apparently has a custom tool calling syntax, rather than the openAI standard. As a result, when it tries to call tools, it does so in its regular responses like:

[TOOL_CALLS]bash[ARGS]{"command":"glob **/server/**", ...}

Instead of outputting these on the tool_calls array.

This could be fixed by adding a check for if the LLM response contains any [TOOL_CALLS] and converting anything from that point onward to the regular tool calling format.

Image

This screenshot shows what the opencode responses are looking like right now.

Let me know if you can add this quickly, or would prefer I work on it. You can see its tool call format from the screnshot.

Originally created by @ggaabe on GitHub (Jul 10, 2025). Originally assigned to: @thdxr on GitHub. I'm hosting devstral small locally using LM Studio and trying to run opencode with it. Devstral apparently has a custom tool calling syntax, rather than the openAI standard. As a result, when it tries to call tools, it does so in its regular responses like: ``` [TOOL_CALLS]bash[ARGS]{"command":"glob **/server/**", ...} ``` Instead of outputting these on the `tool_calls` array. This could be fixed by adding a check for if the LLM response contains any `[TOOL_CALLS]` and converting anything from that point onward to the regular tool calling format. <img width="647" height="425" alt="Image" src="https://github.com/user-attachments/assets/ab0fecc0-e372-420d-bc92-ff5945a9b2ca" /> This screenshot shows what the opencode responses are looking like right now. Let me know if you can add this quickly, or would prefer I work on it. You can see its tool call format from the screnshot.
yindo closed this issue 2026-02-16 17:27:36 -05:00
Author
Owner

@ggaabe commented on GitHub (Jul 15, 2025):

I think this may be fixed now; recent opencode versions now pass additional system prompt messages and devstral outputs usable toolcalling formats where it can successfully apply edits locally

@ggaabe commented on GitHub (Jul 15, 2025): I think this may be fixed now; recent opencode versions now pass additional system prompt messages and devstral outputs usable toolcalling formats where it can successfully apply edits locally
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#618