feat: add MiniMax as first-class LLM provider#6
Open
octo-patch wants to merge 1 commit intoAgentfy-io:mainfrom
Open
feat: add MiniMax as first-class LLM provider#6octo-patch wants to merge 1 commit intoAgentfy-io:mainfrom
octo-patch wants to merge 1 commit intoAgentfy-io:mainfrom
Conversation
Add MiniMax AI support via OpenAI-compatible API (https://api.minimax.io/v1). Changes: - common/ais/minimax.py: MiniMax async client wrapper with M2.7/M2.5 model support, temperature clamping (0.0, 1.0], and cost tracking - common/ais/__init__.py: export MiniMax class - common/exceptions/exceptions.py: add MiniMaxAPIError - config.py: add minimax_api_key (MINIMAX_API_KEY env var) - tests/test_minimax_unit.py: 22 unit tests (init, temp clamping, model normalization, cost calc, chat error handling) - tests/test_minimax_integration.py: 3 integration tests (skipped without key) - tests/conftest.py: pytest sys.path setup
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
This PR adds MiniMax as a first-class AI provider in Agentfy, following the same pattern as the existing
ChatGPTandClaudewrappers.Changes
common/ais/minimax.py—MiniMaxasync client wrapping the OpenAI-compatible API (https://api.minimax.io/v1). Supports M2.7, M2.7-highspeed, M2.5, M2.5-highspeed (all 204K context). Includes temperature clamping to(0.0, 1.0]as required by the API, model cost tracking, and model-name normalisation.common/ais/__init__.py— exports the newMiniMaxclass alongsideChatGPTandClaude.common/exceptions/exceptions.py— addsMiniMaxAPIErrorfollowing the existing exception hierarchy.config.py— addsminimax_api_keyfield reading fromMINIMAX_API_KEYenvironment variable.tests/test_minimax_unit.py— 22 unit tests covering init, temperature clamping, model normalisation, cost calculation, and error handling (no network required).tests/test_minimax_integration.py— 3 integration tests (auto-skipped whenMINIMAX_API_KEYis not set).tests/conftest.py— pytest path setup.Usage
MiniMax offers competitive pricing and a large 204K context window, making it an excellent addition to Agentfy's multi-provider AI toolkit.