Skip to main content

Overview

OpenRouter gives VibeLearn access to 100+ models through a single API. Useful as a fallback when Gemini hits rate limits, or as your primary provider if you prefer a different model for concept extraction.

Setup

1. Get an API Key

Sign up at openrouter.ai/keys.

2. Add to Settings

~/.vibelearn/settings.json
{
  "VIBELEARN_OPENROUTER_API_KEY": "sk-or-..."
}

Free Models

ModelContextNotes
google/gemini-2.0-flash-exp:free1M tokensRecommended free option
xiaomi/mimo-v2-flash:free32K tokensFast, good for short sessions
Set a specific model:
{
  "VIBELEARN_OPENROUTER_API_KEY": "sk-or-...",
  "VIBELEARN_OPENROUTER_MODEL": "google/gemini-2.0-flash-exp:free"
}

Provider Priority

If both Gemini and OpenRouter are configured, Gemini is tried first. To use OpenRouter exclusively, set only VIBELEARN_OPENROUTER_API_KEY (without a Gemini key).

Troubleshooting

No output / empty response — Free models may be slow or at capacity. Try a different free model or use a paid model. 402 Payment Required — Model requires credits. Switch to a :free model or add OpenRouter credits. Check which provider was used:
grep "provider" ~/.vibelearn/logs/vibelearn-$(date +%Y-%m-%d).log | tail -5