Skip to content

MiniMax M2 <think> tags #4033

Closed
Closed

Description

@pskwr

Question

Does opencode support rendering tags in the UI like for example Claude Code?

Opencode:
Image

Claude Code:
Image

Activity

  1. github-actions commented on Nov 7, 2025

    @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. aaronnewsome commented on Nov 7, 2025

    @aaronnewsome

    I'm using Minimax M2 on both their official API and locally hosted with llama.cpp. Both rendering the reasoning blocks properly in opencode, no think tags appear in the response texts. I set reasoning true in opencode.json

    "models": {
            "minimax-m2": {
              "name": "minimax-m2",
              "tool_call": true,
              "reasoning": true,
              "cost": {
                "input": 0.10,
                "output": 1.20
              },
              "options": {
                "num_ctx": 131072,
                "temperature": 1.0,
                "top_p": 0.95,
                "top_k": 40
              }
            },
    

    CORRECTION: I am using OpenCode with Minimax-M2 locally hosted only, not the official API. Using Minimax M2 official API with Claude Code.

  3. no1wudi commented on Nov 7, 2025

    @no1wudi
    Contributor

    I'm using offical antropic API, opencode can't get correct title, but no "think" tags.

    Image
  4. WAY29 commented on Nov 18, 2025

    @WAY29
    Contributor

    meet same error in unoffical codex relay... anyone can help?

  5. rekram1-node commented on Nov 18, 2025

    @rekram1-node
    Contributor

    what is codex relay?

  6. WAY29 commented on Nov 19, 2025

    @WAY29
    Contributor

    what is codex relay?

    Oh, it means third-party intermediary website. It work well with the Codex CLI, but encountered some issues in OpenCode (can't render think blocks).

  7. self-assigned this
    on Nov 19, 2025
  8. otarkhan commented on Dec 5, 2025

    @otarkhan

    I'm using Minimax M2 on both their official API and locally hosted with llama.cpp. Both rendering the reasoning blocks properly in opencode, no think tags appear in the response texts. I set reasoning true in opencode.json

    "models": {
            "minimax-m2": {
              "name": "minimax-m2",
              "tool_call": true,
              "reasoning": true,
              "cost": {
                "input": 0.10,
                "output": 1.20
              },
              "options": {
                "num_ctx": 131072,
                "temperature": 1.0,
                "top_p": 0.95,
                "top_k": 40
              }
            },
    

    CORRECTION: I am using OpenCode with Minimax-M2 locally hosted only, not the official API. Using Minimax M2 official API with Claude Code.

    @aaronnewsome Does tool calling work with OpenCode + local MiniMax-M2? I tested them but OpenCode doesn't parse/understand MiniMax's way of tool call (XML)

  9. aaronnewsome commented on Dec 5, 2025

    @aaronnewsome

    I use OpenCode heavily with Minimax-M2 hosted locally. Over many weeks of heavy daily usage, I see no major issues and it runs very stable, much better than GLM 4.5. When someone says it doesn't work, my first two questions are, what are you serving it with and what chat template are you using. Details of my setup are here

    ggml-org/llama.cpp#16932 (comment)

  10. druellan commented on Dec 6, 2025

    @druellan

    I'm using Minmax through nVidia NIM and I can see the tags showing as <think> and I think I saw them as _think_ one time. Seems to me there is a escaping/encode issue with some providers.

    Image

    V1.0.134 - Windows 10 - Windows Terminal

  11. letsrock85 commented on Dec 25, 2025

    @letsrock85
    Image

    Same issue. I suspect providers like OpenRouter run extra post-processing & parsing layers behind the scenes, which is why their outputs stay intact - unlike what I see when running the same model locally vLLM

  12. rekram1-node commented on Dec 25, 2025

    @rekram1-node
    Contributor

    the think tags are being sent as assistant messages not reasoning thats why opencode renders them as such

  13. h14h commented on Dec 30, 2025

    @h14h

    I'm trying to use MiniMax-M2.1 via the Fireworks API (using the default opencode auth setup) and running into this same issue. And not only are the <think> tags coming through as plaintext, but so are <minimax:tool_call> tags, which renders the model unusable.

    AFAIK Fireworks does not have any equivalent to the reasoning_split flag that the official MiniMax API supports to ensure OpenAI SDK compatibility.

    If feasible, it'd be awesome if OpenCode offered special support interleaved thinking models via the OpenAI-compatible API. The Fireworks-hosted M2.1 deployment is super appealing as a smart, inexpensive, high-TPS model, and I would love to not have to wait on Fireworks (or any other competing model provider) to figure out how to make these interleaved thinking models truly OpenAI compatible.

  14. snipeship commented on Jan 26, 2026

    @snipeship
    Contributor

    @rekram1-node I think this issue can be closed

  15. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 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