How to Build a Zero‑Downtime Multi‑Model AI Router in n8n (Claude 3.5 + GPT‑4o + DeepSeek Failover)
Description and use
Recipe for a zero‑downtime multi‑model AI router in n8n, cascading through Claude 3.5, GPT‑4o, and DeepSeek V3, normalizing output and alerting via Telegram on fatal failures.
Problem
Production AI workflows fail when a single LLM provider returns 429/5xx or times out, causing silent data loss and unalerted teams.
Outcome
The recipe enables zero‑downtime AI routing in n8n, reducing silent failures, controlling costs by using cheaper models for simple tasks, and providing real‑time alerts when all providers fail.
Workflow
- Configure Claude 3.5 node to continue on fail and set max tries to 1.
- Add an If/Switch node to route on error to GPT‑4o or to output parser.
- Repeat the pattern between GPT‑4o and DeepSeek V3.
- Insert a JavaScript Code node after each branch to normalize JSON output.
- Add a final alert node (Telegram/Slack) for fatal errors.
Evidence
If you run production AI workflows, you have felt this specific pain: ... Anthropic drops a 503 Service Unavailable or your tier hits a sudden 429 Too Many Requests.
In this guide, I will show you how to build a resilient, multi-tier AI failover router directly inside self-hosted or cloud n8n.
Open your Claude 3.5 Sonnet node settings. Go to Settings → toggle Continue On Fail to Using Error Output (or Always Output Data).
- Record date: 2026-10-02T02:40:42.028Z