Skip to main content

Overview

Gemini is the recommended AI provider for VibeLearn. The free tier provides 1500 requests/day — sufficient for daily coding sessions. VibeLearn uses Gemini for two LLM calls per session:
  1. Concept extraction — identifies what you learned (ConceptExtractor)
  2. Quiz generation — creates questions per concept (QuizGenerator)

Setup

1. Get an API Key

Go to aistudio.google.com/apikey and create a free API key.

2. Add to Settings

~/.vibelearn/settings.json
{
  "VIBELEARN_GEMINI_API_KEY": "AIza..."
}
That’s it. VibeLearn checks for Gemini first in the provider priority order (Gemini → OpenRouter → Anthropic).

Available Models

ModelSpeedQualityNotes
gemini-2.5-flash-liteFastGoodDefault — best for daily use
gemini-2.5-flashMediumBetterMore thorough concept extraction
gemini-2.0-flash-expFastGoodExperimental, may change
Override the default:
{
  "VIBELEARN_GEMINI_API_KEY": "AIza...",
  "VIBELEARN_GEMINI_MODEL": "gemini-2.5-flash"
}

Rate Limiting

The free tier limit is 1500 requests/day. VibeLearn uses 2 requests per session (concept extraction + quiz generation), giving you up to 750 sessions/day on the free tier. Rate limiting is enabled by default:
{
  "VIBELEARN_GEMINI_RATE_LIMITING_ENABLED": true
}
If you hit the limit, VibeLearn falls back to OpenRouter (if configured) or Anthropic API.

Troubleshooting

API key not valid — Check the key is correctly copied from AI Studio. Keys start with AIza. RESOURCE_EXHAUSTED — Hit the daily quota. Resets at midnight Pacific time. Switch to OpenRouter as a fallback:
{
  "VIBELEARN_GEMINI_API_KEY": "AIza...",
  "VIBELEARN_OPENROUTER_API_KEY": "sk-or-..."
}
No quiz questions after session — Check worker logs:
tail -f ~/.vibelearn/logs/vibelearn-$(date +%Y-%m-%d).log | grep -i gemini