IntelliPlan routes every AI feature — the Plani tutor, the Command Center briefing, image understanding, voice transcription, and read-aloud — through a single module (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/UAnirudh/IntelliPlan/llms.txt
Use this file to discover all available pages before exploring further.
ai_provider.py) that implements a cascading provider chain. Gemini is the primary provider; when it exhausts its quota or returns an error, the chain falls automatically to Groq. Paid users have Claude inserted at the front of the chain. This architecture means a quota event or a provider outage is handled silently in most cases, without any deploy or manual intervention.
Provider Chain
IntelliPlan defines three request tiers, each with its own ordered fallback chain:- Standard
- Fast
- Vision
Used for the Plani tutor, most chat responses, and complex reasoning tasks.
| Priority | Provider | Model |
|---|---|---|
| 1 | Gemini | gemini-2.5-flash |
| 2 | Gemini | gemini-3.5-flash-lite |
| 3 | Groq | openai/gpt-oss-120b |
| 4 | Groq | openai/gpt-oss-20b |
Gemini’s free-tier quota is counted per model — a 429 on
gemini-2.5-flash does not affect gemini-3.5-flash-lite’s allowance. The intra-Google step is what kept the tutor answering after the 20-request-a-day cap was spent; before it, one exhausted model took every AI feature in the product down with it.| Tier | Paid-First Model |
|---|---|
| Standard | claude-sonnet-5 |
| Fast | claude-haiku-4-5-20251001 |
| Vision | claude-sonnet-5 |
ANTHROPIC_API_KEY is set and the request comes from a paid account. An unset key simply drops Claude from the chain entirely — it does not cause an error.
Setting Up Google Gemini
Gemini is IntelliPlan’s primary provider for all AI features.Get an API key
Visit aistudio.google.com/apikey and create a new API key. No billing account is required for the free tier.
Setting Up Groq (Strongly Recommended)
Groq serves as the fallback for all three tiers and is the only provider for speech transcription (Whisper).Create a free account
Go to console.groq.com and sign up. No credit card is required.
Setting Up Anthropic Claude (Paid Plan)
Claude is the paid-plan provider. It is never called on free or guest accounts, and an unsetANTHROPIC_API_KEY simply removes it from the chain.
Get an Anthropic API key
Create an account at console.anthropic.com and generate an API key under API Keys.
Read-Aloud Voice (Fish Audio)
Fish Audio powers Plani’s read-aloud feature. The four voices available to students are AI-designed rather than cloned from real people.Get a Fish Audio API key
Sign up at fish.audio and navigate to API Keys to generate a key.
Without
FISH_AUDIO_KEY, the read-aloud button is hidden in the tutor sidebar. Students will not see an error — the feature simply does not appear.Media Generation (Pollinations)
Pollinations provides AI image, video, and 3D generation features..env
AI Kill Switch
To disable every AI feature site-wide without a deploy — for example during a cost emergency or a provider outage — set the kill switch variable:.env
0 to re-enable. The change takes effect on the next request after the environment reloads; no restart is needed on most PaaS platforms that support live variable updates.
Rate Limit Tiers
The AI firewall (ai_firewall.py) enforces per-account request and token limits. Counters live in the database so they survive deploys and are shared across multiple instances. Three tiers are supported:
Guest
4 req/hour · 8 req/day · 12,000 tokens/day · 1,200 max output tokens
Free
15 req/hour · 40 req/day · 60,000 tokens/day · 2,600 max output tokens
Paid
120 req/hour · 600 req/day · 1,500,000 tokens/day · 4,000 max output tokens
.env to tune for your deployment:
.env
Local AI with Ollama
For local development or privacy-sensitive deployments, IntelliPlan can route all AI calls to a local Ollama instance instead of Groq. The same provider chain applies — Ollama replaces Groq as the fallback, or becomes the primary if Gemini is also unset.Point IntelliPlan at the local daemon
.env
OLLAMA_BASE_URL is set, chatbot_api._llm_chat() routes every call — the tutor, Plani, input moderation, output moderation — to Ollama’s OpenAI-compatible /v1/chat/completions endpoint. No code change is required.