feat: add MiniMax provider support (chat + TTS)#34
Open
octo-patch wants to merge 2 commits intocalesthio:mainfrom
Open
feat: add MiniMax provider support (chat + TTS)#34octo-patch wants to merge 2 commits intocalesthio:mainfrom
octo-patch wants to merge 2 commits intocalesthio:mainfrom
Conversation
- Add MiniMax TTS provider (tools/audio/minimax_tts.py) using the T2A v2 API (https://api.minimax.io/v1/t2a_v2) - Supports models speech-2.8-hd (default) and speech-2.8-turbo - Auto-discovered by the TTS selector — no manual registration needed - Requires MINIMAX_API_KEY environment variable - Add 21 unit tests (tests/tools/test_minimax_tts.py) - Document MINIMAX_API_KEY in .env.example and docs/PROVIDERS.md
- Add lib/providers/base.py with BaseLLMProvider abstract base class - Add lib/providers/minimax.py with MiniMaxProvider (OpenAI-compatible) - Supports MiniMax-M2.7 and MiniMax-M2.7-highspeed models - Default temperature 1.0 (MiniMax range: (0.0, 1.0]) - Uses https://api.minimax.io/v1/chat/completions endpoint - Add lib/providers/__init__.py with build_provider() factory function - Instantiates the correct provider from LLMConfig.provider field - Add 25 unit tests in tests/tools/test_minimax_provider.py - Update docs/PROVIDERS.md with MiniMax Chat section - Update .env.example comment to reflect chat + TTS usage API reference: https://platform.minimax.io/docs/api-reference/text-openai-api
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
tools/audio/minimax_tts.py): cost-effective text-to-speech usingspeech-2.8-hd/speech-2.8-turbomodels, 6 English voice IDs, hex-encoded audio viaapi.minimax.io/v1/t2a_v2lib/providers/minimax.py): OpenAI-compatible LLM provider forMiniMax-M2.7andMiniMax-M2.7-highspeed, activated by settingllm.provider: minimaxinconfig.yamllib/providers/__init__.py):build_provider(llm_config)routes to the correct backend;lib/providers/base.pydefines the shared interfacedocs/PROVIDERS.mdand.env.exampleBoth tools share a single
MINIMAX_API_KEY. Temperature is clamped to(0.0, 1.0](MiniMax rejectstemperature=0). Base URL is alwayshttps://api.minimax.io(notapi.minimax.chat).API references
Test plan
pytest tests/tools/test_minimax_tts.py— 21 passedpytest tests/tools/test_minimax_provider.py— 25 passedpytest tests/contracts/ tests/tools/— 303 passed, 3 pre-existing PyTorch failures unrelated to this PR