Skip to content

Add MiniMax as a first-class LLM and embedding provider#658

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

Add MiniMax as a first-class LLM and embedding provider#658
octo-patch wants to merge 1 commit into
aurelio-labs:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

  • MiniMaxLLM: Chat completions via OpenAI-compatible API with temperature clamping (0.01–1.0) and automatic <think> tag stripping for reasoning models
  • MiniMaxEncoder: Native embedding API for embo-01 model (1536 dimensions) with sync/async support via requests/aiohttp
  • Registered MiniMax in EncoderType enum, AutoEncoder factory, EncoderDefault, and LLM __init__ exports

Changes

File Description
semantic_router/llms/minimax.py MiniMaxLLM class extending BaseLLM
semantic_router/encoders/minimax.py MiniMaxEncoder class extending DenseEncoder
semantic_router/llms/__init__.py Register MiniMaxLLM
semantic_router/encoders/__init__.py Register MiniMaxEncoder + AutoEncoder factory
semantic_router/schema.py Add MINIMAX to EncoderType enum
semantic_router/utils/defaults.py Add MINIMAX defaults (embo-01, MiniMax-M2.5)
tests/unit/llms/test_llm_minimax.py 17 unit tests for LLM
tests/unit/encoders/test_minimax.py 16 unit tests for encoder
tests/integration/test_minimax_integration.py 6 integration tests
docs/integrations/minimax.md Integration documentation
docs/integrations/integrations.md Add MiniMax to provider list
README.md Add MiniMax to integrations list

Test plan

  • 33 unit tests passing (17 LLM + 16 encoder)
  • Integration tests for LLM chat completions (sync + async)
  • Integration tests for encoder initialization
  • Embedding integration tests require sufficient API rate limits

MiniMax Models

Type Model Notes
Chat MiniMax-M2.5 Default, 204K context
Chat MiniMax-M2.5-highspeed Fast inference
Embedding embo-01 1536 dimensions

- Add MiniMaxLLM: OpenAI-compatible chat completions with temperature
  clamping (0.01-1.0) and think-tag stripping for M2.5 models
- Add MiniMaxEncoder: Native embedding API for embo-01 (1536 dims)
  with sync/async support via requests/aiohttp
- Register MiniMax in EncoderType enum, AutoEncoder factory,
  EncoderDefault, and LLM __init__ exports
- Add 33 unit tests (17 LLM + 16 encoder) covering init, API calls,
  temperature clamping, think-tag stripping, async, error handling
- Add 6 integration tests for real API validation
- Add integration docs and update README with MiniMax link
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