Skip to content

feat: add minimax-api-key-cn option for China API endpoint#15191

Merged
steipete merged 2 commits intoopenclaw:mainfrom
liuy:fix/minimax-cn
Feb 14, 2026
Merged

feat: add minimax-api-key-cn option for China API endpoint#15191
steipete merged 2 commits intoopenclaw:mainfrom
liuy:fix/minimax-cn

Conversation

@liuy
Copy link
Copy Markdown
Contributor

@liuy liuy commented Feb 13, 2026

Add 'minimax-api-key-cn' auth choice for Chinese users.

  • Reuse existing --minimax-api-key CLI option
  • Similar to how moonshot supports moonshot-api-key-cn

Tested pnpm : build ✅, check ✅, test ✅

Tested with my minimax key locally.

Greptile Overview

Greptile Summary

This PR adds a new onboarding auth choice, minimax-api-key-cn, intended to configure MiniMax’s China Anthropic-compatible endpoint by reusing the existing --minimax-api-key credential flow and plumbing a custom base URL through the MiniMax API provider config (applyMinimaxApiProviderConfig / applyMinimaxApiConfig).

The change fits into the existing onboarding/auth-choice framework by extending the AuthChoice union, updating the CLI help text, and adding a new branch in applyAuthChoiceMiniMax to set the profile + default model/provider config.

Confidence Score: 3/5

  • This PR is close to mergeable but risks clobbering existing MiniMax config/credentials when users switch endpoints.
  • The new CN auth choice reuses the existing minimax provider id and minimax:default auth profile, which will overwrite models.providers.minimax.baseUrl and the stored API key when toggling between global and CN flows. Fixing the isolation between endpoints would significantly reduce user-facing misconfiguration risk.
  • src/commands/auth-choice.apply.minimax.ts; src/commands/onboard-auth.config-minimax.ts

Last reviewed commit: 68932a9

(5/5) You can turn off certain types of comments like style here!

@openclaw-barnacle openclaw-barnacle bot added cli CLI command changes commands Command implementations size: S labels Feb 13, 2026
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@liuy
Copy link
Copy Markdown
Contributor Author

liuy commented Feb 13, 2026

Thanks for the review! @greptile-apps

This is an intentional design decision following the existing pattern used by Moonshot:

  • → profile
  • → profile (same provider, different baseUrl)

The same pattern applies here:

Both options reuse the same provider id and auth profile, which means switching between global/CN endpoints will update the . This is consistent with the existing onboarding flow where users would typically choose one endpoint and stick with it.

If isolation between endpoints is needed, users can configure separate profiles manually. The current approach keeps the implementation simple and consistent with the codebase patterns.

@openclaw-barnacle openclaw-barnacle bot removed the cli CLI command changes label Feb 14, 2026
@liuy liuy force-pushed the fix/minimax-cn branch 3 times, most recently from b66fb72 to 84055de Compare February 14, 2026 11:13
@steipete steipete self-assigned this Feb 14, 2026
@liuy liuy force-pushed the fix/minimax-cn branch 2 times, most recently from 0b60e75 to 7f5487f Compare February 14, 2026 11:59
- Add 'minimax-api-key-cn' auth choice for Chinese users
- Reuse existing --minimax-api-key CLI option
- Use MINIMAX_CN_API_BASE_URL (https://api.minimaxi.com/anthropic)
- Similar to how moonshot supports moonshot-api-key-cn

Tested: build ✅, check ✅, test ✅
@steipete steipete merged commit 0cfea46 into openclaw:main Feb 14, 2026
24 checks passed
@steipete
Copy link
Copy Markdown
Contributor

Landed via temp rebase onto main.

  • Gate: pnpm check && pnpm build && pnpm test && pnpm check:docs
  • Land commit: b22f94c
  • Merge commit: 0cfea46

Thanks @liuy!

@liuy liuy deleted the fix/minimax-cn branch February 14, 2026 13:43
hamidzr pushed a commit to hamidzr/openclaw that referenced this pull request Feb 14, 2026
openperf pushed a commit to openperf/moltbot that referenced this pull request Feb 14, 2026
openperf pushed a commit to openperf/moltbot that referenced this pull request Feb 14, 2026
BigUncle pushed a commit to BigUncle/openclaw that referenced this pull request Feb 14, 2026
mverrilli pushed a commit to mverrilli/openclaw that referenced this pull request Feb 14, 2026
GwonHyeok pushed a commit to learners-superpumped/openclaw that referenced this pull request Feb 15, 2026
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 1, 2026
(cherry picked from commit 0cfea46)

# Conflicts:
#	.gitignore
#	CHANGELOG.md
#	src/commands/auth-choice-options.ts
#	src/commands/auth-choice.test.ts
#	src/commands/onboard-non-interactive.provider-auth.e2e.test.ts
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 3, 2026
(cherry picked from commit 0cfea46)

# Conflicts:
#	.gitignore
#	CHANGELOG.md
#	src/commands/auth-choice-options.e2e.test.ts
#	src/commands/auth-choice-options.ts
#	src/commands/auth-choice.e2e.test.ts
#	src/commands/onboard-non-interactive.provider-auth.e2e.test.ts
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants