feat: add MiniMax as a built-in LLM provider (#940)

Add MiniMax to the provider registry with OpenAI-compatible protocol.

Available models:
- MiniMax-M2.5 (default) - 204,800 token context window
- MiniMax-M2.5-highspeed - same performance, faster inference

Configuration:
  LLM_BACKEND=minimax
  MINIMAX_API_KEY=<your-key>

Supports both global (api.minimax.io) and China mainland
(api.minimaxi.com) endpoints via MINIMAX_BASE_URL env var.

Co-authored-by: PR Bot <[email protected]>
This commit is contained in:
Ethan Clarke
2026-03-12 11:17:24 -07:00
committed by GitHub
co-authored by PR Bot
parent f776d96395
commit 863702a87a
3 changed files with 47 additions and 0 deletions
+6
View File
@@ -70,6 +70,12 @@ NEARAI_AUTH_URL=https://private.near.ai
# LLM_BASE_URL=https://api.fireworks.ai/inference/v1 # LLM_BASE_URL=https://api.fireworks.ai/inference/v1
# LLM_API_KEY=fw_... # LLM_API_KEY=fw_...
# === MiniMax ===
# LLM_BACKEND=minimax
# MINIMAX_API_KEY=...
# MINIMAX_MODEL=MiniMax-M2.5
# MINIMAX_BASE_URL=https://api.minimax.io/v1 # default (global); use https://api.minimaxi.com/v1 for China
# === Anthropic Direct === # === Anthropic Direct ===
# LLM_BACKEND=anthropic # LLM_BACKEND=anthropic
# ANTHROPIC_MODEL=claude-sonnet-4-6 # ANTHROPIC_MODEL=claude-sonnet-4-6
+20
View File
@@ -15,6 +15,7 @@ configurations.
| io.net | `ionet` | `IONET_API_KEY` | Intelligence API | | io.net | `ionet` | `IONET_API_KEY` | Intelligence API |
| Mistral | `mistral` | `MISTRAL_API_KEY` | Mistral models | | Mistral | `mistral` | `MISTRAL_API_KEY` | Mistral models |
| Yandex AI Studio | `yandex` | `YANDEX_API_KEY` | YandexGPT models | | Yandex AI Studio | `yandex` | `YANDEX_API_KEY` | YandexGPT models |
| MiniMax | `minimax` | `MINIMAX_API_KEY` | MiniMax-M2.5 models |
| Cloudflare Workers AI | `cloudflare` | `CLOUDFLARE_API_KEY` | Access to Workers AI | | Cloudflare Workers AI | `cloudflare` | `CLOUDFLARE_API_KEY` | Access to Workers AI |
| Ollama | `ollama` | No | Local inference | | Ollama | `ollama` | No | Local inference |
| AWS Bedrock | `bedrock` | AWS credentials | Native Converse API | | AWS Bedrock | `bedrock` | AWS credentials | Native Converse API |
@@ -74,6 +75,25 @@ Pull a model first: `ollama pull llama3.2`
--- ---
## MiniMax
[MiniMax](https://platform.minimax.io) provides high-performance language models with 204,800 token context windows.
```env
LLM_BACKEND=minimax
MINIMAX_API_KEY=...
```
Available models: `MiniMax-M2.5` (default), `MiniMax-M2.5-highspeed`
To use the China mainland endpoint, set:
```env
MINIMAX_BASE_URL=https://api.minimaxi.com/v1
```
---
## AWS Bedrock (requires `--features bedrock`) ## AWS Bedrock (requires `--features bedrock`)
Uses the native AWS Converse API via `aws-sdk-bedrockruntime`. Supports standard AWS Uses the native AWS Converse API via `aws-sdk-bedrockruntime`. Supports standard AWS
+21
View File
@@ -382,6 +382,27 @@
"can_list_models": true "can_list_models": true
} }
}, },
{
"id": "minimax",
"aliases": [
"mini_max"
],
"protocol": "open_ai_completions",
"default_base_url": "https://api.minimax.io/v1",
"api_key_env": "MINIMAX_API_KEY",
"api_key_required": true,
"base_url_env": "MINIMAX_BASE_URL",
"model_env": "MINIMAX_MODEL",
"default_model": "MiniMax-M2.5",
"description": "MiniMax API (MiniMax-M2.5 and MiniMax-M2.5-highspeed models)",
"setup": {
"kind": "api_key",
"secret_name": "llm_minimax_api_key",
"key_url": "https://platform.minimax.io",
"display_name": "MiniMax",
"can_list_models": false
}
},
{ {
"id": "cloudflare", "id": "cloudflare",
"aliases": [ "aliases": [