Skip to content

Add MiniMax as LLM provider for target and controller models#7

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

Add MiniMax as LLM provider for target and controller models#7
octo-patch wants to merge 1 commit intoutkusen:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

  • Add MiniMax as a first-class LLM provider alongside OpenAI, Anthropic, Google, XAI, and Ollama
  • MiniMax uses an OpenAI-compatible API at https://api.minimax.io/v1 with models like MiniMax-M2.7 (1M context) and MiniMax-M2.5
  • Can be used as both target and controller model via --target-model-type minimax / --controller-model-type minimax

Changes

  • promptmap2.py: Add minimax to CLI choices, API key validation, client initialization (OpenAI SDK with custom base_url), chat completion handling with think tag stripping for reasoning models
  • README.md: Add MiniMax to provider list, API key docs, controller model recommendations
  • tests/test_minimax_provider.py: 19 unit tests covering API key validation, client init, prompt sending, think tag stripping, error handling, CLI arg parsing
  • tests/test_minimax_integration.py: 3 integration tests (chat completion, system prompt defense, controller evaluation)

Usage

export MINIMAX_API_KEY=your-minimax-key

# Test MiniMax model as target
python3 promptmap2.py --target-model MiniMax-M2.7 --target-model-type minimax

# Use MiniMax as controller for evaluating another model
python3 promptmap2.py --target-model llama2:7b --target-model-type ollama   --controller-model MiniMax-M2.7 --controller-model-type minimax

Test plan

  • 19 unit tests pass (mock-based, no API key needed)
  • 3 integration tests pass (real MiniMax API calls)
  • Existing provider behavior unchanged

MiniMax (https://www.minimax.io) offers OpenAI-compatible chat completion
API with models like M2.7 and M2.5. This adds MiniMax as a first-class
provider alongside OpenAI, Anthropic, Google, XAI, and Ollama.

Changes:
- Add minimax to --target-model-type and --controller-model-type CLI choices
- Add MINIMAX_API_KEY validation and client initialization
- Add MiniMax chat completion handling with think tag stripping for reasoning models
- Update README with MiniMax in provider list, API key docs, and controller recommendations
- Add 19 unit tests and 3 integration tests
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