Resources · n8n integration

n8n Model Selector nodeConfigure Model Selector in n8n.

One agent, several language models, and a rule that decides which one answers. The n8n Model Selector node is a sub-node, a helper block that plugs into a bigger node instead of running on its own. It carries 2 parameters and accepts up to 10 chat models on its inputs.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n Model Selector node actually do?

It picks one language model out of several at the moment a workflow runs. You connect two or more chat models to its inputs, you write rules on the data flowing through, and the node hands the matching model to whatever root node it feeds. A root node is the node that owns the execution, such as AI Agent; the Model Selector sits beside it as a sub-node and never runs alone.

First scenario, routing by how hard the request is. A support automation receives tickets of very different weight. A rule reads a field from the incoming item, something like {{ $json.category }}, and sends short password resets to the first model input while contract questions go to the second. The rule set lives in one node, so changing the split later means editing a condition, not rewiring the workflow.

Second scenario, a fallback path. The node evaluates its rules in order and stops at the first match, so the last rule can act as a catch-all that points at a model you keep for anything the earlier conditions did not describe. That ordering is the whole behavior worth remembering: two rules that both match never both apply.

Third scenario, matching the model to the task inside one agent. A workflow that summarizes long documents and also classifies incoming mail does not need two separate branches. One AI Agent with a Model Selector in front of it covers both, with a condition on the task field choosing between the model you connected for classification and the one you connected for long text.

When to skip this node: if the workflow only ever calls one model, connect that chat model straight to the root node. The Model Selector earns its place when the choice depends on the data. It also has no main input, so it cannot sit in the middle of a chain of regular nodes, and it does nothing to the prompt itself.

The models you connect stay ordinary sub-nodes, with their own credentials and their own providers, whether that is OpenAI, Anthropic or Google Gemini. If you are still weighing the platform itself before building any of this, the n8n review covers that ground.

Connections

Where does the Model Selector plug in?

n8n splits its AI nodes in two: a root node receives the workflow items and does the work, while sub-nodes attach to its ports, one kind of sub-node per port. Model Selector is a sub-node, and it occupies the port a chat model would normally take.

Output (what it plugs into)

  • Chat Modelai_languageModel
01Chat ModelThis is the port the node connects to on the root node above it. The root node asks for a language model and receives the Model Selector instead, which resolves to one of its own models at execution time.

This is the port the node connects to on the root node above it. The root node asks for a language model and receives the Model Selector instead, which resolves to one of its own models at execution time.

Key parameters

  • Required: the root node above it asks for one chat model to run at all, and refuses to execute while that port sits empty.
  • AI Agent and Basic LLM Chain: the two most common places to attach it, one for tool-using agents, one for a single prompt and answer.
  • Question and Answer Chain and Summarization Chain: both accept it too, which is how a document pipeline switches models per run.
Use cases
an agent that keeps one model for routine questions and reaches for another when a rule spots a heavier request.
Parameters

Which parameters does the node expose?

The Model Selector node has 2 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.

01

Number of Inputs

numberInputs

What you see in n8n

Notes & use cases

Sets how many model connections the node shows on its left side. Raise it and new input sockets appear, ready for another chat model; lower it and you give up the sockets you are not using.

Key parameters

  • Number of Inputs: a dropdown running from 2 to 10, the number of data inputs you want to merge, and the node waits for all connected inputs to be executed.
Use cases
start at 2 for a primary model and a fallback, then move up as you add a model per task. Set it before writing rules, since each rule points at an input by its position.
02

Rules

rules

What you see in n8n

Notes & use cases

Holds the logic that maps workflow data to a specific model. Each entry pairs a condition with one of the connected inputs, and n8n reads them from the top, stopping at the first one that matches.

Key parameters

  • Rules: the collection itself, filled one entry at a time with Add Rule.
  • Model: required inside a rule, chosen from the list of model inputs, which is why Number of Inputs comes first.
  • Conditions: the conditions that must be met to select this model, built with Add Condition on fields such as {{ $json.category }}.
Use cases
put the narrow conditions at the top and the broad one last, so the final rule catches everything else.
Need help

Need help automating Model Selector with n8n?

A person reads every message.

FAQ

Questions people ask about this node

01Is the n8n Model Selector node included with n8n?
Yes. It belongs to the n8n AI package, @n8n/n8n-nodes-langchain, which ships with n8n itself. There is nothing to install, and it works the same on n8n Cloud, the hosted offer run by n8n, and on an instance you host yourself with Docker or npm under the Community Edition and its Sustainable Use license. A workflow behaves identically in both places. n8n charges nothing extra for the node. What does cost money sits one step away: the provider behind each chat model you connect bills its own API calls under its own terms, exactly as it would if that model were wired straight into the root node without any selector in between.
02What do you need to set up before it works?
Nothing on this node. Model Selector has no credential and no Authentication selector, because it never talks to a provider itself. The credential lives on each chat model sub-node you attach to its inputs, and each of those keeps its own key. So the setup is pure wiring: decide how many inputs you want, connect a model to each one, and attach the selector to the root node through its Chat Model port. The rules then read fields from the item flowing through the root node, with expressions written as {{ $json.field }}. A field marked required blocks execution when it is empty, which is worth remembering for the Model field inside a rule.
03What are the limits of the Model Selector node?
Three worth knowing. The node tops out at 10 model inputs, since that is where the Number of Inputs dropdown ends. Rule evaluation is sequential and stops at the first match, so a rule placed above a more specific one hides it, and there is no scoring or priority beyond the order you put them in. And it has no main input of its own: it is a sub-node, it cannot sit between two regular nodes, and it does nothing until a root node asks it for a model. The page describes version 1 of the node, the maximum in the catalog; an older workflow may show fewer options.
04What do you have to connect at minimum to use it?
Two chat models and one root node. Below the selector, at least two model sub-nodes on the inputs, otherwise there is no choice to make and the model belongs directly on the root node. Above it, a root node that accepts a Chat Model on its port. Basic LLM Chain is the easiest place to start, because a single prompt and a single answer make it obvious which model actually ran. Once the routing behaves, move the same setup under an AI Agent, or under an AI Agent Tool when the agent is itself called by another agent. Then add rules one at a time and test each condition.
05n8n or Make for this kind of model routing?
It comes down to hosting and cost shape rather than features. n8n runs on your own server with Docker or npm, or on n8n Cloud, so the data your rules read can stay inside your own infrastructure. Make is hosted only, with no self-hosting option, and it bills per operation, which matters when a workflow fires often. n8n also keeps this particular pattern in one node: the sub-node model means the routing logic sits beside the agent rather than being rebuilt as a branch. If the team prefers a visual canvas above all else and runs low volume, the difference narrows a lot.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.