Skip to content

feat: add MiniMax CLI provider with Anthropic-compatible runtime - #86

Open
octo-patch wants to merge 2 commits into
anymorph-ai:mainfrom
octo-patch:octo/20260728-provider-add-recvpv17wXWqXp
Open

feat: add MiniMax CLI provider with Anthropic-compatible runtime#86
octo-patch wants to merge 2 commits into
anymorph-ai:mainfrom
octo-patch:octo/20260728-provider-add-recvpv17wXWqXp

Conversation

@octo-patch

Copy link
Copy Markdown

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 SDK query loop, points ANTHROPIC_BASE_URL at the Anthropic-compatible MiniMax endpoint, and switches between the global (api.minimax.io) and China (api.minimaxi.com) regional endpoints via MINIMAX_REGION (default global_en).
  • lib/constants/cliModels.ts: register minimax in the CLI key type, default model map, model definition map, and normalize/display-name dispatch.
  • types/cli.ts / types/backend/cli.ts: extend CLIType and add a MiniMax option to CLI_OPTIONS.
  • lib/utils/cliOptions.ts: add minimax to ACTIVE_CLI_IDS.
  • app/api/chat/[project_id]/act/route.ts: dispatch minimax to 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:

  • Set a MiniMax API key in Settings → AI Agents → MiniMax CLI (stored as MINIMAX_API_KEY and injected as ANTHROPIC_AUTH_TOKEN/ANTHROPIC_API_KEY at runtime).
  • Set MINIMAX_REGION=cn_zh to target the China Anthropic-compatible endpoint (api.minimaxi.com); default is global_en (api.minimax.io).

Checks run:

  • npx tsc --noEmit (type-check): passed.
  • npx next lint: passed with no warnings or errors.

@octo-patch

Copy link
Copy Markdown
Author

I added the missing MiniMax provider icon so the new CLI entries no longer reference an absent asset. I ran git diff --check and verified the configured icon path resolves; dependency installation could not run because the worker filesystem is full.

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