Skip to content

feat: add MiniMax as first-class LLM provider with M3 default#139

Open
octo-patch wants to merge 2 commits into
ATH-MaaS:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as first-class LLM provider with M3 default#139
octo-patch wants to merge 2 commits into
ATH-MaaS:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

@octo-patch octo-patch commented Mar 21, 2026

Copy link
Copy Markdown

Summary

  • Add MiniMax as a first-class LLM provider alongside OpenAI and LMStudio
  • Ship MiniMax-M3 as the default model (512K context window, 128K max output, image input support)
  • Also expose MiniMax-M2.7 and MiniMax-M2.7-highspeed as alternatives
  • Auto-detect MiniMax via MINIMAX_API_KEY / CC_MINIMAX_API_KEY environment variables
  • Return static model list for MiniMax (no /v1/models endpoint available)
  • Verify MiniMax API key via chat completions endpoint

Why M3

MiniMax-M3 is the latest MiniMax model. Compared with M2.7 it ships a larger 512K context window, up to 128K output, and image input support on the OpenAI-compatible endpoint — making it the right default for new ComfyUI-Copilot users while keeping M2.7 / M2.7-highspeed available for backwards compatibility.

Model list (final)

Model ID Notes
MiniMax-M3 512K context, 128K max output, image input — default
MiniMax-M2.7 Previous-generation model
MiniMax-M2.7-highspeed Previous-generation low-latency variant

Older models (M2.5 / M2.1 / M2 / M1) are intentionally not included.

Changes

  • backend/utils/globals.py: is_minimax_url(), MINIMAX_MODELS (M3 first), env var support, auto-detect in apply_llm_env_defaults()
  • backend/agent_factory.py: Default to MiniMax-M3 when base_url points to MiniMax API
  • backend/controller/llm_api.py: Static MiniMax model list (M3 first), key verification via chat completions using M3
  • README.md, README_CN.md: MiniMax configuration documentation (env vars + UI) describing M3 (512K / 128K) + M2.7 alternatives
  • tests/: Unit tests + integration tests with ComfyUI runtime stubs, including M3-default / M3-first / older-models-removed coverage

Test plan

  • Unit tests pass (URL detection, MINIMAX_MODELS contents including M3 first / older models removed, env defaults, agent factory default = M3)
  • Integration tests updated to use MiniMax-M3 against the real MiniMax API
  • Manual smoke test in ComfyUI with a MiniMax API key

@CLAassistant

CLAassistant commented Mar 21, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Add MiniMax (api.minimax.io) as supported LLM provider alongside OpenAI and LMStudio.
MiniMax-M2.7 and MiniMax-M2.7-highspeed models (1M context window).

- backend/utils/globals.py: is_minimax_url(), MINIMAX_MODELS, env vars
- backend/agent_factory.py: MiniMax default model
- backend/controller/llm_api.py: static model list, key verification
- README.md, README_CN.md: MiniMax configuration docs
- tests/: 27 unit tests + 5 integration tests
@octo-patch
octo-patch force-pushed the feature/add-minimax-provider branch from 8497eaf to cb47f15 Compare March 21, 2026 10:56
@octo-patch octo-patch changed the title feat: add MiniMax as LLM provider feat: add MiniMax as first-class LLM provider Mar 21, 2026
@Jefsky

Jefsky commented Apr 29, 2026

Copy link
Copy Markdown

Hi @octo-patch! Just a heads-up: the base_url https://api.minimax.io/v1 was tested in a related Pixelle-Video project and couldn't fetch the model list. The working URL is https://api.minimax.chat/v1 — that one successfully returns the model list (e.g. MiniMax-M2.7). You may want to update this PR to use the correct URL. Thanks!

- Add MiniMax-M3 to MINIMAX_MODELS (first entry, with image support)
- Default to MiniMax-M3 when base_url points to MiniMax API
- Update key verification and integration tests to use M3
- Keep MiniMax-M2.7 and MiniMax-M2.7-highspeed as alternatives
- Correct README context-window description (512K M3, no 1M claim)
- Add unit tests for M3 presence/order/older-model removal
@octo-patch octo-patch changed the title feat: add MiniMax as first-class LLM provider feat: add MiniMax as first-class LLM provider with M3 default Jun 7, 2026
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.

3 participants