n8n 2.20.7 self-hosted AI Agent: no models available (OpenAI / Anthropic / Gemini)

Hi everyone,

I’m running n8n self-hosted on version 2.20.7 and I’ve run into an issue with the AI Agent node.

The problem is that the model selection (“brain”) is not working properly. I expect to be able to choose between OpenAI, Anthropic, or Gemini models, but in my instance the model dropdown shows no available options, so I can’t select anything.

Despite this, the AI Agent node doesn’t seem to detect or list any models at all.

Has anyone else experienced this in a self-hosted setup?
Is there something I might be missing in configuration, or is this a known issue in this version?

Any help or direction would be appreciated.

Have you tried downgrading to 2.17.x ?

The AI Agent node doesn’t auto-discover models — the “brain” (Chat Model) needs to be connected as a sub-node. Here’s what to do:

  1. Add an OpenAI Chat Model node (or Anthropic/Gemini equivalent) to your canvas
  2. Connect it to the Chat Model input port on the AI Agent node (the small input on the bottom of the Agent node)
  3. Configure the credentials on that sub-node

The “model” dropdown inside the Agent node parameters only shows options after a Chat Model sub-node is wired in. Without a connected sub-node, the dropdown stays empty.

This is a design pattern in n8n’s AI nodes — the Agent node itself is model-agnostic; you attach the model provider as a separate connected node. Downgrading versions won’t fix this since it’s the expected workflow.