feat(minimax): add reasoning_split support for MiniMax M2 models#1459
Closed
darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
Closed
feat(minimax): add reasoning_split support for MiniMax M2 models#1459darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
Conversation
Add support for MiniMax's reasoning_split parameter to properly separate thinking content (cot) from response text. Changes: - Add ReasoningSplit field to ModelConfig - Add WithReasoningSplit option to openai_compat provider - Add NewHTTPProviderWithOptions to support reasoning_split parameter - Update factory_provider to pass reasoning_split for MiniMax - Add MiniMax to provider migration config When reasoning_split is enabled, MiniMax M2 models will return reasoning content in the reasoning_details field instead of embedding it within <thinking> tags in the content field. Fixes sipeed#1320 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
c13b7bd to
924d58c
Compare
11 tasks
|
@darrenzeng2025 Hi! This PR has had no activity for over 2 weeks, so I'm closing it for now to keep things tidy. If it's still relevant, feel free to reopen it anytime and we'll pick it back up. |
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 support for MiniMax's
reasoning_splitparameter to properly separate thinking content (cot) from response text when using MiniMax M2 models.Problem
Issue #1320 reported that:
v1/text/chatcompletion_v2is not supportedv1/chat/completionsendpoint, thinking content (cot) appears in the textreasoning_split:trueto move cot toreasoning_detailsfieldSolution
Added
reasoning_splitparameter support for MiniMax provider:ModelConfig (
pkg/config/config.go):ReasoningSplit boolfield for provider-specific optionsopenai_compat provider (
pkg/providers/openai_compat/provider.go):reasoningSplitfield toProviderstructWithReasoningSplit()option functionreasoning_split: trueto request bodyHTTP Provider (
pkg/providers/http_provider.go):NewHTTPProviderWithOptions()constructorreasoningSplitparameterFactory Provider (
pkg/providers/factory_provider.go):NewHTTPProviderWithOptions()cfg.ReasoningSplitto providerMigration (
pkg/config/migration.go):Usage
{ "model_list": [ { "model_name": "minimax-m2", "model": "minimax/MiniMax-M2.5", "api_key": "your-api-key", "reasoning_split": true } ] }When
reasoning_splitis enabled, MiniMax M2 models will return reasoning content in thereasoning_detailsfield instead of embedding it within<think>tags in the content field.Testing
gofmtFixes #1320