Skip to content

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

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

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

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

Adds MiniMax as a built-in LLM provider for Tribe, enabling users to select MiniMax-M2.7 and MiniMax-M2.7-highspeed models directly from the provider dropdown.

Changes

Backend (backend/app/core/graph/members.py):

  • Added minimax provider case in BaseNode.__init__ using ChatOpenAI with MiniMax's OpenAI-compatible API endpoint (https://api.minimax.io/v1)
  • Auto-detects MINIMAX_API_KEY from environment variables
  • Clamps temperature to (0, 1] range (MiniMax API constraint)
  • Streaming enabled by default

Frontend (frontend/src/components/Members/EditMember.tsx):

  • Added minimax entry to AVAILABLE_MODELS with MiniMax-M2.7 and MiniMax-M2.7-highspeed models
  • Shows the "Proxy Provider" (base URL) field for MiniMax with default URL hint

Configuration & Docs:

  • .env.example: Added MINIMAX_API_KEY= placeholder
  • README.md: Added "Using MiniMax Models" section with setup instructions

Tests (backend/app/tests/graph/test_minimax_provider.py):

  • 13 unit tests covering provider initialization, temperature clamping, model names, API key handling, and GraphMember/GraphTeam compatibility
  • 3 integration tests (skipped when MINIMAX_API_KEY is not set)

Test Plan

  • Unit tests verify ChatOpenAI instance creation with correct base_url, model, temperature, and API key
  • Temperature clamping tested for edge cases: 0.0→0.01, 1.0→1.0, 1.5→1.0, -0.5→0.01
  • Integration test verified MiniMax API responds correctly via OpenAI-compatible endpoint
  • Manual: select minimax provider in the Edit Member dialog, verify model dropdown shows M2.7 models
  • Manual: verify base URL field appears with default hint for MiniMax provider

Add MiniMax AI (MiniMax-M2.7, MiniMax-M2.7-highspeed) as a built-in
LLM provider using its OpenAI-compatible API.

Backend:
- Route minimax provider through ChatOpenAI with MiniMax base URL
- Auto-detect MINIMAX_API_KEY from environment
- Clamp temperature to (0, 1] range (MiniMax constraint)
- Enable streaming by default

Frontend:
- Add minimax to AVAILABLE_MODELS dropdown with M2.7 models
- Show base URL field for custom proxy configuration

Also includes:
- .env.example: MINIMAX_API_KEY entry
- README: MiniMax setup documentation
- 13 unit tests + 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