feat: add minimax-cn provider for CN users#140
Merged
jamiepine merged 2 commits intospacedriveapp:mainfrom Feb 22, 2026
Merged
Conversation
Add minimax-cn provider that uses the CN endpoint (https://api.minimaxi.com/anthropic) for users in China. Closes spacedriveapp#139
There was a problem hiding this comment.
Pull request overview
Adds a dedicated minimax-cn LLM provider intended to let CN users use MiniMax via the domestic API endpoint, plus corresponding model/catalog and UI wiring.
Changes:
- Adds
minimax_cn_keyconfig/env support and registers aminimax-cnprovider with the CN base URL. - Adds a MiniMax CN model entry and includes
minimax-cnin configured provider detection. - Exposes
minimax-cnin the frontend Settings UI and model/provider labeling.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/llm/routing.rs | Adds minimax-cn defaults and prefix mapping for routing strings |
| src/config.rs | Adds minimax_cn_key, CN base URL constant, env/TOML parsing, and provider injection |
| src/api/providers.rs | Extends provider test config builder with minimax_cn_key field |
| src/api/models.rs | Adds MiniMax CN model and includes minimax-cn in configured provider detection |
| interface/src/routes/Settings.tsx | Adds minimax-cn to provider list and updates Settings UI formatting |
| interface/src/lib/providerIcons.tsx | Maps minimax-cn to the MiniMax icon |
| interface/src/components/ModelSelect.tsx | Adds labels and ordering entries for minimax and minimax-cn |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Change model ID from minimax/ to minimax-cn/ prefix - Add minimax-cn to provider_toml_key() with minimax_cn_key - Add minimax-cn case to build_test_llm_config() with CN base URL - Add minimax_cn to ProviderStatus struct and has_any computation - Fix provider_to_prefix() to return minimax-cn/ for minimax-cn - Fix defaults_for_provider() to use minimax-cn/ prefix - Fix frontend Settings.tsx defaultModel to minimax-cn/MiniMax-M2.5
jamiepine
approved these changes
Feb 22, 2026
Collaborator
Contributor
Author
|
@Marenz Sorry about that. When I was committing, the project was failing to compile due to existing errors in other modules, so I couldn't run a clean build to verify. |
Collaborator
|
Fair enough, no problem. I just wanted to know if anyone successfully used the -CN variant, but I think it should work now |
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
Add a new
minimax-cnprovider that uses the CN endpoint (https://api.minimaxi.com/anthropic) instead of the global endpoint (https://api.minimax.io/anthropic).Motivation
Users in China cannot access the global MiniMax API endpoint. This PR adds a separate provider configuration for CN users to use the domestic endpoint.
Changes
minimax_cn_keyconfig field with CN endpointConfiguration
Environment Variables
MINIMAX_CN_API_KEY- API key for CN endpointCloses #139