fix(llm): add MiniMax global provider - #760
Conversation
| | `mimo` | openai | `https://api.xiaomimimo.com/v1` | `MIMO_API_KEY` | | ||
| | `minimax` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | | ||
| | `minimax` | openai | `https://api.minimax.io/v1` | `MINIMAX_API_KEY` | | ||
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | |
There was a problem hiding this comment.
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | | |
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_CN_API_KEY` | |
There was a problem hiding this comment.
Since you named the CN API as "Minimax CN API" in the API desc, maybe you can distinguish it further.
| | `mimo` | openai | `https://api.xiaomimimo.com/v1` | `MIMO_API_KEY` | | ||
| | `minimax` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | | ||
| | `minimax` | openai | `https://api.minimax.io/v1` | `MINIMAX_API_KEY` | | ||
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | |
There was a problem hiding this comment.
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | | |
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_CN_API_KEY` | |
| | `mimo` | openai | `https://api.xiaomimimo.com/v1` | `MIMO_API_KEY` | | ||
| | `minimax` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | | ||
| | `minimax` | openai | `https://api.minimax.io/v1` | `MINIMAX_API_KEY` | | ||
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | |
There was a problem hiding this comment.
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | | |
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_CN_API_KEY` | |
| | `mimo` | openai | `https://api.xiaomimimo.com/v1` | `MIMO_API_KEY` | | ||
| | `minimax` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | | ||
| | `minimax` | openai | `https://api.minimax.io/v1` | `MINIMAX_API_KEY` | | ||
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | |
There was a problem hiding this comment.
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` | | |
| | `minimax-cn` | openai | `https://api.minimaxi.com/v1` | `MINIMAX_CN_API_KEY` | |
|
@moutayam Thanks for putting this together — clean PR and nice that you covered all four localized docs too. One suggestion on the env var: right now both This has a couple of benefits:
What do you think? |
|
Thanks, agreed. I’ll update the Global preset to use |
There was a problem hiding this comment.
Thanks for the update, you have successfully dealt with the 2 clashing vars.
I just doubt if writing a single test only for MiniMax is necessary.
There was a problem hiding this comment.
Fair point. The resolver tests already check both MiniMax URLs and the two env-var fallbacks, so the separate registry test may be overkill. I can remove it and keep the resolver coverage if you’d prefer.
Description
Fixes #759.
The built-in MiniMax provider currently uses the China endpoint, which rejects
keys created on the MiniMax Global platform. MiniMax Global and China use
separate account spaces and API key systems.
This change:
minimaxusehttps://api.minimax.io/v1withMINIMAX_GLOBAL_API_KEYminimax-cnonhttps://api.minimaxi.com/v1withMINIMAX_API_KEYminimax-cnis selectable in the official provider pickerExisting China-key users currently configured with
minimaxmust selectminimax-cn.Type of Change
minimaxmust selectminimax-cn)How Has This Been Tested?
make checkpasses locallymake testpasses locallymake buildpasses locallyManual testing:
minimaxpreset with a valid MiniMax Global API keyocr llm testChecklist
go fmt,go vet)Related Issues
Closes #759