Skip to content

feat: add MiniMax as first-class LLM provider - #191

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

feat: add MiniMax as first-class LLM provider#191
octo-patch wants to merge 1 commit into
ChatAnyTeam:masterfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

Add MiniMax AI as a first-class LLM provider with full integration across the ChatAny stack.

Supported Models

  • MiniMax-M2.7 - Latest flagship model with 204K context
  • MiniMax-M2.5 - Balanced model for general use
  • MiniMax-M2.5-highspeed - Optimized for low-latency responses

Changes (16 files, 869 additions)

  • Constants (constant.ts): ServiceProvider.MiniMax, ModelProvider.MiniMax, ApiPath.MiniMax, base URL, model list
  • Client Platform (platforms/minimax.ts): MiniMaxApi with streaming SSE via OpenAI-compatible API
  • Server Proxy (api/minimax/[...path]/route.ts): Edge Runtime proxy with auth and model filtering
  • Auth (auth.ts): MiniMax API key injection
  • Server Config (server.ts): MINIMAX_API_KEY and MINIMAX_URL env vars
  • Access Store (access.ts): MiniMax URL/key fields + isValidMiniMax() validation
  • Settings UI (settings.tsx): MiniMax config in provider dropdown
  • Locales (en.ts, cn.ts): English and Chinese locale strings
  • Factory Dispatch (api.ts): ClientApi and getClientApi dispatch
  • Docs: README.md and README_EN.md updates
  • Tests: 29 unit + integration tests with vitest

Configuration

Set MINIMAX_API_KEY env var or configure via Settings > Custom Config > MiniMax.

Test Plan

  • 16 unit tests: constants, models, enums, API config
  • 13 integration tests: client API path, message extraction, factory dispatch
  • All 29 tests pass
  • Manual: Select MiniMax provider in settings and verify chat works
Add MiniMax AI as a new LLM provider with support for MiniMax-M2.7,
MiniMax-M2.5, and MiniMax-M2.5-highspeed models via OpenAI-compatible API.

Changes:
- Add MiniMax enums, base URL, model list, and API paths (constant.ts)
- Add MiniMaxApi client platform with streaming support (platforms/minimax.ts)
- Add server-side proxy route (/api/minimax/[...path]/route.ts)
- Add MiniMax API key injection in auth.ts
- Add MINIMAX_API_KEY/MINIMAX_URL env vars (server.ts, .env.template)
- Add MiniMax fields to access store with validation (access.ts)
- Add MiniMax config UI in settings (settings.tsx)
- Add MiniMax locale strings for en and cn
- Add factory dispatch for MiniMax in ClientApi and getClientApi
- Update README.md and README_EN.md with MiniMax docs
- Add 29 unit and integration tests with vitest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant