Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Description
Description
When using OpenCode on Windows, the client fails to correctly parse and execute tool calls returned by a privately deployed MiniMax model (SGlang backend, HTTP connection). This issue does not occur on Linux clients.
Background
- MiniMax is deployed on-premises (private cloud, not SaaS), using SGlang as the backend engine.
- The OpenCode client communicates with MiniMax via HTTP (not HTTPS).
- MiniMax returns tool call information in a non-standard XML format embedded in the
contentfield, e.g.:
{
"message": {
"content": "...<minimax:tool_call>\n<invoke name=\"list_dir\">\n<parameter name=\"path\">...</parameter>\n</invoke>\n</minimax:tool_call>"
},
"finish_reason": "stop"
}- The OpenAI-compatible format expected by OpenCode is:
{
"message": {
"content": null,
"tool_calls": [{
"id": "call_abc123",
"type": "function",
"function": {
"name": "list_dir",
"arguments": "{\"path\": \"...\"}"
}
}]
},
"finish_reason": "tool_calls"
}Problem Details
- Tool call info is embedded in
contentas XML, not in atool_callsarray. finish_reasonisstopinstead oftool_calls.function.argumentsshould be a JSON string, not an object or XML.- This causes OpenCode on Windows to not trigger tool execution, while Linux clients work as expected.
Steps to Reproduce
- Deploy MiniMax (SGlang backend) in a private environment, accessible via HTTP.
- Connect OpenCode client (Windows) to the MiniMax endpoint.
- Trigger a tool call (e.g., ask the model to list a directory).
- Observe that the tool call is not executed automatically on Windows, but works on Linux.
Impact
- Windows OpenCode users cannot use tool call automation with MiniMax (SGlang) backend.
- Linux OpenCode users are not affected.
- This blocks cross-platform automation and workflow consistency.
Additional Technical Notes
- The issue is not related to network or authentication; only the response format is problematic.
- A Python/Go middleware can be used to convert MiniMax XML tool calls to OpenAI-compatible JSON (see internal doc for code).
- The bug is likely in the Windows OpenCode client’s tool call parsing logic.
- MiniMax is running in a secure, private network (not public cloud).
Expected Behavior
OpenCode should correctly parse and execute tool calls from MiniMax (SGlang backend) on all platforms (Windows and Linux), regardless of HTTP/HTTPS or deployment type.
Contact
For more details, test cases, or code samples, please contact the reporter.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Reacted by Denis and Piotr Nowakowski
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Jan 29, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
firewelly commentedon Jan 29, 2026
Minimax M2.1, including the official API, generates multi-step plans under Windows but encounters issues during execution as the opencode is not recognized. This problem does not occur on Linux or MacOS.
344303947 commentedon Feb 6, 2026
The same issue occurs in local inference of MiniMax2.1 with vLLM.
enternal111 commentedon Jun 25, 2026
this should be sglang not use tool-call-parser to transfer model output correctly
github-actions commentedon Aug 25, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.