feat: add MiniMax image generation tool node - #6686
Open
octo-patch wants to merge 1 commit into
Open
Conversation
Add a Tools-category node that generates images from a text prompt via the MiniMax image generation API, with a matching credential for the API key. Supports global and mainland China regions, model and aspect-ratio selection, URL or Base64 output, and prompt optimization.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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.
Reason: Flowise has no MiniMax image-generation tool, so agents cannot generate images through the MiniMax text-to-image API.
What this adds
MiniMax Image Generationtool node (packages/components/nodes/tools/MinimaxImageGeneration/) in the Tools category. It wraps thePOST /v1/image_generationendpoint and is exposed to agents as aStructuredTool(minimax_image_generation) whose input is a textprompt.MiniMax APIcredential (packages/components/credentials/MinimaxApi.credential.ts) holding the API key, sent as aBearertoken.Configuration options
https://api.minimax.io) or Mainland China (https://api.minimaxi.com).image-01(default) orimage-01-live.1:1(default),16:9,4:3,3:2,2:3,3:4,9:16,21:9.urldefault, orbase64), and Prompt Optimizer (advanced params).The tool returns the generated image URLs (valid for 24 hours) or Base64 data, and surfaces API errors via the
base_resp.status_code/ HTTP status.Notes
Serper), and the SVG icon is bundled by the existing gulpcopyIconsstep. The node is auto-discovered by the component loader, so no registry wiring is required.MinimaxImageGeneration.test.ts) covers initialization, regional endpoint routing, the request payload, and error handling using a mockedfetch.