Skip to content

Add MiniMax provider preset to the subprocess runner - #256

Open
octo-patch wants to merge 1 commit into
moazbuilds:masterfrom
octo-patch:octo/20260729-provider-add-recvqbxwLWRiqf
Open

Add MiniMax provider preset to the subprocess runner#256
octo-patch wants to merge 1 commit into
moazbuilds:masterfrom
octo-patch:octo/20260729-provider-add-recvqbxwLWRiqf

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: The subprocess runner had a first-class GLM provider shortcut but no MiniMax provider preset.

What changed

Adds a MiniMax provider preset to the Claude subprocess runner, mirroring the existing GLM shortcut in src/runner.ts.

  • New resolveMinimaxModel() maps the model setting aliases minimax, minimax-m3, and minimax-m2.7 to their canonical model IDs MiniMax-M3 and MiniMax-M2.7 (the bare minimax alias resolves to the latest, MiniMax-M3).
  • Both Anthropic-compatible endpoints are selectable: the global endpoint https://api.minimax.io/anthropic by default, or the China endpoint https://api.minimaxi.com/anthropic when a -cn suffix is appended to the alias (e.g. minimax-m3-cn).
  • buildChildEnv() sets ANTHROPIC_BASE_URL for the selected endpoint; the existing api setting continues to supply ANTHROPIC_AUTH_TOKEN.
  • The four --model argument sites are centralized behind a new resolveModelArg() helper. It preserves the existing behavior (GLM uses the provider default with no --model flag; other models pass through unchanged) and rewrites MiniMax aliases to their canonical model IDs.
  • Documented the new model/api values in commands/config.md and commands/start.md.

Checks

  • bun test — 145 pass, 3 pre-existing unrelated failures in sessionFiles (present before this change).
  • bun test src/__tests__/provider-preset.test.ts — 11 pass (new tests for the preset resolution and child-env routing).

Mirror the existing GLM shortcut with a MiniMax preset: map the minimax,
minimax-m3, and minimax-m2.7 model aliases to their canonical MiniMax-M3
and MiniMax-M2.7 IDs, and select the global or China Anthropic-compatible
endpoint (append -cn for China). Centralize the --model argument handling
behind resolveModelArg() and route the base URL in buildChildEnv().
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

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