Add direct MiniMax-M3 support for minimax and minimax-cn
MiniMax released M3, but the registry only has M2.7 and M2.7-highspeed on the minimax and minimax-cn providers, so M3 isn't addressable as a direct model today. I'd like to add it.
What
- Add
MiniMax-M3 to minimax and minimax-cn in packages/ai/src/models.generated.ts — anthropic-messages API, text+image input, reasoning, 512K context, 128K max tokens. Base URL matches the existing provider (api.minimax.io/anthropic and api.minimaxi.com/anthropic).
- Update
scripts/generate-models.ts so minimaxDirectSupportedIds includes M3 and the 512K context applies only to M3; M2.7 and M2.7-highspeed keep 204800 / 131072.
- Add a unit test under
packages/ai/test/ covering baseUrl, api, contextWindow, maxTokens, reasoning, and input modalities for both providers.
- Document M3 and
MINIMAX_CN_API_KEY in packages/ai/README.md.
Notes
- No new env vars.
MINIMAX_API_KEY and MINIMAX_CN_API_KEY already cover auth (verified in env-api-keys.ts).
- No
CHANGELOG.md edit per CONTRIBUTING.
- Cost numbers I plan to use (
input 0.6, output 2.4, cacheRead 0.12, cacheWrite 0) are not yet sourced from a pricing doc — happy to revise if maintainers have authoritative numbers.
Code is staged on feature/minimax-m3 on my fork. I'll open the PR after lgtm.
Add direct MiniMax-M3 support for
minimaxandminimax-cnMiniMax released M3, but the registry only has M2.7 and M2.7-highspeed on the
minimaxandminimax-cnproviders, so M3 isn't addressable as a direct model today. I'd like to add it.What
MiniMax-M3tominimaxandminimax-cninpackages/ai/src/models.generated.ts—anthropic-messagesAPI, text+image input, reasoning, 512K context, 128K max tokens. Base URL matches the existing provider (api.minimax.io/anthropicandapi.minimaxi.com/anthropic).scripts/generate-models.tssominimaxDirectSupportedIdsincludes M3 and the 512K context applies only to M3; M2.7 and M2.7-highspeed keep204800/131072.packages/ai/test/coveringbaseUrl,api,contextWindow,maxTokens,reasoning, andinputmodalities for both providers.MINIMAX_CN_API_KEYinpackages/ai/README.md.Notes
MINIMAX_API_KEYandMINIMAX_CN_API_KEYalready cover auth (verified inenv-api-keys.ts).CHANGELOG.mdedit per CONTRIBUTING.input 0.6,output 2.4,cacheRead 0.12,cacheWrite 0) are not yet sourced from a pricing doc — happy to revise if maintainers have authoritative numbers.Code is staged on
feature/minimax-m3on my fork. I'll open the PR afterlgtm.