LiteLLMModelProvider
LiteLLMModelProvider is the model dropdown, warts and all
- Litellm model
Every LLM workflow needs an answer to the same question: which model am I talking to? LiteLLMModelProvider is that answer in node form. Drop it in, pick a model from the dropdown, and wire its output into a completion node. That's the whole job.
How it works
The node is deliberately dumb. It exposes one input, name - a dropdown with 16 hard-coded LiteLLM model strings - and its handler just returns the string you chose as a LITELLM_MODEL output (labeled "Litellm model"). There's no key-checking, no API call, no latency. It exists so the rest of the pack has a typed, standard way to receive "which model" instead of each node inventing its own dropdown.
That's the LiteLLM pitch in a nutshell: instead of a ComfyUI pack with one hard-coded provider, you get one selector that can hand any of these to the same downstream nodes:
anthropic/claude-3-haiku-20240307(the default), Claude 3 Sonnet/Opusbedrock/anthropic.claude-3-*variantsvertex_ai/gemini-1.5-pro-preview-0514,vertex_ai/gemini-1.5-flash-preview-0514openai/gpt-4o,openai/gpt-4o-minitogether_ai/deepseek-ai/DeepSeek-V3,together_ai/meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo
The honest take
That list is from mid-2024, and it shows. Claude 3 Haiku 20240307, Gemini 1.5 preview 0514, GPT-4o - these are all old revisions. If you came here because another LLM node burned you with a stale model list, you're not wrong to be wary: the exact pain of "the dropdown only has claude-3-sonnet, my key says model not found" is a recurring r/comfyui complaint about LLM packs. This pack has the same weakness in this node.
The good news: it's not the only provider node. The same repo ships LiteLLMModelProviderAdv, which has a far bigger model list plus a built-in pricing table, and LiteLLMCustomEndpointProvider for pointing at arbitrary base URLs. If your model isn't in LiteLLMModelProvider's 16, reach for the Adv version first - or just pick the closest family here and override details with ModifyModelKwargs.
Wiring it up
Output "Litellm model" goes into any node that takes a LITELLM_MODEL input - the completion nodes, ModifyModelKwargs, and the LightRAG providers in this pack. You'll typically chain it like:
LiteLLMModelProvider → ModifyModelKwargs (temperature, max_tokens) → LiteLLMCompletion
One thing to get straight up front: the model you pick has to match the API key you've configured. Pick openai/gpt-4o-mini and the pack will look for OPENAI_API_KEY in your environment; pick an Anthropic model and it wants ANTHROPIC_API_KEY. The pack reads system environment variables first and never wants keys in the graph - the install script even prints a reminder about it. Since you're pointing real API keys at a pack, it's worth the two minutes to glance at its source before trusting it; ComfyUI's custom-node ecosystem has no code review, and the notorious LLMVISION malware incident is a reminder that "it installs" isn't the same as "it's fine."
Installing
Same pack as every other node here: ComfyUI Manager → search "LiteLLM" (repo Hopping-Mad-Games/ComfyUI_LiteLLM) → Install → Restart, or git clone https://github.com/Hopping-Mad-Games/ComfyUI_LiteLLM into ComfyUI/custom_nodes and pip install -r requirements.txt. That file pulls litellm, boto3, sentence-transformers, and a LightRAG fork, so budget for a chunky first install.
Gotchas
- The dropdown is a fixed enum - you can't type a custom model string into this node. Use
LiteLLMCustomEndpointProvideror the Adv provider when you need to. - There's zero feedback if the model ID is dead; you'll only find out when the completion node errors with something like "model not found." That's LiteLLM erroring, not this node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| name | COMBO | anthropic/claude-3-haiku-20240307 | 16 options: anthropic/claude-3-haiku-20240307, anthropic/claude-3-sonnet-20240229, anthropic/claude-3-opus-20240229, anthropic/claude-3-5-sonnet-20240620, bedrock/anthropic.claude-3-haiku-20240307-v1:0, bedrock/anthropic.claude-3-sonnet-20240229-v1:0, +10 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Litellm model | LITELLM_MODEL | — |