feat: add MiniMax CLI provider with Anthropic-compatible runtime - #86
Open
octo-patch wants to merge 2 commits into
Open
feat: add MiniMax CLI provider with Anthropic-compatible runtime#86octo-patch wants to merge 2 commits into
octo-patch wants to merge 2 commits into
Conversation
Author
|
I added the missing MiniMax provider icon so the new CLI entries no longer reference an absent asset. I ran |
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.
Reason: Add the MiniMax provider to the CLI registry with Anthropic-compatible runtime support for the configured global_en and cn_zh endpoints.
Adds a new MiniMax CLI provider and its two current models (MiniMax-M3 and MiniMax-M2.7), wired through the existing Claude Agent SDK runtime.
Changes:
lib/constants/minimaxModels.ts: new model registry with MiniMax-M3 (1M context, multimodal input) and MiniMax-M2.7 (204k context, text only), plus alias normalization and display-name helpers.lib/services/cli/minimax.ts: new CLI service modeled on the GLM runtime. It drives the Claude Agent SDKqueryloop, pointsANTHROPIC_BASE_URLat the Anthropic-compatible MiniMax endpoint, and switches between the global (api.minimax.io) and China (api.minimaxi.com) regional endpoints viaMINIMAX_REGION(defaultglobal_en).lib/constants/cliModels.ts: registerminimaxin the CLI key type, default model map, model definition map, and normalize/display-name dispatch.types/cli.ts/types/backend/cli.ts: extendCLITypeand add a MiniMax option toCLI_OPTIONS.lib/utils/cliOptions.ts: addminimaxtoACTIVE_CLI_IDS.app/api/chat/[project_id]/act/route.ts: dispatchminimaxto the new initializer/apply executors.app/api/settings/cli-status/route.ts: report MiniMax CLI/model status (reuses the Claude Code runtime check).lib/services/settings.ts/contexts/GlobalSettingsContext.tsx: default MiniMax settings entry.components/settings/GlobalSettings.tsx: MiniMax CLI card with API key field, install/auth/test commands, and branding.components/modals/CreateProjectModal.tsx: MiniMax option in the new-project CLI picker.Configuration:
MINIMAX_API_KEYand injected asANTHROPIC_AUTH_TOKEN/ANTHROPIC_API_KEYat runtime).MINIMAX_REGION=cn_zhto target the China Anthropic-compatible endpoint (api.minimaxi.com); default isglobal_en(api.minimax.io).Checks run:
npx tsc --noEmit(type-check): passed.npx next lint: passed with no warnings or errors.