Projects10. AI Model Routing and SettingsExecutive Summary
Executive Summary0 min read

10. AI Model Routing and Settings

Optimizing LLM costs and performance in OmniPost AI. Learn intelligent AI model routing strategies in n8n for cost-effective Agentic AI automation.

AI Model & Node Settings Reference Guide

Version: 1.0.0 | Updated: February 20, 2026
Purpose: Production-grade reference for all AI node configurations, model selection, tool usage, and rate limit management in the Omni-Post workflow.


1. Model Tier Comparison (All Free on ai.google.dev)

ModelQualityRPM (Free)RPD (Free)TPMBest For
gemini-3.1-pro-previewS-Tier~10*~100*250KStrategist, LinkedIn (reasoning-heavy, career-critical)
gemini-3-pro-previewA-Tier~10*~100*250KHashnode (SEO authority content)
gemini-3-flash-previewB+ Tier~15~1000250KTwitter, Blog, Dev.to (Best balance of speed and reasoning)
gemini-2.5-proA-Tier~15*~100-250*250KStrong reasoning, alternative to 3.1 Pro
gemini-2.5-flashB Tier1515001MStandard content generation, bulk processing
gemini-2.5-flash-8bC Tier1515001MFast, simple extraction tasks only

⚠️ CRITICAL Note on "Quota Exceeded... limit: 0" Errors: If you try to use ANY "Pro" model (gemini-3.1-pro, gemini-3-pro, gemini-2.5-pro) and receive a limit: 0 error, it means Google has restricted Pro models from pure free-tier accounts. To unlock them, you MUST link a credit card/Billing Account to your Google Cloud API project. You will not be charged as long as you stay under the free limits, but the billing profile acts as identity verification.

If you do not want to add a credit card: You must exclusively use Flash models. gemini-3-flash-preview or gemini-2.5-flash are the best guaranteed-free options available.

Critical Rate Limit Rules

  • Rate limits are per Google Cloud PROJECT, NOT per API key
  • Multiple API keys under the SAME Google account share the same project quota
  • 5 different Google accounts = 5 separate projects = 5x the limits
  • Mix API keys across nodes using credential rotation for maximum throughput

2. Production Node Configuration

Node: Context - Standardize & Filter

text

Node: Gemini - AI CONTENT STRATEGIST

text

Node: Gemini - Twitter Content Generation

text

Node: Gemini - LinkedIn Content Generation

text

Node: Gemini - Blog Content Generation

text

Node: Gemini - Dev.to Content Generation

text

Node: Gemini - Hashnode Content Generation

text

3. Think Tool Configuration

What the Think Tool Does

The Think Tool allows the AI model to engage in internal chain-of-thought reasoning BEFORE generating the final output. It "talks to itself" - breaking down the task, evaluating options, checking rule compliance, then producing output.

Default Description (Pre-written)

text

SHOULD YOU CUSTOMIZE IT? YES - DEFINITELY

The description field is the ONLY parameter in the Think Tool. It is what tells the AI WHEN and HOW to use the tool. The default is generic. Customizing it per-node DRAMATICALLY improves how the model uses the tool.

Optimized Think Tool Descriptions Per Node

For Strategist Node:

text

For LinkedIn Node:

text

For Hashnode Node:

text

For Blog Node:

text

For Dev.to Node:

text

For Twitter Node:

text

4. SerpAPI Tool Usage

Current State

SerpAPI is connected to the Strategist node. It provides real-time Google search results.

Should Prompts Reference SerpAPI Specifically? NO.

The n8n Google Gemini node automatically exposes connected tools to the model. The model sees the tool's name and description and decides when to call it. You do NOT need to add "use SerpAPI" to your prompts.

However, you CAN improve tool usage by adding a line to your system prompt:

text

This is a SOFT NUDGE, not a hard instruction. The model will use tools when it deems necessary.

Why NOT Add SerpAPI to Generation Nodes

  1. Perplexity/Tavily research is already injected as $json.research
  2. SerpAPI adds latency (each call = Google search API round-trip)
  3. SerpAPI counts against your SerpAPI quota
  4. Duplicate data retrieval = wasted tokens + slower execution

5. Perplexity Replacement: AI Agent + Gemini + Tavily

Why This is BETTER Than Perplexity

FeaturePerplexity (Old)AI Agent + Tavily (New)
CostPaid API ($20/mo or limited free)1,000 free searches/month
ControlBlack box prompt/modelFull control over model + prompt
Iterative SearchSingle queryMulti-step: search -> analyze -> refine -> search again
Source QualityUnknown rankingYou control domain filters, search depth
Content ExtractionSummary onlyFull raw content extraction from URLs
Deep ResearchPerplexity Pro onlyTavily has built-in research resource

Architecture: Drop-In Perplexity Replacement

text

AI Agent Node Configuration

text

AI Agent System Prompt (for Research)

text

Tavily Search Tool Description (for AI Agent)

text

Tavily Node Details

  • Package: @tavily/n8n-nodes-tavily (community node - install via Settings > Community Nodes)
  • Free Tier: 1,000 API credits/month (1 basic search = 1 credit, 1 advanced = 2 credits)
  • Resources: Search, Extract, Crawl, Map, Research
  • Key advantage: The research resource can do deep, multi-source research in a single call

Alternative: Tavily as Standalone Node (Simpler)

If you want a simpler drop-in replacement without the AI Agent:

text

Configure Tavily Search Node:

text

Then use a Code node to format the output to match the $json.research format that your generation nodes expect.


6. Prompt Modifications for Tool Usage

Do Prompts Need Changes for Tools? MINIMAL.

The n8n Gemini node handles tool integration automatically. When you connect a tool:

  1. The model receives the tool's name + description
  2. The model decides when to call the tool
  3. Tool results are injected back into the conversation
  4. The model generates the final output using tool results

What TO Add (Optional, One Line Per Node)

For nodes with Think Tool connected, add this to the END of your system prompt:

text

This encourages the model to use Think AFTER drafting but BEFORE outputting.

What NOT To Do

  • Do NOT add "use SerpAPI to search" - the model will use it when needed
  • Do NOT add "call the think tool" explicitly - it's automatic
  • Do NOT reference tool names in the user prompt - only in system prompt
  • Do NOT restructure your prompts around tools - they are additive

7. Rate Limit Optimization Strategy

Daily Budget Calculation (5 API Keys from 5 Google Accounts)

text

Credential Rotation Setup in n8n

  1. Create 5 separate Google Gemini API credentials in n8n (one per friend's key)
  2. Name them: Gemini-Key-1, Gemini-Key-2, etc.
  3. Assign each node a specific credential as documented in Section 2
  4. This distributes load across 5 separate Google Cloud projects

Version History

VerDateChanges
1.1.02026-02-20Added Blog, Dev.to, Twitter Think Tool descriptions. Updated node configs to reflect Think added to all content nodes. Added prompt nudge lines.
1.0.02026-02-20Initial version - model tiers, Think tool customization, 5-key strategy, Tavily replacement architecture