Skip to content

feat: add MiniMax as first-class LLM provider#476

Open
octo-patch wants to merge 1 commit intoSylphAI-Inc:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as first-class LLM provider#476
octo-patch wants to merge 1 commit intoSylphAI-Inc:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Add MiniMax as a first-class LLM provider in AdalFlow's model client system.

  • 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-M2.7 (latest), MiniMax-M2.5, MiniMax-M2.5-highspeed (204K context)
  • 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
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

Usage

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

generator = Generator(
    model_client=MiniMaxClient(),
    model_kwargs={
        "model": "MiniMax-M2.7",
        "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

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
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