feat: add direct MiniMax provider support#472
Open
octo-patch wants to merge 1 commit intoCodebuffAI:mainfrom
Open
feat: add direct MiniMax provider support#472octo-patch wants to merge 1 commit intoCodebuffAI:mainfrom
octo-patch wants to merge 1 commit intoCodebuffAI:mainfrom
Conversation
- Add MiniMax LLM handler with direct API integration (api.minimax.io/v1) - Support models: MiniMax-M2.5, MiniMax-M2.5-highspeed - Add MINIMAX_API_KEY environment variable support - Add 'minimax' to allowed model prefixes - Add MiniMax models to openrouter model config - Add streaming and non-streaming request handling - Add MiniMax per-token pricing for accurate billing - Handle MiniMax temperature constraint (0.0, 1.0], default 1.0 - Route minimax/* models directly to MiniMax API before Fireworks fallback
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 direct LLM provider with native API integration, supporting both streaming and non-streaming requests through MiniMax's OpenAI-compatible API.
Supported Models
MiniMax-M2.5- Peak Performance. Ultimate Value. Master the ComplexMiniMax-M2.5-highspeed- Same performance, faster and more agileBoth models support 204,800 tokens context window.
Changes
web/src/llm-api/minimax.ts- Direct MiniMax API handler (follows existing Fireworks/SiliconFlow pattern)minimaxprefix toALLOWED_MODEL_PREFIXESand MiniMax models toopenrouterModelsMINIMAX_API_KEYenvironment variableminimax/*models directly to MiniMax API (takes priority over Fireworks routing)MiniMaxErrorclass with proper error propagationImplementation Details
https://api.minimax.io/v1)(0.0, 1.0], defaults to1.0(cannot be0)API Documentation