Skip to content

Add MiniMax provider - #143

Open
octo-patch wants to merge 1 commit into
swarmclawai:mainfrom
octo-patch:octo/20260728-provider-add-recvpUrAPkFG1d
Open

Add MiniMax provider#143
octo-patch wants to merge 1 commit into
swarmclawai:mainfrom
octo-patch:octo/20260728-provider-add-recvpUrAPkFG1d

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: Add MiniMax as a built-in LLM provider so the executable provider registry covers MiniMax-M3 and MiniMax-M2.7 through the documented global and China OpenAI-compatible endpoints.

Changes

This adds a minimax entry to the built-in provider registry, following the existing OpenAI-compatible provider pattern used by other cloud vendors.

  • src/lib/providers/index.ts: register a minimax provider with models MiniMax-M3 and MiniMax-M2.7, requiring an API key and defaulting to the global OpenAI-compatible endpoint https://api.minimax.io/v1. The handler reuses streamOpenAiChat and lets session.apiEndpoint override the default, so the China endpoint (https://api.minimaxi.com/v1) or the Anthropic-compatible endpoint (https://api.minimax.io/anthropic) can be configured.
  • src/types/provider.ts: add minimax to the ProviderType union.
  • src/lib/server/provider-health.ts: add minimax to OPENAI_COMPATIBLE_DEFAULTS with the global endpoint.
  • src/app/api/setup/check-provider/route.ts: route minimax setup checks through the OpenAI-compatible validation branch.
  • src/lib/setup-defaults.ts: add a MiniMax entry to SETUP_PROVIDERS with the global endpoint as default and an overridable Base URL (to support the China regional endpoint).
  • src/lib/server/provider-health.test.ts: assert minimax is present in OPENAI_COMPATIBLE_DEFAULTS.

Checks

  • tsx --test src/lib/providers/provider-models.test.ts (provider registry sanity) — pass
  • tsx --test src/lib/server/provider-health.test.ts — pass
  • tsx --test src/app/api/setup/check-provider/route.test.ts — pass
  • tsx --test src/lib/setup-defaults.test.ts — pass
  • eslint on changed files — no new errors
  • tsc --noEmit — no new errors in changed files

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