OpenAI Compatible Adapter
The one node that finally makes DeepSeek/Qwen/GPT usable inside ComfyUI
- llm_config
- response
- reasoning
Stop hand-rolling API calls, this is the node for it
If you've ever tried to get an LLM to help with a workflow - write a prompt, caption an image, translate your batch - you know the drill: some pack's OpenAI node needs a key hardcoded into a text field, another crashes your whole graph the moment the API hiccups, and a third assumes you run everything through one specific provider. OpenAI Compatible Adapter from ComfyUI-LLMs-Toolkit is the "finally, one interface for all of it" node. It sends a prompt to any OpenAI-compatible LLM - DeepSeek, Qwen, GPT, GLM, Moonshot, or a local Ollama endpoint - and hands you back text, plus a separate reasoning output for the thinking models. No local GPU model, no key buried in a .env file, and it's built to not nuke your workflow when the API fails.
It's part of the HuangYuChuh pack (ComfyUI-LLMs-Toolkit), which is mostly built around a visual LLMs_Manager panel in ComfyUI's menu bar - you pick a provider, paste your key once, and the node's dropdowns fill themselves in. That's the bit most LLM node packs get wrong; this one treats keys as configuration, not as something you glue into a prompt box.
How it works
The node's config comes from one of two places. The default is the Provider Manager: keys live in config/providers.json on your machine (gitignored, so they don't ride along if you push a workflow), and the provider dropdown lists whatever you've enabled there. The alternative is the LLM_CONFIG (from input) mode - connect an LLMs Loader node and the whole provider/model/key bundle travels down that wire instead. You can't have both at once: set provider to "LLM_CONFIG (from input)" and if nothing's connected it returns a readable error rather than silently guessing.
Under the hood it uses the pack's shared LLMClient, which does the boring-but-important work: exponential backoff on rate limits, respecting Retry-After, and classifying failures into messages you can actually act on ([AUTH] API Key is invalid or expired, [RATE_LIMIT] …, [BAD_REQUEST] …). Failures come back as text in the output, not as a red node that kills the queue - the pack's whole philosophy is graceful degradation, and it shows.
The two outputs are response (the model's answer) and reasoning. The second one is the sleeper feature: DeepSeek-reasoner's reasoning_content gets captured natively, and for models that emit <think> tags instead, it strips those tags and feeds the thinking through the reasoning output too. If you're building anything that displays chain-of-thought, that's already solved.
The inputs that matter
- system_prompt (default "You are an AI assistant") and prompt - the obvious ones; both multiline.
- temperature (0–2, default 0.7) and max_tokens (default 2048) - your usual knobs.
- enable_memory - per-node multi-turn chat history, capped at 40 messages. Handy for back-and-forth workflows, off by default.
- prep_img - where you plug in the Image Prep node's base64 output for vision models. Only multimodal models (Qwen-VL, GPT-4o, GLM-4V…) can use it; plain text models ignore it.
- llm_config - the LLM_CONFIG input for loader-driven setups.
- seed - just cache-busting; the code deliberately does not inject it into the API payload (strict providers like Qwen3 reject unknown fields).
Installing
It ships inside ComfyUI-LLMs-Toolkit. Easiest path: ComfyUI Manager → search ComfyUI-LLMs-Toolkit → Install → restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/HuangYuChuh/ComfyUI-LLMs-Toolkit
cd ComfyUI-LLMs-Toolkit
pip install -r requirements.txt
Then restart and click LLMs_Manager in the top menu bar, add your provider and key, hit Check API, toggle Enable in Nodes, and refresh the browser - the dropdowns only repopulate on a page reload. Good news on dependencies: the requirements are just Pillow and aiohttp. No transformers, no model files, no GPU RAM to budget. It's API-only by design.
Gotchas
The most common failure is the "API Key is missing" message - that means the provider either isn't enabled in the manager or you saved without toggling Enable in Nodes on. Next is the stale-dropdown trap: changed a provider, still not in the list? Ctrl+R. And remember config/providers.json is where your keys live - it's gitignored, but don't share the file manually, and given the ecosystem's history with malicious "LLM vision" nodes, it's worth a skim of the source before you trust any new LLM pack. This one is a few hundred lines of readable Python that makes direct HTTP calls - no middleware, no telemetry, no account.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| provider | COMBO | LLM_CONFIG (from input) | 1 options: LLM_CONFIG (from input) |
| model | COMBO | LLM_CONFIG (from input) | 2 options: Custom Input, LLM_CONFIG (from input) |
| system_prompt | STRING | You are an AI assistant | — |
| prompt | STRING | hello | — |
| temperatureopt | FLOAT | 0.700–2 | — |
| max_tokensopt | INT | 20481–4096 | — |
| enable_memoryopt | BOOLEAN | false | — |
| seedopt | INT | 00–18446744073709550000 | — |
| llm_configopt | LLM_CONFIG | — | |
| prep_imgopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |
| reasoning | STRING | — |