Open
Conversation
MiniMax offers OpenAI-compatible API with models like M2.7 (1M context), M2.5, and M2.5-highspeed. This adds full provider support including: - MiniMaxAIClient with thinking-tag stripping for M2.5+ responses - Auth resolution (override key > DB key > MINIMAX_API_KEY env var > proxy) - Settings API: model validation, key storage, connection test endpoint - Settings UI: 3-way provider toggle with MiniMax model selector - Environment variables: MINIMAX_API_KEY, MINIMAX_BASE_URL - 30 tests (12 unit for auth, 14 unit for client, 4 integration)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds MiniMax as a third AI provider alongside Anthropic and OpenAI. MiniMax exposes an OpenAI-compatible API with models like M2.7 (1M context window), M2.5, and M2.5-highspeed (204K context, fastest).
Changes
lib/minimax-auth.ts— Auth resolution with priority: override key → DB key →MINIMAX_API_KEYenv var → proxy viaMINIMAX_BASE_URLlib/ai-client.ts—MiniMaxAIClientclass using OpenAI SDK with thinking-tag stripping for M2.5+ model responseslib/settings.ts— MiniMax model cache +getProvider()now returns'minimax'as a valid providerapp/api/settings/route.ts— MiniMax model validation (MiniMax-M2.7,MiniMax-M2.5,MiniMax-M2.5-highspeed), API key CRUDapp/api/settings/test/route.ts— MiniMax connection test endpointapp/settings/page.tsx— 3-way provider toggle (Anthropic / OpenAI / MiniMax) with model selector and key management.env.example—MINIMAX_API_KEYandMINIMAX_BASE_URLdocumentationREADME.md— MiniMax in tech stack table and configuration docsWhy MiniMax?
Test plan
npx tsc --noEmit)13 files changed, 799 additions(+), 22 deletions(-)