Upgrade MiniMax provider to M2.5/M2.7 with OpenAI-compatible API#373
Open
octo-patch wants to merge 1 commit intoTaskingAI:masterfrom
Open
Upgrade MiniMax provider to M2.5/M2.7 with OpenAI-compatible API#373octo-patch wants to merge 1 commit intoTaskingAI:masterfrom
octo-patch wants to merge 1 commit intoTaskingAI:masterfrom
Conversation
- Migrate API endpoint from legacy api.minimax.chat/v1/text/chatcompletion_v2 to OpenAI-compatible api.minimax.io/v1/chat/completions - Add MiniMax-M2.5 (204K context), MiniMax-M2.5-highspeed, MiniMax-M2.7 (1M context), MiniMax-M2.7-highspeed model definitions - Add temperature clamping to (0, 1] range per MiniMax API requirements - Add token usage extraction (both streaming and non-streaming) - Fix streaming function call index parsing (use tool_call.index) - Mark legacy ABAB 5.5/6/6.5 models as deprecated - Enable return_token_usage and return_stream_token_usage in provider config - Add 75 tests (72 unit + 3 integration) covering all changes
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
Upgrade the MiniMax provider from legacy ABAB models and the deprecated
api.minimax.chat/v1/text/chatcompletion_v2endpoint to the modern OpenAI-compatibleapi.minimax.io/v1/chat/completionsendpoint, adding support for the latest M2.5 and M2.7 model series.Changes
api.minimax.chat/v1/text/chatcompletion_v2to OpenAI-compatibleapi.minimax.io/v1/chat/completionsextract_usage_data()andstream_extract_usage_data()for proper token counting; enabledreturn_token_usageandreturn_stream_token_usagein provider configtool_call.index(OpenAI format) instead of hardcoded0Model Specifications
Test Plan
Files Changed (14)
inference/providers/minimax/chat_completion.py- Upgraded endpoint, added temp clamping + usage extractioninference/providers/minimax/resources/provider.yml- Updated default model + token usage configinference/providers/minimax/resources/i18n/en.yml- New model translationsinference/providers/minimax/resources/models/MiniMax-M2.5.yml- New model definitioninference/providers/minimax/resources/models/MiniMax-M2.5-highspeed.yml- New model definitioninference/providers/minimax/resources/models/MiniMax-M2.7.yml- New model definitioninference/providers/minimax/resources/models/MiniMax-M2.7-highspeed.yml- New model definitioninference/providers/minimax/resources/models/abab*.yml(6 files) - Marked deprecatedinference/test/test_minimax_provider.py- 75 new tests