Skip to content

feat: add MiniMax as an alternative LLM provider (M3 default)#11146

Open
octo-patch wants to merge 3 commits into
stackblitz:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as an alternative LLM provider (M3 default)#11146
octo-patch wants to merge 3 commits into
stackblitz:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

@octo-patch octo-patch commented Mar 17, 2026

Summary

Add MiniMax as an alternative LLM provider to bolt.new, with MiniMax-M3 as the default model. Users can switch from Anthropic (Claude) to MiniMax by setting DEFAULT_LLM_PROVIDER=minimax and MINIMAX_API_KEY in .env.local.

Changes

  • Add getMiniMaxModel to app/lib/.server/llm/model.ts using @ai-sdk/openai with the OpenAI-compatible endpoint https://api.minimax.io/v1
  • Add LLMProvider type and getModel(provider, ...) to dispatch by provider
  • Add getMiniMaxAPIKey, getLLMProvider, getProviderAPIKey helpers in app/lib/.server/llm/api-key.ts
  • Extend worker-configuration.d.ts with MINIMAX_API_KEY and DEFAULT_LLM_PROVIDER env bindings
  • Update CONTRIBUTING.md to document the new provider and how to configure it
  • Add unit tests (model.spec.ts, api-key.spec.ts) and an opt-in E2E test (minimax.e2e.spec.ts, skipped without MINIMAX_API_KEY)

Model Configuration

The MiniMax provider supports:

Model Role
MiniMax-M3 Default — 512K context, up to 128K output, image input support
MiniMax-M2.7 Previous-generation alternative
MiniMax-M2.7-highspeed Previous-generation low-latency alternative

Anthropic remains the default provider; nothing changes for existing users unless they opt in to MiniMax.

Why MiniMax-M3?

MiniMax-M3 is the latest model in the MiniMax family:

  • 512K context window
  • Up to 128K max output tokens
  • Image input support on both OpenAI-compatible and Anthropic-compatible endpoints

See pricing: https://platform.minimax.io/docs/guides/pricing-paygo

Testing

  • pnpm test — all unit tests pass (22 tests)
  • E2E test (minimax.e2e.spec.ts) verified end-to-end against the MiniMax API with MINIMAX_API_KEY set: basic chat with M3, streaming with M3, and the MiniMax-M2.7-highspeed alternative
  • Existing Anthropic flow unaffected — defaults to Claude when DEFAULT_LLM_PROVIDER is unset

- Add MiniMax-M2.5 and MiniMax-M2.5-highspeed model support via @ai-sdk/openai
- Introduce provider selection via DEFAULT_LLM_PROVIDER env var
- Add MINIMAX_API_KEY environment variable support
- Refactor model.ts to support multiple providers (factory pattern)
- Update stream-text.ts to conditionally apply Anthropic-specific headers
- Add unit tests for model and api-key modules (22 tests)
- Add integration tests for MiniMax API (3 E2E tests)
- Update CONTRIBUTING.md with MiniMax setup instructions
@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

- Update default model from MiniMax-M2.5 to MiniMax-M2.7
- Update E2E tests to use M2.7 and M2.7-highspeed models
- Update CONTRIBUTING.md documentation
- Keep all previous models as alternatives
@octo-patch octo-patch changed the title feat: add MiniMax as an alternative LLM provider feat: add MiniMax as an alternative LLM provider (M2.7) Mar 18, 2026
- Update default model from MiniMax-M2.7 to MiniMax-M3
- Update unit tests and E2E tests to use M3
- Update CONTRIBUTING.md to document M3 as default
- Keep MiniMax-M2.7 and MiniMax-M2.7-highspeed as alternatives
@octo-patch octo-patch changed the title feat: add MiniMax as an alternative LLM provider (M2.7) feat: add MiniMax as an alternative LLM provider (M3 default) Jun 2, 2026
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