feat(MiniMax Node): Add standalone MiniMax vendor node#28748
Conversation
Add a full-featured standalone MiniMax vendor node with four resources: - Text: Message a Model (with tool calling, reasoning_split, token tracking) - Image: Generate an Image (text-to-image with download toggle) - Video: Generate From Text and From Image (async polling, first-last-frame, subject-reference) - Audio: Text to Speech (multiple voices, emotion, speed/pitch/volume controls) Reuses existing minimaxApi credential and minimax.svg icon from the chat model sub-node. Follows the established Moonshot/AlibabaCloud vendor node pattern. Made-with: Cursor
Bundle ReportChanges will increase total bundle size by 37 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: editor-ui-esmAssets Changed:
|
Performance ComparisonComparing current → latest master → 14-day baseline Memory consumption baseline with starter plan resources
docker-stats
Idle baseline with Instance AI module loaded
How to read this table
|
Sort dropdown options alphabetically per n8n eslint rules and suppress false positive on URL containing lowercase 'id'. Made-with: Cursor
|
/size-limit-override |
- Delete unused prepareBinaryPropertyList helper - Fix dead link to MiniMax voice ID documentation Made-with: Cursor
Merging this PR will degrade performance by 15.02%
Performance Changes
Comparing Footnotes
|
There was a problem hiding this comment.
5 issues found across 21 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="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/image/generate.operation.ts">
<violation number="1" location="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/image/generate.operation.ts:118">
P2: The seed filter incorrectly drops a valid seed value (`0`), so an explicit seed of 0 is sent as omitted/random instead of deterministic.</violation>
</file>
<file name="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.ts">
<violation number="1" location="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.ts:300">
P2: Validate model compatibility before sending `last_frame_image`; unsupported model combinations are currently allowed and can cause avoidable API request failures.</violation>
<violation number="2" location="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.ts:311">
P2: Restrict `subject_reference` to `MiniMax-Hailuo-2.3` before building the request body to prevent invalid model/option combinations.</violation>
</file>
<file name="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/text/message.operation.ts">
<violation number="1" location="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/text/message.operation.ts:339">
P2: Fail when a requested tool is not connected instead of sending an empty tool response.</violation>
</file>
<file name="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/router.ts">
<violation number="1" location="packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/router.ts:45">
P2: Preserve richer error details in `continueOnFail()` instead of serializing only `error.message`.
(Based on your team's feedback about preserving rich error details in continueOnFail paths.) [FEEDBACK_USED]</violation>
</file>
Architecture diagram
sequenceDiagram
participant User as n8n Workflow Engine
participant Router as MiniMax Router
participant Op as Resource Operations<br/>(Text/Image/Video/Audio)
participant Transport as Transport Helper<br/>(Polling & Auth)
participant MiniMax as MiniMax External API
participant Tools as Connected AI Tools
Note over User, MiniMax: NEW: MiniMax Standalone Vendor Node Flow
User->>Router: execute() with Resource & Operation
Router->>Router: NEW: Resolve resource handler
alt Resource: Text (Chat)
Router->>Op: execute(message)
Op->>Transport: apiRequest('/chat/completions')
Transport->>MiniMax: POST with auth & messages
MiniMax-->>Transport: Response with choices/tool_calls
loop Tool Iteration (maxToolsIterations)
opt If finish_reason == 'tool_calls'
Op->>Tools: NEW: invoke(arguments)
Tools-->>Op: tool result
Op->>Transport: apiRequest() with tool output
Transport->>MiniMax: POST next turn
MiniMax-->>Transport: Updated response
end
end
Op-->>Router: Final text/simplified output
else Resource: Video (Async Generation)
Router->>Op: execute(textToVideo/imageToVideo)
Op->>Transport: apiRequest('/video_generation')
Transport->>MiniMax: POST prompt/image
MiniMax-->>Transport: Returns task_id
loop NEW: Polling (pollVideoTask)
Transport->>Transport: sleep(15s)
Transport->>MiniMax: GET /query/video_generation?task_id
MiniMax-->>Transport: status (Processing/Success/Fail)
end
Op->>Transport: getVideoDownloadUrl(file_id)
Transport->>MiniMax: GET /files/retrieve
MiniMax-->>Transport: download_url
Op-->>Router: videoUrl + metadata
else Resource: Image/Audio (Direct)
Router->>Op: execute()
Op->>Transport: apiRequest()
Transport->>MiniMax: POST parameters
MiniMax-->>Transport: Response with URL/Data
opt NEW: If download requested
Op->>User: helpers.httpRequest(url, arraybuffer)
User-->>Op: binary buffer
Op->>User: helpers.prepareBinaryData()
end
Op-->>Router: JSON + Optional Binary
end
Router-->>User: Return INodeExecutionData[]
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| stream: false, | ||
| output_format: 'url', | ||
| voice_setting: { | ||
| voice_id: voiceId, |
There was a problem hiding this comment.
because of hardcoded output_format: 'url', execution would always take this routeif (audioData.startsWith('http')) {- we should either add option or remove unused logic
There was a problem hiding this comment.
Agreed, removed the dead hex branch in 9e4d2dd.
|
|
||
| const body: IDataObject = { | ||
| model: 'image-01', | ||
| prompt, |
There was a problem hiding this comment.
so, only one model is supported for image generation? I wonder if it still worth to have this as options for consistency
There was a problem hiding this comment.
Yes, MiniMax currently only offers image-01 for image generation. Added it as a dropdown anyway in 9e4d2dd for consistency with other operations and to make it easy to add new models later.
alexander-gekov
left a comment
There was a problem hiding this comment.
Works great! Also tested with AI Gateway and looks solid there as well!
…de, image model dropdown - Fix seed=0 being incorrectly filtered out in image generation - Remove unreachable hex decoding branch in TTS (output_format is always 'url') - Add model dropdown for image generation instead of hardcoding 'image-01' Made-with: Cursor
michael-radency
left a comment
There was a problem hiding this comment.
thanks for updates, LGTM 👍
|
Successfully created backport PR for |
|
Successfully created backport PR for |
|
Got released with |
Summary
Add a standalone MiniMax vendor node following the Moonshot/AlibabaCloud pattern with four resources:
Loom Recording
Reuses the existing
minimaxApicredential and icon from PR #28305.📋 Test Workflow JSON
Import into n8n and configure your MiniMax API credentials.
{"name":"MiniMax - Test All Actions","nodes":[{"parameters":{},"id":"trigger-main","name":"Run All Tests","type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[0,780]},{"parameters":{"resource":"text","operation":"message","modelId":"MiniMax-M2.7","messages":{"values":[{"content":"What is the capital of France? Answer in one sentence.","role":"user"}]},"simplify":true,"options":{"temperature":0.7,"maxTokens":256,"hideThinking":true}},"id":"text-message-simple","name":"Text: Simple Message","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[400,0],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"text","operation":"message","modelId":"MiniMax-M2.7","messages":{"values":[{"content":"You are a friendly pirate.","role":"assistant"},{"content":"Tell me about the weather today.","role":"user"}]},"simplify":true,"options":{"system":"You are a helpful assistant who always responds in a fun way.","temperature":0.9,"maxTokens":512,"hideThinking":true}},"id":"text-message-multiturn","name":"Text: Multi-turn + System","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[400,280],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"text","operation":"message","modelId":"MiniMax-M2.7","messages":{"values":[{"content":"Explain quantum computing in 3 sentences.","role":"user"}]},"simplify":false,"options":{"hideThinking":false,"maxTokens":1024}},"id":"text-message-full","name":"Text: Full Response + Thinking","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[400,560],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"text","operation":"message","modelId":"MiniMax-M2.5","messages":{"values":[{"content":"Say hello and tell me a joke.","role":"user"}]},"simplify":true,"options":{"temperature":0.5,"topP":0.9,"maxTokens":256}},"id":"text-message-m25","name":"Text: M2.5 Model","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[400,840],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{},"id":"tool-calculator","name":"Calculator","type":"@n8n/n8n-nodes-langchain.toolCalculator","typeVersion":1,"position":[400,1280]},{"parameters":{"resource":"text","operation":"message","modelId":"MiniMax-M2.7","messages":{"values":[{"content":"What is 1547 * 382 + 9281? Use the calculator tool to compute this precisely.","role":"user"}]},"simplify":true,"options":{"temperature":0.1,"maxTokens":512,"maxToolsIterations":5}},"id":"text-message-tools","name":"Text: With Calculator Tool","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[400,1120],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"image","operation":"generate","prompt":"A cute golden retriever puppy playing in autumn leaves, photorealistic style","aspectRatio":"1:1","numberOfImages":1,"downloadImage":true,"options":{}},"id":"image-generate-download","name":"Image: Generate + Download","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[900,0],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"image","operation":"generate","prompt":"A futuristic cityscape at sunset with flying cars, cyberpunk style","aspectRatio":"16:9","numberOfImages":2,"downloadImage":false,"options":{"promptOptimizer":true}},"id":"image-generate-url","name":"Image: URL Only + Optimizer","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[900,280],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"image","operation":"generate","prompt":"A serene Japanese garden with cherry blossoms and a koi pond","aspectRatio":"9:16","numberOfImages":1,"downloadImage":true,"options":{"seed":42}},"id":"image-generate-seed","name":"Image: Portrait + Seed","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[900,560],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"video","operation":"textToVideo","modelId":"MiniMax-Hailuo-2.3","prompt":"A cat stretching and yawning on a sunny windowsill, camera slowly zooms in","duration":6,"resolution":"768P","downloadVideo":true,"options":{"promptOptimizer":true}},"id":"video-t2v-download","name":"Video T2V: Download","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[1400,0],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"video","operation":"textToVideo","modelId":"T2V-01-Director","prompt":"A drone shot flying over a mountain lake at sunrise [Pan right] [Push in]","duration":10,"resolution":"1080P","downloadVideo":false,"options":{}},"id":"video-t2v-url","name":"Video T2V: Director Model","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[1400,280],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"video","operation":"imageToVideo","modelId":"MiniMax-Hailuo-2.3","imageInputType":"url","imageUrl":"https://cdn.hailuoai.com/prod/2024-09-18-16/user/multi_chat_file/9c0b5c14-ee88-4a5b-b503-4f626f018639.jpeg","prompt":"A mouse runs toward the camera, smiling and blinking","duration":6,"resolution":"768P","downloadVideo":true,"options":{}},"id":"video-i2v-url","name":"Video I2V: From URL","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[1400,560],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"video","operation":"imageToVideo","modelId":"MiniMax-Hailuo-2.3","imageInputType":"binary","binaryPropertyName":"data","prompt":"The image comes to life with gentle animation","duration":6,"resolution":"768P","downloadVideo":false,"options":{}},"id":"video-i2v-binary","name":"Video I2V: From Binary","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[1400,840],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"audio","operation":"textToSpeech","modelId":"speech-2.8-hd","text":"Hello! Welcome to the MiniMax text to speech demo. This is a test of the audio generation capabilities.","voiceId":"English_Graceful_Lady","downloadAudio":true,"options":{}},"id":"audio-tts-download","name":"Audio TTS: Download MP3","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[1900,0],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"audio","operation":"textToSpeech","modelId":"speech-2.8-turbo","text":"Today is a wonderful day! The sun is shining and the birds are singing. Let us celebrate this beautiful moment together.","voiceId":"English_Graceful_Lady","downloadAudio":true,"options":{"speed":1.2,"volume":2,"pitch":3,"emotion":"happy","audioFormat":"wav","languageBoost":"English"}},"id":"audio-tts-options","name":"Audio TTS: All Options","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[1900,280],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}},{"parameters":{"resource":"audio","operation":"textToSpeech","modelId":"speech-2.6-hd","text":"This audio will not be downloaded. Only the URL will be returned for later use.","voiceId":"English_Graceful_Lady","downloadAudio":false,"options":{"audioFormat":"mp3"}},"id":"audio-tts-url","name":"Audio TTS: URL Only","type":"@n8n/n8n-nodes-langchain.minimax","typeVersion":1,"position":[1900,560],"credentials":{"minimaxApi":{"id":"","name":"MiniMax API"}}}],"connections":{"Run All Tests":{"main":[[{"node":"Text: Simple Message","type":"main","index":0},{"node":"Text: Multi-turn + System","type":"main","index":0},{"node":"Text: Full Response + Thinking","type":"main","index":0},{"node":"Text: M2.5 Model","type":"main","index":0},{"node":"Image: Generate + Download","type":"main","index":0},{"node":"Image: URL Only + Optimizer","type":"main","index":0},{"node":"Image: Portrait + Seed","type":"main","index":0},{"node":"Video T2V: Download","type":"main","index":0},{"node":"Video T2V: Director Model","type":"main","index":0},{"node":"Video I2V: From URL","type":"main","index":0},{"node":"Audio TTS: Download MP3","type":"main","index":0},{"node":"Audio TTS: All Options","type":"main","index":0},{"node":"Audio TTS: URL Only","type":"main","index":0},{"node":"Text: With Calculator Tool","type":"main","index":0}]]},"Calculator":{"ai_tool":[[{"node":"Text: With Calculator Tool","type":"ai_tool","index":0}]]},"Image: Generate + Download":{"main":[[{"node":"Video I2V: From Binary","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"},"meta":{"templateCredsSetupCompleted":true}}Related Linear tickets
https://linear.app/n8n/issue/NODE-4760
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)