Lumi OpenRouter Provider
One provider node to point every LLM call at OpenRouter
- provider
Lumi OpenRouter Provider is the configuration half of the pack's LLM setup. It does nothing by itself - no text, no images - but every Lumi LLM call starts here, because it's the node that decides which model you talk to and how much it's allowed to say. You wire it into Lumi LLM Prompt Processor and all the smarts follow.
This split is the pack's whole philosophy, and it's a good one: the provider carries all the state and the API key, the processor stays stateless. Change the model here and every downstream processor behaves differently without you touching a single wire. More importantly, the API key never gets written into the workflow file - the provider reads it straight from an environment variable at execution time.
The inputs that matter
- env_key - which environment variable holds the key. Defaults to
OPENROUTER_API_KEY, and you can point it at any env var you like if you're juggling multiple accounts. - model - the big combo dropdown. This is the interesting one: the pack fetches the live model list from
openrouter.ai/api/v1/modelsat startup and caches it, so you get OpenRouter's full catalog (hundreds of models, not a hardcoded handful). If the fetch fails - no internet at boot, for instance - it falls back to a small static list. - max_tokens - cap on the response, 1–32000, default 1000.
- top_p - sampling diversity, 0–1, default 1. Turn it down a bit if the LLM keeps rambling.
The single output, provider (LLM_PROVIDER), plugs into Lumi LLM Prompt Processor.
One honest warning about that model dropdown: its default is whatever OpenRouter happens to return first, which today is meituan/longcat-2.0 - a real model, sure, but an odd default for prompt work. Pick deliberately. A fast flash-tier Gemini or a solid Claude are the usual crowd pleasers for rewriting prompts; you'll see the whole catalog in the list.
Installing and the key
cd ComfyUI/custom_nodes
git clone https://github.com/illuminatianon/comfyui-lumi-tools
cd comfyui-lumi-tools
uv sync
Restart ComfyUI, or search "Lumi Tools" in ComfyUI Manager. No models to download - this is pure API plumbing. Set the key wherever the ComfyUI process can actually see it:
export OPENROUTER_API_KEY=sk-or-v1-...
The one error you'll actually hit
"API key not found in environment variable 'OPENROUTER_API_KEY'" - this is the pack telling you the env var isn't visible to the ComfyUI process. You exported it in a terminal, but you launched ComfyUI from a desktop shortcut or a service that doesn't inherit your shell. Export it in the right place (your .bashrc, the service file, or a .env you source before launch) and restart. If the model list looks stale instead, it's usually the startup fetch failing - restart ComfyUI with internet and the dropdown refreshes.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| env_key | STRING | OPENROUTER_API_KEY | Environment variable name containing the OpenRouter API key |
| model | COMBO | meituan/longcat-2.0 | Select the OpenRouter model to use |
| max_tokens | INT | 10001–32000 | Maximum number of tokens to generate |
| top_p | FLOAT | 1.000–1 | Top-p sampling parameter for response diversity |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| provider | LLM_PROVIDER | — |