Templates / Route LLM tasks to the cheapest capable Claude models with Anthropic

Route LLM tasks to the cheapest capable Claude models with Anthropic

Ready for 3.0

by Oneclick AI Squad ✓ · 18 views · created 2026-10-01 · Engineering, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 21 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). It uses only n8n's built-in nodes.

How it runs

Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).

  1. Normalize Task Input (Code): runs custom JavaScript code
  2. If: checks a condition and branches into true / false
  3. Set Router Configuration (Edit Fields (Set)): sets 9 fields: classifierModel, judgeModel, premiumBaselineModel…
  4. Respond with Validation Error (Respond to Webhook): sends the response back to the webhook caller
  5. Build Classifier Request (Code): runs custom JavaScript code
  6. Classify Task (HTTP Request): calls an HTTP API (POST)
  7. Select Cheapest Capable Model (Code): runs custom JavaScript code
  8. Build Execution Request (Code): runs custom JavaScript code
  9. Execute Model (HTTP Request): calls an HTTP API (POST)
  10. Record Attempt (Code): runs custom JavaScript code

…plus 9 more steps. See the full node list below.

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

Quick Overview This workflow receives an LLM task via webhook (or manual run), uses Anthropic Claude to classify its needs, routes the request to the cheapest capable Claude model, and optionally escalates to higher tiers based on a quality score, returning…

Excerpt from Oneclick AI Squad's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.