feat: add MiniMax as first-class LLM provider (default M3)#594
feat: add MiniMax as first-class LLM provider (default M3)#594octo-patch wants to merge 2 commits into
Conversation
Add MiniMax model provider (M2.7, M2.7-highspeed, M2.5, M2.5-highspeed) via the OpenAI-compatible Chat Completions API. The provider extends OpenAIProvider with MiniMax-specific behavior: - Default base URL: https://api.minimax.io/v1 - MINIMAX_API_KEY environment variable auto-detection - Temperature clamping to (0.0, 1.0] range - <think> tag stripping for reasoning model output - Chat Completions protocol enforcement (no Responses API) - Token usage tracking with provider='minimax' Includes 34 unit tests + 3 integration tests and README documentation.
|
Thanks a lot for the contribution! This is a very solid addition and we really appreciate the effort in making MiniMax a first-class provider in the system! One thing we’d like to further discuss is the necessity of introducing a dedicated provider for each model vendor. Since many providers (including MiniMax) expose OpenAI-compatible APIs, it might be possible to reuse a more unified abstraction with minimal adaptation, rather than maintaining separate provider implementations 🤔. It would be helpful to better understand the design trade-offs here—for example, whether the provider-specific logic (e.g., parameter constraints, output post-processing like think-tag stripping, etc.) justifies a separate provider, or if these differences could be handled in a more generic layer. Looking forward to your thoughts! |
- Add MiniMax-M3 as the default supported model (512K context, 128K max output, image input) - Keep MiniMax-M2.7 and MiniMax-M2.7-highspeed as alternatives - Drop documentation references to older M2.5/M2.5-highspeed - Update unit tests and integration test defaults to M3
Summary
MiniMax-M3(512K context, up to 128K output, image input support);MiniMax-M2.7andMiniMax-M2.7-highspeedremain available as alternativesOpenAIProviderwith MiniMax-specific behavior: temperature clamping to (0.0, 1.0],<think>tag stripping for reasoning-model output,MINIMAX_API_KEYauto-detection, and forced Chat Completions protocolChanges
runtime/node/agent/providers/minimax_provider.pyMiniMaxProviderclass extendingOpenAIProvider; docstring lists M3 (default) / M2.7 / M2.7-highspeedruntime/node/agent/providers/builtin_providers.pyminimaxinProviderRegistrywith M3 in the summarytests/test_minimax_provider.pyMiniMax-M3README.mdUsage
Set
MINIMAX_API_KEYin.envand configure agent nodes:Why M3 as default
MiniMax-M3is the latest MiniMax model and offers significant upgrades over the previous generation: 512K context window (vs 192K for M2.7), up to 128K max output, and image input via the OpenAI-compatible API. OlderM2.5/M2.5-highspeedmodels are no longer listed since they are superseded by the kept M2.7 line plus the new M3 default.Test plan
MINIMAX_API_KEY) verifying real API calls with M3 and M2.7-highspeed models