Skip to content

Add MiniMax as first-class LLM provider#1539

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

Add MiniMax as first-class LLM provider#1539
octo-patch wants to merge 1 commit intoembabel:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link

Summary

Add MiniMax as a first-class LLM provider in the Embabel Agent framework, following the established OpenAI-compatible provider pattern.

Changes

  • MiniMaxModels.kt: Model constants for MiniMax-M2.7 (1M context, latest flagship) and MiniMax-M2.7-highspeed (optimized for speed)
  • embabel-agent-minimax-autoconfigure: Spring Boot auto-configuration module
    • MiniMaxModelsConfig extending OpenAiCompatibleModelFactory with MiniMax's OpenAI-compatible API (https://api.minimax.io/v1)
    • MiniMaxOptionsConverter with temperature clamping to (0.0, 1.0] as required by the MiniMax API
    • Per-token pricing configuration for both models
    • Configurable via MINIMAX_API_KEY env var or embabel.agent.platform.models.minimax.api-key property
  • embabel-agent-starter-minimax: Spring Boot starter for easy dependency inclusion
  • MiniMaxOptionsConverterTest: Unit tests covering temperature clamping, null handling, and options preservation (extends OptionsConverterTestSupport)
  • BOM & parent POM: Registered new modules in embabel-agent-dependencies, embabel-agent-autoconfigure, and embabel-agent-starters
  • README: Documented MINIMAX_API_KEY environment variable

Architecture

Follows the same pattern as existing providers (Gemini, LM Studio, OpenAI Custom) by extending OpenAiCompatibleModelFactory, since MiniMax offers a fully OpenAI-compatible chat completions API. No new Spring AI dependencies are needed beyond spring-ai-openai.

Usage

export MINIMAX_API_KEY=your-api-key

Models are automatically registered as Spring beans when the API key is set.

Test Plan

  • MiniMaxOptionsConverterTest — temperature clamping, null handling, core values preservation
  • Verify compilation with mvn compile -pl embabel-agent-autoconfigure/models/embabel-agent-minimax-autoconfigure -am
  • Integration test with live MiniMax API key

Files Changed (11 files, 446 additions)

File Description
MiniMaxModels.kt Model ID constants
AgentMiniMaxAutoConfiguration.java Spring Boot auto-config entry point
MiniMaxModelsConfig.kt Config, options converter, bean factory
AutoConfiguration.imports Spring Boot SPI registration
MiniMaxOptionsConverterTest.kt Unit tests
pom.xml (autoconfigure) Module POM
pom.xml (starter) Starter POM
pom.xml (autoconfigure parent) Module registration
pom.xml (starters parent) Starter registration
pom.xml (BOM) Dependency management
README.md Env var documentation

Add MiniMax AI model support via OpenAI-compatible API integration:

- MiniMaxModels.kt: Model constants for MiniMax-M2.7 and MiniMax-M2.7-highspeed
- embabel-agent-minimax-autoconfigure: Spring Boot auto-configuration module
  with MiniMaxModelsConfig extending OpenAiCompatibleModelFactory,
  MiniMaxOptionsConverter with temperature clamping to (0.0, 1.0],
  per-token pricing, and retry configuration
- embabel-agent-starter-minimax: Spring Boot starter for easy dependency inclusion
- MiniMaxOptionsConverterTest: Unit tests for options conversion and
  temperature clamping behavior
- BOM and parent POM registration for the new modules
- README: Document MINIMAX_API_KEY environment variable
@alexheifetz alexheifetz self-requested a review March 27, 2026 14:15
@alexheifetz
Copy link
Contributor

@octo-patch please sign the PR so it passes DCO check: https://github.com/embabel/embabel-agent/pull/1539/checks?check_run_id=68690156782
Tnx!

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.

2 participants