Nodes/ComfyUI_MieNodes/Set MiniMax LLM Service Connector ๐Ÿ‘
ComfyUI Node

Set MiniMax LLM Service Connector ๐Ÿ‘

Plug MiniMax into the prompt generators

By MieMieeeeeยทCreated 2 years agoยทUpdated 28 days agoยท 225
Set MiniMax LLM Service Connector ๐Ÿ‘
    • llm_service_connector
    โ—„api_tokenโ–บ
    โ—„model_selectMiniMax-M2.7โ–บ
    โ—„custom_modelโ–บ
    โ—„config_filemie_llm_keys.jsonโ–บ
    โ—„config_keyminimax_open_platformโ–บ
    โ—„prefer_local_configtrueโ–บ

    SetMiniMaxLLMServiceConnector is the node that connects MiniMax's LLM API to the rest of the MieNodes pack. Every prompt-generator node in the pack - PromptGenerator, Krea2, Z-Image, Bernini and friends - takes an llm_service_connector input, and this is one of the nodes that produces it. Without a connector, none of them can call an LLM. This is the plumbing that makes the whole prompt-enhancement half of the pack work.

    It ships in ComfyUI-MieNodes, MieMieeeee's utility pack, in the "LLM Service Config" group - MiniMax is one of a whole family of Set*LLMServiceConnector nodes (SiliconFlow, ZhiPu, DeepSeek, Kimi, Gemini, MiMo, GitHub Models, Bailian, and a generic OpenAI-compatible one).

    What it does

    The prompt generators are model-agnostic front-ends - they don't contain an LLM, they call one. This node tells them which LLM: MiniMax's Open Platform API. You give it a key and pick a model, it emits an llm_service_connector object, and you wire that into any prompt node. Swapping providers is just swapping which Set* node feeds the chain - the prompt nodes don't change. That LLM is what does the actual prompt rewriting; this node just points at it.

    The inputs that matter

    • api_token (STRING) - your MiniMax key. Note MiniMax's standard Open Platform uses a JWT-style eyJ... key (there's a separate connector for the sk-cp-... Token Plan). You can leave this empty and store the key in mie_llm_keys.json instead (see below).
    • model_select (enum) - which MiniMax model, defaulting to MiniMax-M2.7, with -highspeed variants and older M2.x options, plus Custom.
    • custom_model (optional) - the model id to use when model_select is set to Custom.

    Config plumbing (optional): config_file (default mie_llm_keys.json), config_key (default minimax_open_platform), and prefer_local_config (default on). With prefer_local_config on, the key in the JSON file wins and the api_token box is only used if the file entry is empty - flip it off to make the node input win instead.

    The single output is llm_service_connector - wire it into any prompt node's connector input.

    Setting up the key

    The clean approach: copy the pack's mie_llm_keys.json.example to mie_llm_keys.json in the plugin folder, fill in the minimax_open_platform entry, and leave api_token empty. The file isn't committed, so your secret stays local, and you're not typing a key into a node that might end up in an exported workflow. Or just type the key into api_token for a quick test.

    Installing it

    Install the pack. ComfyUI Manager โ†’ search ComfyUI-MieNodes (ComfyUI_MieNodes) โ†’ install โ†’ restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
    

    then restart. No model download. Nodes appear under the sheep-emoji ๐Ÿ‘ MieNodes menu.

    Common issues

    JWT key vs Token Plan key. This node is for the standard Open Platform eyJ... (JWT) key. If your MiniMax key starts with sk-cp-, that's a Token Plan / Coding Plan key and belongs on the separate Token Plan connector, not here. Using the wrong one is a common auth failure.

    Config key mismatch. If you stored the key under a different name in your JSON, the default config_key (minimax_open_platform) won't find it and you'll get an empty-key error. Either name the entry to match, or set config_key on the node.

    Prove it before building on it. Once wired, run the connector into CheckLLMServiceConnectivity and confirm it reaches MiniMax before you build a whole prompt pipeline on top of it. One quirk worth knowing: when forwarding images, MiniMax rejects image_detail: "auto" with an HTTP 400 - the pack strips that value automatically, so text-only prompting is unaffected.

    Category๐Ÿ‘ MieNodes/๐Ÿ‘ LLM Service Config

    Inputs (6)

    NameTypeDefaultDescription
    api_tokenSTRINGโ€”
    model_selectCOMBOMiniMax-M2.78 options: MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.5-highspeed, MiniMax-M2.1, MiniMax-M2.1-highspeed, +2
    custom_modeloptSTRINGโ€”
    config_fileoptSTRINGmie_llm_keys.jsonโ€”
    config_keyoptSTRINGminimax_open_platformโ€”
    prefer_local_configoptBOOLEANtrueโ€”

    Outputs (1)

    NameTypeDescription
    llm_service_connectorLLMServiceConnectorโ€”