Skip to content

feat: add MiniMax as alternative LLM provider#192

Open
octo-patch wants to merge 1 commit intomongodb-developer:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as alternative LLM provider#192
octo-patch wants to merge 1 commit intomongodb-developer:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link

Summary

Add MiniMax as an alternative LLM provider for two showcase apps (vercel_sdk_hr_agent and mongostory), demonstrating how MiniMax M2.7 can power diverse GenAI use cases with MongoDB.

Changes

vercel_sdk_hr_agent (HR Team Matcher)

  • Add utils/llm-provider.ts — provider factory that selects between OpenAI and MiniMax based on LLM_PROVIDER env var
  • Update app/api/build-team/route.ts to use the provider abstraction instead of hardcoded OpenAI
  • Update README with MiniMax setup instructions

mongostory (Content Management Platform)

  • Add lib/llm-provider.ts — provider factory that selects between xAI/Grok and MiniMax
  • Update all 7 route files to use centralized getLLMModel() instead of direct xai() calls
  • Add @ai-sdk/openai dependency for MiniMax OpenAI-compatible API
  • Update README with MiniMax setup instructions

Tests

  • 15 unit tests (provider factory, config, model selection, env vars)
  • 6 integration tests (MiniMax API chat, tool calling, streaming)

Configuration

To use MiniMax, set:

LLM_PROVIDER=minimax
MINIMAX_API_KEY=your_api_key

Supported models: MiniMax-M2.7 (default), MiniMax-M2.7-highspeed (204K context).

API Documentation

… and mongostory

- Add LLM provider abstraction (getLLMModel) to both apps
- Support MiniMax-M2.7 and MiniMax-M2.7-highspeed via OpenAI-compatible API
- Configurable via LLM_PROVIDER env var (openai/xai default, minimax)
- Update READMEs with MiniMax setup instructions
- Add unit tests (15 tests) and integration tests (6 tests)
@octo-patch octo-patch requested a review from a team as a code owner March 22, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet