feat: add MiniMax provider support (M2.7, M2.5, M2.5-highspeed)#1062
Open
octo-patch wants to merge 2 commits intoItzCrazyKns:masterfrom
Open
feat: add MiniMax provider support (M2.7, M2.5, M2.5-highspeed)#1062octo-patch wants to merge 2 commits intoItzCrazyKns:masterfrom
octo-patch wants to merge 2 commits intoItzCrazyKns:masterfrom
Conversation
- Add MiniMax chat model provider with OpenAI-compatible API - Support MiniMax-M2.5 and MiniMax-M2.5-highspeed models (204K context) - Override generateObject/streamObject to use prompt-based JSON (MiniMax does not support response_format) - Clamp temperature to (0.0, 1.0] range (MiniMax rejects 0) - Support configurable base URL (default: api.minimax.io/v1) - Add MINIMAX_API_KEY and MINIMAX_BASE_URL environment variables - Update README to mention MiniMax provider
Contributor
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/lib/models/providers/minimax/miniMaxLLM.ts">
<violation number="1" location="src/lib/models/providers/minimax/miniMaxLLM.ts:123">
P2: Temperature normalization is incomplete for MiniMax: values above 1 are not clamped, and inherited text paths can still send invalid config-level temperatures.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| if ( | ||
| options.temperature !== undefined && | ||
| options.temperature !== null && | ||
| options.temperature <= 0 |
Contributor
There was a problem hiding this comment.
P2: Temperature normalization is incomplete for MiniMax: values above 1 are not clamped, and inherited text paths can still send invalid config-level temperatures.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/lib/models/providers/minimax/miniMaxLLM.ts, line 123:
<comment>Temperature normalization is incomplete for MiniMax: values above 1 are not clamped, and inherited text paths can still send invalid config-level temperatures.</comment>
<file context>
@@ -0,0 +1,131 @@
+ if (
+ options.temperature !== undefined &&
+ options.temperature !== null &&
+ options.temperature <= 0
+ ) {
+ return { ...options, temperature: 0.01 };
</file context>
Add MiniMax-M2.7 to the supported chat models list and set it as the default model, ahead of M2.5 and M2.5-highspeed.
|
M2.7 doesn't seem to work. I get |
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
generateObject/streamObjectto use prompt-based JSON extraction (MiniMax does not supportresponse_format)MINIMAX_BASE_URLenv var (default:https://api.minimax.io/v1)MINIMAX_API_KEYenvironment variable for authenticationChanges
src/lib/models/providers/minimax/index.tssrc/lib/models/providers/minimax/miniMaxLLM.tssrc/lib/models/providers/index.tsREADME.mdTest plan
tsc --noEmit)