Set General LLM Service Connector ๐
Point ComfyUI at any OpenAI-compatible LLM
- llm_service_connector
This is the "escape hatch" connector in the MieNodes pack. The pack ships a bunch of provider-specific connector nodes (DeepSeek, MiMo, MiniMax, and so on), but the moment your provider isn't one of them, or you're pointing at a self-hosted endpoint, this is the node you want. Give it a base URL, a key, and a model name, and it hands the rest of the pack a working LLM connection. If it speaks the OpenAI chat/completions protocol - and almost everything does now - this node can drive it.
It comes from ComfyUI-MieNodes (repo title ComfyUI_MieNodes), MieMieeeee's utility pack, under the LLM Service Config group.
Why you'd reach for it
The MieNodes prompt tools don't run a local model. They call out to a real LLM to do the rewriting, enhancing, and translating. To do that they need a connector - a little bundle of "where do I send the request and how do I authenticate." Most of the dedicated connectors bake in one vendor's URL. This one leaves that field open.
That's genuinely useful in three cases. Your provider isn't in the built-in list. You're running a local OpenAI-compatible server (llama.cpp, vLLM, LM Studio, Ollama's compat endpoint). Or a provider offers a free-tier model and you just want to paste its model id and go - the README specifically calls out ZhiPu and SiliconFlow as having free lineups that change often, which is exactly the "type the model name in yourself" situation.
The KB's prompt-engineering notes make the case for why you'd bother with LLM-assisted prompting at all: on modern LLM-encoded models (Flux 2, Z-Image, and friends) your prompt is read as an instruction, so having an LLM write that instruction is a translation between two things that speak the same language. This node is the plumbing that makes that possible.
The inputs that matter
Three required fields do the real work:
api_url- the full endpoint. Defaults to SiliconFlow'shttps://api.siliconflow.cn/v1/chat/completions. Swap in whatever provider or local server you're using.api_token- your API key. You can leave this empty and store the key in a config file instead (see below).model_select- the model id as a plain string. Defaults todeepseek-ai/DeepSeek-V3. This is a free-text field, not a dropdown, so paste the exact id your provider expects.
Then the optional config plumbing, which is shared across every connector in the pack: config_file (default mie_llm_keys.json), config_key (default openai_compatible), and prefer_local_config (default true). With prefer_local_config on, the JSON file wins and the api_token field is only used as a fallback when the file is missing or empty. Flip it to false when you want the node's own field to override the file.
The single output is llm_service_connector. Wire it into CallLLMService or any of the prompt-generator nodes.
Installing it
Grab the pack. ComfyUI Manager โ search ComfyUI-MieNodes โ install โ restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
then restart. No model download - this is a networking node. Nodes show up under the sheep-emoji ๐ MieNodes menu.
Common issues
Empty or wrong response? Nine times out of ten it's the model id. The field is free text, so a typo or an id your provider doesn't recognize just fails. Copy it straight from the provider's model list.
Keeping your key out of the workflow. Rather than typing the token into the node (and risking it in a saved/shared workflow JSON), copy mie_llm_keys.json.example to mie_llm_keys.json in the plugin folder, put your key under the openai_compatible entry, and leave api_token blank. That file is intentionally not committed by the pack.
Local servers need the right path. Point api_url at the actual /v1/chat/completions route, not just the host. And if you're on a cloud/serverless ComfyUI, a localhost endpoint won't be reachable - use a hosted provider there instead.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| api_url | STRING | https://api.siliconflow.cn/v1/chat/completions | โ |
| api_token | STRING | โ | |
| model_select | STRING | deepseek-ai/DeepSeek-V3 | โ |
| config_fileopt | STRING | mie_llm_keys.json | โ |
| config_keyopt | STRING | openai_compatible | โ |
| prefer_local_configopt | BOOLEAN | true | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| llm_service_connector | LLMServiceConnector | โ |