MiniMax H3 LLM Config 👻
One config node to feed every LLM-powered node in the pack — any OpenAI-compatible API will do
- llm_config
If you've seen the other MiniMax H3 nodes in this pack, you may have wondered where the API key goes. The answer is here: MiniMax H3 LLM Config 👻 is a standalone settings node that holds your api_key, base_url, model and max_tokens and hands them to any node that takes an H3_LLM_CONFIG input - the Prompt Optimizer, the Studio, anything. Wire it once, share it across a workflow, and you never type a key into a per-node field again.
Its official name is a bit of a lie: it's not MiniMax-specific at all. The base URL follows the OpenAI-compatible protocol, which means the same node can point at Aliyun's Bailian (百炼), DeepSeek, OpenRouter, a local Ollama server - any endpoint that speaks OpenAI's API dialect. The description in the code says exactly that, and it's the most useful sentence in the whole file.
The four inputs
- api_key - your key. Starts empty; you paste it in.
- base_url - defaults to an Aliyun Bailian OpenAI-compatible endpoint. This is the author's home turf (the pack leans heavily on Bailian's free-token tiers).
- model - defaults to
qwen3.7-max-2026-05-20, which is a Qwen model name on the Bailian side. Swap in whatever your endpoint actually serves. - max_tokens - default 8192, range 256–65536. The tooltip gives the practical rule: cloud LLMs want 8192+, small local Ollama models can go lower to match their context window.
One output: llm_config (type H3_LLM_CONFIG), which is a custom pipe type this pack defines - you won't find it in core ComfyUI. It only connects to nodes that expect it.
How it works
There's no magic: it packs the four values into a dict and returns it. When a downstream node like the Prompt Optimizer runs, it unpacks that dict and uses it to construct an OpenAI SDK client. If nothing is connected, the downstream nodes fall back to the pack's defaults (Bailian base URL + default model) with an empty key - which means the H3 prompt nodes will run in "offline passthrough" mode rather than crash, but you're not actually calling any API. So: to get LLM-powered output, this node must be connected and have a real key.
Install
# ComfyUI Manager: search "ComfyUI-Minitools"
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/lepiai/ComfyUI-Minitools
# restart ComfyUI
pip install openai # the one non-bundled dependency the H3 nodes need
The pack's requirements.txt pins openai==2.6.1 (plus requests, Pillow, numpy, which ComfyUI already ships). No model downloads - the model lives on the remote endpoint.
The things to be careful about
- Security posture. This is the pack's credential-bearing API node, and the KB is blunt about the category: an API-wrapper node is arbitrary Python that ships a key and calls the network by design - the exact shape of the ComfyUI_LLMVISION malware that led to a federal prosecution. Before you paste a key anywhere, be reasonably sure you're running the real
lepiai/ComfyUI-Minitoolsand not a lookalike. The repo's code is small and readable; a skim is worth ten minutes. - Keys are per-workflow, saved into the JSON. If you share a workflow, scrub it or your key goes with it.
- Don't expect the default model name to exist forever.
qwen3.7-max-2026-05-20is a dated snapshot name; cloud providers retire model versions. If your calls start 404ing, check that the model string still exists on your endpoint. - Local Ollama? Set base_url to your Ollama server's OpenAI-compatible route and pick a model name Ollama actually has loaded. Small local models produce weaker prompt rewrites than the cloud models - that's a capability ceiling, not a bug in this node.
It's a boring node - a config holder - and that's the compliment. In a pack full of opinionated utilities, this one does one job cleanly and lets everything else share it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| base_url | STRING | https://llm-u7gau3h957ok5i0m.cn-beijing.maas.aliyuncs.com/compatible-mode/v1 | — |
| model | STRING | qwen3.7-max-2026-05-20 | — |
| max_tokens | INT | 8192256–65536 | LLM 输出 token 上限。百炼/云端大模型建议 8192+;本地 ollama 小模型可按实际上下文窗口设置 |
| enable_thinking | BOOLEAN | false | 思考模式开关。关闭可提速 40-60%(Qwen3 系列);开启则模型先推理再输出,质量更高但更慢。百炼和 Ollama 均支持 |
| temperature | FLOAT | 0.7-1–2 | 生成随机性。0=确定性输出,1=较多变化。设为 -1 则不发送此参数;若模型不支持(如 kimi-k3)会自动移除并重试,无需手动处理 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| llm_config | H3_LLM_CONFIG | — |