Intelligent Cross-Tool AI Routing
Tessera doesn't just use one AI tool — it routes each code generation task to the best tool and model for the job. This multi-AI approach produces better results than any single tool alone.
How It Works
| Complexity | Default | Fallback chain |
|---|---|---|
| Simple | Claude Haiku | Gemini Flash → Codex |
| Medium | Claude Sonnet | Gemini Pro → Claude Haiku → Gemini Flash |
| Complex | Claude Opus | Gemini Pro → Claude Sonnet → Gemini Flash |
A single project build might use Claude Opus for database architecture, Gemini Flash for SETUP.md, and Claude Sonnet for tests — each task routed to the best model automatically.
Plan-Aware Routing
During setup, Tessera asks about your AI subscription plans to optimize routing and cost:
What AI plans do you have?
Claude plan: [Max (unlimited) / Pro / Free]
Codex plan: [Plus (ChatGPT Plus) / Free]
Gemini plan: [Pro (Google One AI Premium) / Free]| Plan tier | Examples | Routing behavior |
|---|---|---|
| Unlimited | Claude Max | Preferred for everything |
| Generous | Claude Pro, Codex Plus | Preferred but balanced |
| Limited | Free tiers | Fallback only |
With Claude Max, even simple tasks use Claude (Haiku) — no reason to route elsewhere when it's free.
Rate Limit Handling
If a tool hits rate limits mid-build, Tessera handles it automatically:
- Detects the error (13 different patterns recognized)
- Marks the tool with a 2-minute cooldown
- Switches to the next tool in the fallback chain
- Shows you what happened:
claude rate-limited (cooldown: 120s). Trying next tool...
No manual intervention needed. The build keeps going.
AI Peer Review
After generating the frontend theme and admin panel, a different AI reviews the output for quality assurance:
✓ Designing frontend theme (claude opus)
⏳ Peer review: frontend theme
Reviewer: gemini (gemini-2.0-flash)
Review found 2 issue(s) — applying fixes...
✓ Review fixes applied (2 issues)- Multiple tools available: different tool reviews (Claude generates, Gemini reviews)
- Single tool available: lighter model reviews (Opus generates, Haiku reviews)
- Cost: 1 cheap AI call per reviewed step
This built-in peer review catches issues that a single AI pass would miss — similar to human code review, but instant.
Check Your Routing
Run tessera tools to see which AI tools are installed and how tasks will be routed:
tessera toolsAvailable AI tools:
✓ claude: 2.1.75
✓ gemini: 0.32.1
✓ codex: 0.98.0
AI routing:
plans: claude=max (unlimited), codex=plus (generous), gemini=free (limited)
simple: claude (claude-haiku-4-5-20251001)
medium: claude (claude-sonnet-4-20250514)
complex: claude (claude-opus-4-20250514)This is useful after installing a new AI tool, or to verify your plan configuration is correct.
Usage Summary
At the end of each build, Tessera shows how many calls each tool handled:
AI usage: claude: 5 calls (2 opus, 2 sonnet, 1 haiku) | gemini: 2 calls (2 flash)Environment Variables
Most users don't need these — the installer asks interactively. For CI/CD or automation:
TESSERA_CLAUDE_PLAN=max # max | pro | free
TESSERA_CODEX_PLAN=plus # plus | free
TESSERA_GEMINI_PLAN=free # pro | free
TESSERA_TOOL_PREFERENCE=gemini,claude,codex # custom order
TESSERA_TOOL_EXCLUDE=codex # never use this toolRelated
- Creating a Project — see AI routing in action during a full build
- Resume & Recovery — what happens when a routed task fails