Skip to content

feat: add MiniMax as a direct LLM provider#1457

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

feat: add MiniMax as a direct LLM provider#1457
octo-patch wants to merge 1 commit intovercel:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link

Summary

Add MiniMax as a direct LLM provider alongside the AI Gateway, giving users access to MiniMax-M2.5 and MiniMax-M2.5-highspeed models with a 204K context window.

Changes

  • lib/ai/models.ts: Add MiniMax-M2.5 and MiniMax-M2.5-highspeed to the curated model list
  • lib/ai/providers.ts: Route MiniMax models directly via @ai-sdk/openai (OpenAI-compatible API) instead of through the AI Gateway
  • components/multimodal-input.tsx: Add "MiniMax" to provider display names in the model selector UI
  • package.json: Add @ai-sdk/openai dependency for direct provider access
  • .env.example: Add MINIMAX_API_KEY environment variable
  • README.md: Document MiniMax provider support
  • tests/: Add MiniMax integration tests and update model selector test regex

How It Works

MiniMax models bypass the AI Gateway and connect directly to the MiniMax API (https://api.minimax.io/v1) using the OpenAI-compatible interface. Users set the MINIMAX_API_KEY environment variable to enable MiniMax models.

// providers.ts - MiniMax models route directly, not via gateway
if (modelId.startsWith("minimax/")) {
  const minimax = getMiniMaxProvider();
  return minimax(modelId.replace("minimax/", ""));
}

API Documentation

- Add MiniMax-M2.5 and MiniMax-M2.5-highspeed models to the model selector
- Route MiniMax models directly via @ai-sdk/openai (OpenAI-compatible API)
  instead of through the AI Gateway, enabling users to use their own API key
- Add MINIMAX_API_KEY environment variable support
- Add MiniMax provider group in the model selector UI
- Add integration tests for MiniMax API
- Update README to mention MiniMax support
@vercel
Copy link
Contributor

vercel bot commented Mar 16, 2026

@octo-patch is attempting to deploy a commit to the Zeb Hermann's projects Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​ai-sdk/​openai@​3.0.41721008898100

View full report

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