feat: add MiniMax M2.5 as a provider option#1338
Open
octo-patch wants to merge 1 commit intothedotmack:mainfrom
Open
feat: add MiniMax M2.5 as a provider option#1338octo-patch wants to merge 1 commit intothedotmack:mainfrom
octo-patch wants to merge 1 commit intothedotmack:mainfrom
Conversation
Add MiniMax as a fourth AI provider alongside Claude, Gemini, and OpenRouter. MiniMax uses OpenAI-compatible REST API via fetch() with support for models MiniMax-M2.5 and MiniMax-M2.5-highspeed (204K context window). Key changes: - New MiniMaxAgent with multi-turn conversation, context truncation, token tracking, and fallback to Claude on retriable errors (429/500) - Settings: CLAUDE_MEM_MINIMAX_API_KEY, MODEL, BASE_URL, MAX_CONTEXT_MESSAGES, MAX_TOKENS - Credential isolation via ~/.claude-mem/.env (MINIMAX_API_KEY) - Provider selection in worker-service, SessionRoutes, SettingsRoutes - Unit tests (6 passing) covering API calls, multi-turn, observations, fallback behavior, and base URL configuration MiniMax API constraints handled: - Temperature defaults to 1.0 (must be >0) - Default base URL: https://api.minimax.io/v1 (overseas)
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 fourth AI provider alongside Claude, Gemini, and OpenRouter.
MiniMaxAgentusing OpenAI-compatible REST API viafetch(), modeled afterOpenRouterAgentMiniMax-M2.5(default) andMiniMax-M2.5-highspeedwith 204K token contextCLAUDE_MEM_MINIMAX_API_KEY,CLAUDE_MEM_MINIMAX_MODEL,CLAUDE_MEM_MINIMAX_BASE_URL,CLAUDE_MEM_MINIMAX_MAX_CONTEXT_MESSAGES,CLAUDE_MEM_MINIMAX_MAX_TOKENS~/.claude-mem/.env(MINIMAX_API_KEY)worker-service.ts,SessionRoutes.ts,SettingsRoutes.tsMiniMax API constraints handled
1.0(MiniMax requires(0.0, 1.0], cannot be 0)https://api.minimax.io/v1(overseas)response_formatsupport (uses prompt engineering + XML parsing)Files changed (8)
src/services/worker/MiniMaxAgent.tstests/minimax_agent.test.tssrc/services/worker-service.tssrc/services/worker-types.ts'minimax'to provider union typesrc/services/worker/http/routes/SessionRoutes.tssrc/services/worker/http/routes/SettingsRoutes.tssrc/shared/EnvManager.tssrc/shared/SettingsDefaultsManager.tsTest plan
bun test tests/minimax_agent.test.tsCLAUDE_MEM_PROVIDER=minimaxandCLAUDE_MEM_MINIMAX_API_KEYin settings