Skip to content

Add MiniMax as built-in LLM provider#447

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

Add MiniMax as built-in LLM provider#447
octo-patch wants to merge 1 commit into
MadcowD:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

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

Copy link
Copy Markdown

Summary

Adds MiniMax as a built-in LLM provider. MiniMax offers OpenAI-compatible API endpoints, so this integration leverages the existing openai SDK with a custom base_urlno extra dependencies needed.

Models registered

Model Description
MiniMax-M2.7 Latest flagship model (204K context)
MiniMax-M2.7-highspeed Fast variant of M2.7
MiniMax-M2.5 Previous-gen thinking model
MiniMax-M2.5-highspeed Fast variant of M2.5

Usage

import ell

# Auto-registered when MINIMAX_API_KEY env var is set
@ell.simple(model="MiniMax-M2.7")
def hello(name: str):
    """You are a helpful assistant."""
    return f"Say hello to {name}."

# Or with explicit client
import openai
client = openai.Client(base_url="https://api.minimax.io/v1", api_key="...")

@ell.simple(model="MiniMax-M2.5", client=client)
def chat(prompt: str):
    """You are a helpful assistant."""
    return prompt

Changes (5 files, +478 lines)

  • src/ell/models/minimax.py — Model registration with auto-detection via MINIMAX_API_KEY
  • src/ell/models/__init__.py — Import minimax module
  • tests/test_minimax_provider.py — 16 unit tests + 3 integration tests
  • examples/providers/minimax_ex.py — Usage example
  • docs/src/core_concepts/models_and_api_clients.rst — Add MiniMax to provider list

Test plan

  • 16 unit tests for model registration and OpenAI provider compatibility
  • 3 integration tests with real MiniMax API (chat completion, streaming, custom client)
  • All 87 existing tests pass without regressions

Design notes

  • Follows the same pattern as xai.py — OpenAI client with custom base_url
  • No new provider class needed since MiniMax is fully OpenAI-compatible
  • Silently skips auto-registration when MINIMAX_API_KEY is not set

@octo-patch octo-patch force-pushed the feature/add-minimax-provider branch from e246a35 to d4f7d39 Compare March 20, 2026 11:27
MiniMax provides OpenAI-compatible API endpoints, so models are registered
using the standard openai SDK with a custom base_url. No extra dependencies.

Models: MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.5-highspeed.
Auto-registers when MINIMAX_API_KEY env var is set, or via register(api_key=...).

Changes:
- src/ell/models/minimax.py: Model registration module
- src/ell/models/__init__.py: Import minimax module
- tests/test_minimax_provider.py: 16 unit + 3 integration tests
- examples/providers/minimax_ex.py: Usage example
- docs: Add MiniMax to supported providers list
@octo-patch octo-patch force-pushed the feature/add-minimax-provider branch from d4f7d39 to bd30e6a Compare March 20, 2026 11:36
@octo-patch octo-patch changed the title Add MiniMax as a built-in LLM provider Add MiniMax as built-in LLM provider Mar 20, 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