Skip to content

feat: add MiniMax as native provider#26

Merged
jamiepine merged 1 commit intospacedriveapp:mainfrom
ricorna:feat/minimax-provider-clean
Feb 20, 2026
Merged

feat: add MiniMax as native provider#26
jamiepine merged 1 commit intospacedriveapp:mainfrom
ricorna:feat/minimax-provider-clean

Conversation

@ricorna
Copy link
Copy Markdown
Contributor

@ricorna ricorna commented Feb 18, 2026

Depends on #24 — this PR includes those commits and adds the MiniMax provider on top.

Motivation

MiniMax offers competitive models (MiniMax M2.5) with both OpenAI-compatible and Anthropic-compatible API formats. MiniMax has the most variation of any provider we support:

  • Region: International (api.minimax.io) vs China mainland (api.minimaxi.com)
  • API format: OpenAI-compatible (/v1) vs Anthropic-compatible (/anthropic)
  • Plan: Standard pay-per-token API key vs Coding Plan (sk-cp- prefix, separate key, subscription billing)

This is a good stress test of the base_url infrastructure from #24 — it handles all three dimensions cleanly. Users select their endpoint preset (or enter a custom URL) and provide their key. No code changes needed for any combination.

Thanks to @ZerGo0 whose research in #13 identified MiniMax's coding plan endpoint structure.

Changes

  • Added minimax_key / MINIMAX_API_KEY config and env var
  • MiniMax dispatch via call_anthropic_compatible (Anthropic message format)
  • Default endpoint: api.minimax.io/v1/chat/completions
  • Endpoint presets: "MiniMax (International)" / "MiniMax (China)" / "MiniMax Anthropic" / "MiniMax Coding Plan"
  • Provider card with icon, status endpoint, minimax/ model prefix
  • Default routing config

Breaking Changes

None. New provider — no existing behavior affected.

How to Test

# Standard MiniMax (international, OpenAI-compatible)
MINIMAX_API_KEY="sk-..." cargo run

# MiniMax Coding Plan (Anthropic-compatible)
MINIMAX_API_KEY="sk-cp-..." \
MINIMAX_BASE_URL="https://api.minimax.io/anthropic/v1/messages" \
cargo run

# China mainland
MINIMAX_API_KEY="sk-..." \
MINIMAX_BASE_URL="https://api.minimaxi.com/v1/chat/completions" \
cargo run

# Or via web UI → Settings → Providers → MiniMax → Endpoint dropdown

Verified

Tested with a MiniMax Coding Plan subscription (sk-cp- key) against the Anthropic-compatible endpoint (api.minimax.io/anthropic). Chat completions return successfully. Using the Coding Plan key against the standard pay-per-token endpoint returns the expected error — confirming the sk-cp- key is scoped to the Coding Plan surface. Endpoint preset selector in the web UI correctly offers International, China, Anthropic, and Coding Plan options.

Diff stats

9 files changed, 109 insertions(+), 3 deletions(-)

@hotzen
Copy link
Copy Markdown
Contributor

hotzen commented Feb 18, 2026

hey, any ETA on this getting merged?
eagerly awaited, thanks!

@ricorna
Copy link
Copy Markdown
Contributor Author

ricorna commented Feb 18, 2026

hey, any ETA on this getting merged?

eagerly awaited, thanks!

This relies on #24 being merged first (this part is trivial on top of it)

So as soon as there's any movement on that, this probably goes in soon after.

But it's out of my hands for the moment.

@Marenz
Copy link
Copy Markdown
Collaborator

Marenz commented Feb 19, 2026

I am using this PR with some of my own (unrelated to this topic) fixes, so LGTM. Though it needs a rebase.

Add MiniMax as a new LLM provider with full ProviderConfig integration:
legacy key auto-mapping, API routing (Anthropic-compatible via
api.minimax.io), routing defaults (MiniMax-M1-80k), and onboarding flow.

MiniMax exposes an Anthropic messages endpoint, so it dispatches through
the Anthropic API path rather than the OpenAI-compatible path used by
most other providers.

Frontend gains a MiniMax entry in the provider list with brand icon
from lobehub.
@ricorna ricorna force-pushed the feat/minimax-provider-clean branch from 9e8b81d to d8586cd Compare February 20, 2026 00:01
@jamiepine jamiepine merged commit 9028274 into spacedriveapp:main Feb 20, 2026
@ricorna ricorna deleted the feat/minimax-provider-clean branch February 22, 2026 17:38
rktmeister pushed a commit to rktmeister/spacebot that referenced this pull request Mar 11, 2026
…r-clean

feat: add MiniMax as native provider
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.

4 participants