Skip to content

Comments

feat: add minimax-cn provider for CN users#140

Merged
jamiepine merged 2 commits intospacedriveapp:mainfrom
shuuul:feature/minimax-cn-provider
Feb 22, 2026
Merged

feat: add minimax-cn provider for CN users#140
jamiepine merged 2 commits intospacedriveapp:mainfrom
shuuul:feature/minimax-cn-provider

Conversation

@shuuul
Copy link
Contributor

@shuuul shuuul commented Feb 22, 2026

Summary

Add a new minimax-cn provider 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

  • Add minimax_cn_key config field with CN endpoint
  • Add MiniMax CN model entry (MiniMax-M2.5)
  • Add routing config and provider prefix
  • Add to frontend settings UI

Configuration

[llm]
minimax_cn_key = "env:MINIMAX_CN_API_KEY"

[defaults.routing]
channel = "minimax-cn/MiniMax-M2.5"

Environment Variables

  • MINIMAX_CN_API_KEY - API key for CN endpoint

Closes #139

Add minimax-cn provider that uses the CN endpoint
(https://api.minimaxi.com/anthropic) for users in China.

Closes spacedriveapp#139
Copilot AI review requested due to automatic review settings February 22, 2026 11:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_key config/env support and registers a minimax-cn provider with the CN base URL.
  • Adds a MiniMax CN model entry and includes minimax-cn in configured provider detection.
  • Exposes minimax-cn in 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 jamiepine merged commit f5c314d into spacedriveapp:main Feb 22, 2026
@Marenz
Copy link
Collaborator

Marenz commented Feb 23, 2026

@shuuul did you test this after the merge? I am asking because of #147 an #84

@shuuul
Copy link
Contributor Author

shuuul commented Feb 23, 2026

@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.

@Marenz
Copy link
Collaborator

Marenz commented Feb 23, 2026

Fair enough, no problem. I just wanted to know if anyone successfully used the -CN variant, but I think it should work now

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.

feat: add minimax-cn provider for CN users

3 participants