Skip to content

Add MiniMax as LLM provider#961

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

Add MiniMax as LLM provider#961
octo-patch wants to merge 1 commit into
refuel-ai:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Adds MiniMax AI as a new LLM provider for autolabel, enabling users to label datasets using MiniMax's cloud models via the OpenAI-compatible API.

Supported Models

  • MiniMax-M2.7 (latest, 1M context window)
  • MiniMax-M2.5 (204K context)
  • MiniMax-M2.5-highspeed (204K context, lower latency)

Changes

  • New file: src/autolabel/models/minimax.py — Full provider with sync/async labeling, retry logic, think-tag stripping, temperature clamping [0,1], and per-model cost tracking
  • Modified: src/autolabel/schema.py — Added MINIMAX = "minimax" to ModelProvider enum
  • Modified: src/autolabel/models/__init__.py — Registered MiniMaxLLM in MODEL_REGISTRY
  • Modified: README.md — Added MiniMax to the list of supported LLM providers
  • New: 25 unit tests + 3 integration tests with 8 config files

Usage

{
  "model": {
    "provider": "minimax",
    "name": "MiniMax-M2.7",
    "params": {
      "temperature": 0.1,
      "max_tokens": 1000
    }
  }
}

Requires MINIMAX_API_KEY environment variable. Get an API key at https://platform.minimaxi.com.

Test Plan

  • 25 unit tests passing (initialization, labeling, cost calculation, think-tag stripping, error handling, async, registry)
  • 3 integration tests passing with real MiniMax API (sync label, M2.5-highspeed label, async label)
  • Existing tests unaffected

14 files changed, 845 additions, 1 deletion

Add MiniMax AI (https://www.minimaxi.com) as a new LLM provider for
autolabel, supporting MiniMax-M2.7, MiniMax-M2.5, and
MiniMax-M2.5-highspeed models via the OpenAI-compatible chat
completions API.

- New provider: src/autolabel/models/minimax.py with sync/async
  labeling, retry logic, think-tag stripping, temperature clamping,
  and per-model cost tracking
- Register MINIMAX in ModelProvider enum and MODEL_REGISTRY
- 25 unit tests + 3 integration tests
- Test configs for various model/parameter combinations
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