Skip to content

Bug Report: MiniMax Tool Call Compatibility Issue (Windows Only) #11091

Closed as not planned

Description

@menglongyuan

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 content field, 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 content as XML, not in a tool_calls array.
  • finish_reason is stop instead of tool_calls.
  • function.arguments should 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

  1. Deploy MiniMax (SGlang backend) in a private environment, accessible via HTTP.
  2. Connect OpenCode client (Windows) to the MiniMax endpoint.
  3. Trigger a tool call (e.g., ask the model to list a directory).
  4. 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

Activity

  1. github-actions commented on Jan 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. firewelly commented on Jan 29, 2026

    @firewelly

    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.

  3. 344303947 commented on Feb 6, 2026

    @344303947

    The same issue occurs in local inference of MiniMax2.1 with vLLM.

  4. enternal111 commented on Jun 25, 2026

    @enternal111

    this should be sglang not use tool-call-parser to transfer model output correctly

  5. github-actions commented on Aug 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions