Add MiniMax as first-class LLM provider#1539
Open
octo-patch wants to merge 1 commit intoembabel:mainfrom
Open
Conversation
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
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 forMiniMax-M2.7(1M context, latest flagship) andMiniMax-M2.7-highspeed(optimized for speed)embabel-agent-minimax-autoconfigure: Spring Boot auto-configuration moduleMiniMaxModelsConfigextendingOpenAiCompatibleModelFactorywith MiniMax's OpenAI-compatible API (https://api.minimax.io/v1)MiniMaxOptionsConverterwith temperature clamping to(0.0, 1.0]as required by the MiniMax APIMINIMAX_API_KEYenv var orembabel.agent.platform.models.minimax.api-keypropertyembabel-agent-starter-minimax: Spring Boot starter for easy dependency inclusionMiniMaxOptionsConverterTest: Unit tests covering temperature clamping, null handling, and options preservation (extendsOptionsConverterTestSupport)embabel-agent-dependencies,embabel-agent-autoconfigure, andembabel-agent-startersMINIMAX_API_KEYenvironment variableArchitecture
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 beyondspring-ai-openai.Usage
export MINIMAX_API_KEY=your-api-keyModels are automatically registered as Spring beans when the API key is set.
Test Plan
MiniMaxOptionsConverterTest— temperature clamping, null handling, core values preservationmvn compile -pl embabel-agent-autoconfigure/models/embabel-agent-minimax-autoconfigure -amFiles Changed (11 files, 446 additions)
MiniMaxModels.ktAgentMiniMaxAutoConfiguration.javaMiniMaxModelsConfig.ktAutoConfiguration.importsMiniMaxOptionsConverterTest.ktpom.xml(autoconfigure)pom.xml(starter)pom.xml(autoconfigure parent)pom.xml(starters parent)pom.xml(BOM)README.md