feat: add MiniMax provider support (M3 default) - #130
Conversation
- Add MiniMax (minimax) as an OpenAI-compatible provider in both core and nanobot registries - Register MINIMAX_API_KEY environment variable - Default base URL: https://api.minimax.io/v1 - Models: MiniMax-M2.7, MiniMax-M2.7-highspeed - Add unit tests for registry, config, and provider instantiation - Update deepcode_config.json.example and README API docs: https://platform.minimax.io/docs/api-reference/text-openai-api
- Update README references to use MiniMax-M3 as the recommended model - Add unit test for M3 model lookup, keep M2.7 lookup as alternative - Remove older model references (M2.5/M2.1/M2/M1) M3 features: 512K context window, up to 128K output, image input support.
|
Your MiniMax provider has been ported to Closing this branch rather than merging it because it also touched
One thing worth knowing, since it affects whether you show up as a contributor: the commits here are authored as |
Ports three provider contributions that could not merge as submitted: #138 and #130 also touched new_ui/ and nanobot/, and #116 targeted nanobot/ only. Those trees were removed in the v2.0 refactor. The provider work itself applies unchanged to core/providers. ProvidersConfig reads each provider via getattr(providers, spec.name), so a ProviderSpec without a matching field is silently skipped — all three get both halves, as the ProvidersConfig docstring requires. Endpoints verified reachable: router.requesty.ai (200), api.minimax.io (401), api.forge.tensorblock.co (401). Also fixes a gateway bug #116 found in nanobot's provider that core had only half-fixed: spec.env_key was forced for gateways, but env_extras still used setdefault, so a stale ambient variable outranked the gateway the user picked. Dropped from the originals: the tests covering new_ui's requesty_models service and nanobot's registry. One of those imported "nanobot.config.schema", which now resolves to an unrelated PyPI package (nanobot-ai) when installed — it fails locally and skips in CI, testing nothing either way. Co-authored-by: Thibault Jaigu <thibault.jaigu@gmail.com> Co-authored-by: Yiiii0 <yiqiaozhou@outlook.com> Co-authored-by: octo-patch <octo-patch@github.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
Add MiniMax as a new LLM provider using its OpenAI-compatible API, with
MiniMax-M3as the default model.Changes
core/providers/registry.py): AddProviderSpecforminimaxwithopenai_compatbackend and default base URLhttps://api.minimax.io/v1core/config.py): Addminimaxfield toProvidersConfignanobot/nanobot/providers/registry.py): AddProviderSpecwith LiteLLMopenaiprefix andminimaxbase keyword detectionnanobot/nanobot/config/schema.py): Addminimaxfield toProvidersConfigdeepcode_config.json.example): Addminimaxprovider entry with${MINIMAX_API_KEY}MiniMax-M3tests/minimax_provider_test.py): Unit tests covering registry lookup (including M3 and M2.7), config parsing, and provider instantiationConfiguration
{ "agents": { "defaults": { "provider": "minimax", "model": "minimax/MiniMax-M3" } }, "providers": { "minimax": { "apiKey": "${MINIMAX_API_KEY}" } } }Available Models
MiniMax-M3MiniMax-M2.7MiniMax-M2.7-highspeedAPI Reference