Skip to content

feat: add MiniMax as first-class LLM provider#927

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

feat: add MiniMax as first-class LLM provider#927
octo-patch wants to merge 1 commit intosmallcloudai:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Add MiniMax cloud models as a built-in LLM provider, following the established ProviderTrait pattern used by OpenAI, Anthropic, DeepSeek, and other providers.

Changes

  • New MiniMaxProvider (refact-agent/engine/src/providers/minimax.rs) — full ProviderTrait implementation with:
    • OpenAI-compatible chat completions API at api.minimax.io
    • API key management with environment variable support ($MINIMAX_API_KEY) and masked display
    • Provider schema with smart links to API key page
    • Case-insensitive model filter regex ((?i)^minimax-)
    • Custom model support with configurable pricing/capabilities
  • Pricing — M2.7 ($1.00/$4.00), M2.5 ($0.80/$3.00), M2.5-highspeed ($0.80/$3.00) per 1M tokens
  • Registry — Registered in PROVIDER_NAMES and create_provider() factory
  • README — Updated feature lists to mention MiniMax

Models

Model Context Use Case
MiniMax-M2.7 1M tokens Latest flagship model
MiniMax-M2.5 204K tokens Previous generation
MiniMax-M2.5-highspeed 204K tokens Optimized for speed

Test Plan

  • 20 unit tests covering all provider functionality
  • Provider name and display name
  • Wire format (OpenAI-compatible)
  • Model filter regex matching
  • Settings apply/export with API key masking
  • Runtime building (enabled/disabled states)
  • Pricing lookups for all models
  • Custom model management
  • Schema validation
  • Clone boxing
  • All tests pass: cargo test --bin refact-lsp providers::minimax

Add MiniMax cloud models (M2.7, M2.5, M2.5-highspeed) as a built-in
provider following the established ProviderTrait pattern. Uses OpenAI-
compatible chat completions API at api.minimax.io.

- New MiniMaxProvider with full ProviderTrait implementation
- API key management with env var support and masked display
- Model pricing for M2.7, M2.5, and M2.5-highspeed
- Provider registration in factory and PROVIDER_NAMES
- 20 unit tests covering all provider functionality
- README updated to mention MiniMax in feature list
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