Minimax M2 Model Returns 404 Page Not Found #2898

Closed
opened 2026-02-16 17:37:43 -05:00 by yindo · 14 comments
Owner

Originally created by @alexdoutsinis on GitHub (Nov 16, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

After setting up the Minimax provider with a valid API key, attempting to use the Minimax M2 model results in a "404 page not found" error.

OpenCode version

v1.0.65

Steps to reproduce

  1. Configure Minimax provider with API key
  2. Attempt to use the Minimax M2 model
  3. Observe the 404 error response

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Alacrity

Originally created by @alexdoutsinis on GitHub (Nov 16, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description After setting up the Minimax provider with a valid API key, attempting to use the Minimax M2 model results in a "404 page not found" error. ### OpenCode version v1.0.65 ### Steps to reproduce 1. Configure Minimax provider with API key 2. Attempt to use the Minimax M2 model 3. Observe the 404 error response ### Screenshot and/or share link _No response_ ### Operating System Windows 11 ### Terminal Alacrity
yindo added the bug label 2026-02-16 17:37:43 -05:00
yindo closed this issue 2026-02-16 17:37:43 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 16, 2025):

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

  • #4305: Cannot use iflowcn/minimax-m2 model in OpenCode. Error status 435 "Model not support" - Similar issue with Minimax M2 model not working, though with different error (435 vs 404)
  • #3555: MiniMax-M2 reasoning content not properly handled in OpenAI-compatible mode - Related to MiniMax M2 configuration and API compatibility issues
  • #245: Support for Minimax-M1 model (over OpenRouter) - Similar provider configuration issue with "AI_APICallError: Not Found" error

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

@github-actions[bot] commented on GitHub (Nov 16, 2025): This issue might be a duplicate of existing issues. Please check: - #4305: Cannot use `iflowcn/minimax-m2` model in OpenCode. Error status 435 "Model not support" - Similar issue with Minimax M2 model not working, though with different error (435 vs 404) - #3555: MiniMax-M2 reasoning content not properly handled in OpenAI-compatible mode - Related to MiniMax M2 configuration and API compatibility issues - #245: Support for Minimax-M1 model (over OpenRouter) - Similar provider configuration issue with "AI_APICallError: Not Found" error Feel free to ignore if none of these address your specific case.
Author
Owner

@jensenojs commented on GitHub (Nov 17, 2025):

hi here, need to add config here

Image

https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#在-opencode-中使用-minimax-m2

notice that you may need to use https://api.minimax.io/anthropic/v1 instead of https://api.minimaxi.com/anthropic/v1

@jensenojs commented on GitHub (Nov 17, 2025): hi here, need to add config here <img width="1646" height="1198" alt="Image" src="https://github.com/user-attachments/assets/27d2d42b-3861-4807-a6b0-17e5683cd5e0" /> https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#在-opencode-中使用-minimax-m2 notice that you may need to use `https://api.minimax.io/anthropic/v1` instead of `https://api.minimaxi.com/anthropic/v1`
Author
Owner

@rekram1-node commented on GitHub (Nov 17, 2025):

Does that mean the version on models.dev is wrong then?

@rekram1-node commented on GitHub (Nov 17, 2025): Does that mean the version on models.dev is wrong then?
Author
Owner

@rekram1-node commented on GitHub (Nov 17, 2025):

This is the api it uses, someone set that (i havent used this provider): "api": "https://api.minimax.io/v1",

@rekram1-node commented on GitHub (Nov 17, 2025): This is the api it uses, someone set that (i havent used this provider): "api": "https://api.minimax.io/v1",
Author
Owner

@rekram1-node commented on GitHub (Nov 17, 2025):

ahh okay ill update that

@rekram1-node commented on GitHub (Nov 17, 2025): ahh okay ill update that
Author
Owner

@legout commented on GitHub (Nov 17, 2025):

This is the api it uses, someone set that (i havent used this provider): "api": "https://api.minimax.io/v1",

This is the openai compatible api. minimax recommends the anthropic api for opencode:

https://platform.minimax.io/docs/guides/text-ai-coding-tools#configure-minimax-api-10

I can confirm, that this works for me.

@legout commented on GitHub (Nov 17, 2025): > This is the api it uses, someone set that (i havent used this provider): "api": "https://api.minimax.io/v1", This is the openai compatible api. minimax recommends the anthropic api for opencode: https://platform.minimax.io/docs/guides/text-ai-coding-tools#configure-minimax-api-10 I can confirm, that this works for me.
Author
Owner

@jensenojs commented on GitHub (Nov 17, 2025):

Sorry I didn't follow. Does the update mean this is no longer needed? @rekram1-node

hi here, need to add config here您好,需要在这里添加配置。

Image [https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#在-opencode-中使用-minimax-m2](https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#%E5%9C%A8-opencode-%E4%B8%AD%E4%BD%BF%E7%94%A8-minimax-m2)

notice that you may need to use https://api.minimax.io/anthropic/v1 instead of https://api.minimaxi.com/anthropic/v1请注意,您可能需要使用 https://api.minimax.io/anthropic/v1 而不是 https://api.minimaxi.com/anthropic/v1

@jensenojs commented on GitHub (Nov 17, 2025): Sorry I didn't follow. Does the update mean this is no longer needed? @rekram1-node > hi here, need to add config here您好,需要在这里添加配置。 > > <img alt="Image" width="1646" height="1198" src="https://private-user-images.githubusercontent.com/56761542/515024413-27d2d42b-3861-4807-a6b0-17e5683cd5e0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjMzNzE3MjksIm5iZiI6MTc2MzM3MTQyOSwicGF0aCI6Ii81Njc2MTU0Mi81MTUwMjQ0MTMtMjdkMmQ0MmItMzg2MS00ODA3LWE2YjAtMTdlNTY4M2NkNWUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTE3VDA5MjM0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlOGQwMjE4MGViYThmMDY1ODZlNGFiMTliNWUwOTg3N2QxZDM1NWFmMmJhMDAxNTBiNTkyYWFiYTU3ZTcwMzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZbYpOCT_ZLqa0ERTLD442z-KuuH-O4J42qv4IWmB1iM"> > [https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#在-opencode-中使用-minimax-m2](https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#%E5%9C%A8-opencode-%E4%B8%AD%E4%BD%BF%E7%94%A8-minimax-m2) > > notice that you may need to use `https://api.minimax.io/anthropic/v1` instead of `https://api.minimaxi.com/anthropic/v1`请注意,您可能需要使用 `https://api.minimax.io/anthropic/v1` 而不是 `https://api.minimaxi.com/anthropic/v1`
Author
Owner

@alexdoutsinis commented on GitHub (Nov 17, 2025):

@rekram1-node note that you need to use "minimaxi.io" for universal users, the ".com" one is only for China.

i just configured like they show in their docs and it works now, thanks.

@alexdoutsinis commented on GitHub (Nov 17, 2025): @rekram1-node note that you need to use "minimaxi.io" for universal users, the ".com" one is only for China. i just configured like they show in their docs and it works now, thanks.
Author
Owner

@alexdoutsinis commented on GitHub (Nov 17, 2025):

Sorry I didn't follow. Does the update mean this is no longer needed? @rekram1-node

hi here, need to add config here您好,需要在这里添加配置。
Image
https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#在-opencode-中使用-minimax-m2
notice that you may need to use https://api.minimax.io/anthropic/v1 instead of https://api.minimaxi.com/anthropic/v1请注意,您可能需要使用 https://api.minimax.io/anthropic/v1 而不是 https://api.minimaxi.com/anthropic/v1

yes, you will no longer need to manual config the provider, but i saw that the default config still has a wrong base url so for now, you need to config it yourself, just follow the docs setup

@alexdoutsinis commented on GitHub (Nov 17, 2025): > Sorry I didn't follow. Does the update mean this is no longer needed? [@rekram1-node](https://github.com/rekram1-node) > > > hi here, need to add config here您好,需要在这里添加配置。 > > <img alt="Image" width="1646" height="1198" src="https://private-user-images.githubusercontent.com/56761542/515024413-27d2d42b-3861-4807-a6b0-17e5683cd5e0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjMzNzE3MjksIm5iZiI6MTc2MzM3MTQyOSwicGF0aCI6Ii81Njc2MTU0Mi81MTUwMjQ0MTMtMjdkMmQ0MmItMzg2MS00ODA3LWE2YjAtMTdlNTY4M2NkNWUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTE3VDA5MjM0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlOGQwMjE4MGViYThmMDY1ODZlNGFiMTliNWUwOTg3N2QxZDM1NWFmMmJhMDAxNTBiNTkyYWFiYTU3ZTcwMzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZbYpOCT_ZLqa0ERTLD442z-KuuH-O4J42qv4IWmB1iM"> > > [https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#在-opencode-中使用-minimax-m2](https://platform.minimaxi.com/docs/guides/text-ai-coding-tools#%E5%9C%A8-opencode-%E4%B8%AD%E4%BD%BF%E7%94%A8-minimax-m2) > > notice that you may need to use `https://api.minimax.io/anthropic/v1` instead of `https://api.minimaxi.com/anthropic/v1`请注意,您可能需要使用 `https://api.minimax.io/anthropic/v1` 而不是 `https://api.minimaxi.com/anthropic/v1` yes, you will no longer need to manual config the provider, but i saw that the default config still has a wrong base url so for now, you need to config it yourself, just follow the docs [setup](https://minimax-cac98058.mintlify.dev/docs/guides/text-ai-coding-tools#use-minimax-m2-in-opencode)
Author
Owner

@legout commented on GitHub (Nov 17, 2025):

@rekram1-node note that you need to use "minimaxi.io" for universal users, the ".com" one is only for China.

i just configured like they show in their docs and it works now, thanks.

Its https://api.minimax.io/v1 and not https://api.minimaxi.io/vi (i.e. max and not maxi), right?

@legout commented on GitHub (Nov 17, 2025): > [@rekram1-node](https://github.com/rekram1-node) note that you need to use "minimaxi.io" for universal users, the ".com" one is only for China. > > i just configured like they show in their docs and it works now, thanks. Its `https://api.minimax.io/v1` and not `https://api.minimaxi.io/vi` (i.e. `max` and not `maxi`), right?
Author
Owner

@rekram1-node commented on GitHub (Nov 17, 2025):

Should be fixed, try:

rm ~/.cache/opencode/models.json

and then restart opencode, lmk if that fixes it for u

from what I understand this is correct now: https://github.com/sst/models.dev/blob/0cb3e3498ba712bd31528926d2efdd26e925267b/providers/minimax/provider.toml#L5

@rekram1-node commented on GitHub (Nov 17, 2025): Should be fixed, try: rm ~/.cache/opencode/models.json and then restart opencode, lmk if that fixes it for u from what I understand this is correct now: https://github.com/sst/models.dev/blob/0cb3e3498ba712bd31528926d2efdd26e925267b/providers/minimax/provider.toml#L5
Author
Owner

@jensenojs commented on GitHub (Nov 17, 2025):

Image

without below setting, shows invalid api key


A bit strange, still need

    "provider": {
        "minimax": {
            "npm": "@ai-sdk/anthropic",
            "options": {
                "baseURL": "https://api.minimaxi.com/anthropic/v1",
            },
            "models": {
                "MiniMax-M2": {
                    "name": "MiniMax-M2"
                }
            }
        }
    }
@jensenojs commented on GitHub (Nov 17, 2025): <img width="647" height="637" alt="Image" src="https://github.com/user-attachments/assets/df18951f-9b79-49a7-a430-a22a9062e724" /> without below setting, shows invalid api key --- A bit strange, still need ```json "provider": { "minimax": { "npm": "@ai-sdk/anthropic", "options": { "baseURL": "https://api.minimaxi.com/anthropic/v1", }, "models": { "MiniMax-M2": { "name": "MiniMax-M2" } } } } ```
Author
Owner

@rekram1-node commented on GitHub (Nov 17, 2025):

Is that because you are based in china? that's what someone said .com was for

@rekram1-node commented on GitHub (Nov 17, 2025): Is that because you are based in china? that's what someone said .com was for
Author
Owner

@alexdoutsinis commented on GitHub (Nov 22, 2025):

fixed

@alexdoutsinis commented on GitHub (Nov 22, 2025): fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2898