feat: add MiniMax provider support#90
Open
BingqingLyu wants to merge 3 commits into
Open
Conversation
added 3 commits
April 12, 2026 16:39
- Add MiniMaxOpenAICompatibleProvider extending DefaultOpenAICompatibleProvider - Use OpenAI-compatible interface with https://api.minimax.io/v1 as default base URL - Enforce temperature in (0.0, 1.0] range; remove unsupported response_format - Register provider detection in determineProvider() factory - Add token limits for MiniMax-M2.7 (200K input, 64K output) - Add unit tests for all provider behaviors
- Fix URL detection to use hostname comparison (prevents substring false positives flagged by CodeQL) - Move default base URL to buildClient() override — avoids mutating contentGeneratorConfig in the constructor (matches sibling pattern) - Replace any cast + delete with typed destructuring for response_format - Guard temperature against null (number | null | undefined per SDK types) - Clarify token-limit comment: regex covers M2.7-highspeed too - Add MiniMax section to model-providers.md with config examples for both MiniMax-M2.7 and MiniMax-M2.7-highspeed
…t pattern - buildRequest now clamps temperature > 1.0 down to 1.0 (was previously passed through to API and would have failed). Adds debug logs via the project DebugLogger when an explicit user value is rewritten so the adjustment is observable. - Removed redundant /^minimax-m2.7/ entry in tokenLimits.ts; the existing /^minimax-/ fallback already maps M2.7 / M2.7-highspeed to 200K. Addresses review suggestions on QwenLM#3165.
This was referenced Apr 28, 2026
Owner
Author
Conflict Group 1This PR shares modified functions with 5 other PR(s): #1, #113, #114, #117, #88. These PRs should be reviewed as a batch — merging one may affect the others.
graph LR
PR90["PR #90"]
FdetermineProvider_2049["determineProvider<br>index.ts"]
PR90 -->|modifies| FdetermineProvider_2049
PR1["PR #1"]
PR1 -->|modifies| FdetermineProvider_2049
PR113["PR #113"]
PR113 -->|modifies| FdetermineProvider_2049
PR114["PR #114"]
PR114 -->|modifies| FdetermineProvider_2049
PR117["PR #117"]
PR117 -->|modifies| FdetermineProvider_2049
PR88["PR #88"]
PR88 -->|modifies| FdetermineProvider_2049
Posted by codegraph-ai conflict detection. |
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 an OpenAI-compatible provider for Qwen Code.
Changes
MiniMaxOpenAICompatibleProviderextendingDefaultOpenAICompatibleProviderbuildClient()override (matches sibling provider pattern)api.minimaxi.comas an alternative (domestic mirror)new URL(baseUrl).hostnameto prevent substring false-positives (fixes CodeQL warnings)nullper SDK types (number | null | undefined)response_format: removed via typed destructuring — noanycast ordeleteMiniMax-M2.7/M2.7-highspeed(200K input, 64K output)docs/users/configuration/model-providers.mdSupported Models
MiniMax-M2.7MiniMax-M2.7-highspeedAPI References