Skip to content

Latest commit

 

History

History
132 lines (97 loc) · 3.02 KB

File metadata and controls

132 lines (97 loc) · 3.02 KB

MiniMax Backend

The MiniMax backend provides access to MiniMax (Hailuo AI) models through their OpenAI-compatible API. MiniMax offers powerful reasoning models and general-purpose language models.

Overview

MiniMax (Hailuo AI) is a Chinese AI company known for its advanced reasoning models (like MiniMax-M2) and strong general-purpose models. The proxy supports the minimax backend for accessing these models.

Key Features

  • OpenAI-compatible API
  • Strong reasoning capabilities (MiniMax-M2)
  • High-quality general-purpose models
  • Competitive pricing
  • Streaming and non-streaming responses

Configuration

Environment Variables

export MINIMAX_API_KEY="..."

CLI Arguments

# Start proxy with MiniMax as default backend
python -m src.core.cli --default-backend minimax

# With specific model
python -m src.core.cli --default-backend minimax --force-model MiniMax-M2

YAML Configuration

# config.yaml
backends:
  minimax:
    type: minimax

default_backend: minimax

Available Models

  • MiniMax-M2: Advanced reasoning model, excellent for complex tasks
  • abab6.5s: General-purpose model
  • abab6.5t: Turbo model for faster responses

Usage Examples

Basic Chat Completion

curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_PROXY_KEY" \
  -d '{
    "model": "MiniMax-M2",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

Reasoning Task

curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_PROXY_KEY" \
  -d '{
    "model": "MiniMax-M2",
    "messages": [
      {"role": "user", "content": "Solve this logic puzzle..."}
    ]
  }'

Streaming Response

curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_PROXY_KEY" \
  -d '{
    "model": "MiniMax-M2",
    "messages": [
      {"role": "user", "content": "Explain quantum physics"}
    ],
    "stream": true
  }'

Use Cases

Hybrid Backend Reasoning

MiniMax-M2 is highly recommended as a reasoning model in the Hybrid Backend configuration:

curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hybrid:[minimax:MiniMax-M2,qwen-oauth:qwen3-coder-plus]",
    "messages": [{"role": "user", "content": "Complex coding task"}]
  }'

See Hybrid Backend for details.

Complex Problem Solving

MiniMax models excel at:

  • Logical reasoning
  • Mathematical problem solving
  • Complex instruction following
  • Strategic planning

Related Features

Related Documentation