feat: add MiniMax as first-class LLM provider#674
Open
octo-patch wants to merge 1 commit intostakpak:mainfrom
Open
feat: add MiniMax as first-class LLM provider#674octo-patch wants to merge 1 commit intostakpak:mainfrom
octo-patch wants to merge 1 commit intostakpak:mainfrom
Conversation
Add MiniMax (https://api.minimax.io) as a built-in provider alongside OpenAI, Anthropic, and Gemini. MiniMax uses an OpenAI-compatible API, so the implementation reuses existing OpenAI wire types while adding MiniMax-specific temperature clamping (0.0 → 0.01, since MiniMax rejects temperature=0.0) and a static model catalogue. Models: MiniMax-M2.7, MiniMax-M2.7-highspeed (1M context), MiniMax-M2.5, MiniMax-M2.5-highspeed (204K context). Changes: - New provider module: libs/ai/src/providers/minimax/ (types, convert, stream, provider) with 23 unit tests and 3 integration tests - Provider trait impl: generate, stream, list_models, build_headers - SDK wiring: InferenceConfig, ClientBuilder, ProviderRegistry (auto- registers from MINIMAX_API_KEY env var), ProviderKind enum - Shared lib: ProviderConfig::MiniMax variant, stakai_adapter arms - CLI: auth login support, config profile template, endpoint cleaning - README: MiniMax in provider list, auth login example, BYOK config
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 built-in LLM provider alongside OpenAI, Anthropic, and Gemini. MiniMax offers high-performance models (M2.7 with 1M context, M2.5 with 204K context) through an OpenAI-compatible API at
https://api.minimax.io/v1.What's included
New provider module (
libs/ai/src/providers/minimax/):types.rs–MiniMaxConfigwith API key + base URL,MINIMAX_API_KEYenv auto-detectconvert.rs– SDK→OpenAI request conversion with temperature clamping (MiniMax rejectstemperature=0.0, clamped to0.01)stream.rs– SSE streaming viareqwest_eventsource, tool-call state trackingprovider.rs– FullProvidertrait implementation:generate,stream,list_models,build_headersMiniMax-M2.7,MiniMax-M2.7-highspeed,MiniMax-M2.5,MiniMax-M2.5-highspeedSDK wiring:
InferenceConfig–.minimax()and.minimax_config()builder methodsClientBuilder– MiniMax registration inwith_inference_config()ProviderRegistry– Auto-registration fromMINIMAX_API_KEYenv varProviderKind–MiniMaxvariant with"minimax"string conversionShared library:
ProviderConfig::MiniMaxvariant withapi_key,api_endpoint,authfieldsstakai_adapter.rs–build_inference_config()andbuild_provider_registry_direct()armsCLI integration:
stakpak auth login --provider minimax --api-key $MINIMAX_API_KEYgenerate_minimax_profile())BuiltinProvider::MiniMaxenum variantDocumentation: README updated with MiniMax in provider list, auth login example, BYOK config
Tests
MINIMAX_API_KEY): generate, streaming, system message – all passingDesign decisions
ChatCompletionRequest,ChatMessage, etc.) to minimize code duplication0.0 → 0.01(MiniMax requires(0.0, 1.0]range)/v1/modelsendpoint)Test plan
MINIMAX_API_KEYcargo checkpasses