Skip to content

feat: add MiniMax as first-class LLM provider (M3 default)#476

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

feat: add MiniMax as first-class LLM provider (M3 default)#476
octo-patch wants to merge 2 commits into
SylphAI-Inc:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

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

Copy link
Copy Markdown

Summary

Add MiniMax as a first-class LLM provider in AdalFlow's model client system, with MiniMax-M3 as the default model.

  • New MiniMaxClient extending OpenAIClient — MiniMax's API is fully OpenAI-compatible
  • Base URL: https://api.minimax.io/v1
  • API key: read from MINIMAX_API_KEY environment variable
  • Supported models: MiniMax-M3 (default; 512K context, up to 128K output, image input), MiniMax-M2.7, MiniMax-M2.7-highspeed
  • Registered in model_client/__init__.py via LazyImport (uses openai SDK dependency)

Changes

File Change
adalflow/components/model_client/minimax_client.py New MiniMaxClient class with docs and example usage (default MiniMax-M3)
adalflow/components/model_client/__init__.py Register MiniMaxClient via LazyImport + add to __all__
tests/test_minimax_client.py 12 unit tests covering init, sync/async clients, Generator integration, serialization (assertions target MiniMax-M3)

Usage

from adalflow.core import Generator
from adalflow.components.model_client import MiniMaxClient

generator = Generator(
    model_client=MiniMaxClient(),
    model_kwargs={
        "model": "MiniMax-M3",
        "temperature": 0.7,
        "stream": False,
    }
)

output = generator(prompt_kwargs={"input_str": "Hello!"})

Test plan

  • All 12 new unit tests pass (pytest tests/test_minimax_client.py -v)
  • Existing client tests unaffected (test_deepseek_client.py, test_sambanovaclient.py, test_openai_client.py all pass)
  • Follows the exact same pattern as DeepSeekClient, XAIClient, SambaNovaClient

PR Bot and others added 2 commits March 22, 2026 15:50
Add MiniMaxClient extending OpenAIClient for MiniMax's OpenAI-compatible
API. Supports MiniMax-M2.7, MiniMax-M2.5, and MiniMax-M2.5-highspeed
models via MINIMAX_API_KEY environment variable.

- New minimax_client.py with MiniMaxClient class
- Register MiniMaxClient in model_client __init__.py
- Add 12 unit tests covering init, sync/async clients, Generator
  integration, serialization, and input conversion
- Default model in docstring example: MiniMax-M2.7 -> MiniMax-M3
- Available models documented: MiniMax-M3 (default; 512K context, up
  to 128K output, image input), MiniMax-M2.7, MiniMax-M2.7-highspeed
- Drop M2.5 / M2.5-highspeed mentions
- Tests: switch primary model assertions to MiniMax-M3; rename
  highspeed test to MiniMax-M2.7-highspeed
@octo-patch octo-patch changed the title feat: add MiniMax as first-class LLM provider feat: add MiniMax as first-class LLM provider (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.

1 participant