Skip to content

feat: add MiniMax provider support (M3 default) - #130

Closed
octo-patch wants to merge 2 commits into
HKUDS:mainfrom
octo-patch:feature/add-minimax-provider
Closed

feat: add MiniMax provider support (M3 default)#130
octo-patch wants to merge 2 commits into
HKUDS:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

@octo-patch octo-patch commented May 13, 2026

Copy link
Copy Markdown

Summary

Add MiniMax as a new LLM provider using its OpenAI-compatible API, with MiniMax-M3 as the default model.

Changes

  • Core registry (core/providers/registry.py): Add ProviderSpec for minimax with openai_compat backend and default base URL https://api.minimax.io/v1
  • Core config (core/config.py): Add minimax field to ProvidersConfig
  • Nanobot registry (nanobot/nanobot/providers/registry.py): Add ProviderSpec with LiteLLM openai prefix and minimax base keyword detection
  • Nanobot config (nanobot/nanobot/config/schema.py): Add minimax field to ProvidersConfig
  • Example config (deepcode_config.json.example): Add minimax provider entry with ${MINIMAX_API_KEY}
  • README: Add MiniMax to the provider configuration example; update model recommendations to use MiniMax-M3
  • Tests (tests/minimax_provider_test.py): Unit tests covering registry lookup (including M3 and M2.7), config parsing, and provider instantiation

Configuration

{
  "agents": {
    "defaults": {
      "provider": "minimax",
      "model": "minimax/MiniMax-M3"
    }
  },
  "providers": {
    "minimax": {
      "apiKey": "${MINIMAX_API_KEY}"
    }
  }
}

Available Models

Model ID Description
MiniMax-M3 512K context, up to 128K output, image input support (default)
MiniMax-M2.7 Previous generation model
MiniMax-M2.7-highspeed Previous generation low-latency variant

API Reference

octo-patch added 2 commits May 13, 2026 16:24
- 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.
@octo-patch octo-patch changed the title feat: add MiniMax provider support feat: add MiniMax provider support (M3 default) Jun 5, 2026
@Zongwei9888

Copy link
Copy Markdown
Collaborator

Your MiniMax provider has been ported to core/providers in #159 — the ProviderSpec and the ProvidersConfig field, plus your tests/minimax_provider_test.py.

Closing this branch rather than merging it because it also touched nanobot/, which the v2.0 refactor removed. Only the nanobot-facing tests were dropped; the core registry tests are all there.

api.minimax.io/v1 verified reachable while porting.

One thing worth knowing, since it affects whether you show up as a contributor: the commits here are authored as octo-patch@github.com, which is not registered to a GitHub account, so GitHub attributes them to nobody. #159 carries a Co-authored-by: trailer with that same address — if you add it to your account under Settings → Emails, the attribution resolves retroactively. Entirely up to you.

@Zongwei9888 Zongwei9888 closed this Aug 6, 2026
Zongwei9888 added a commit that referenced this pull request Aug 6, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants