Why use AI analysis?
While static analysis is fast and catches many common issues, AI-powered analysis can:- Detect complex anti-patterns that require context understanding
- Provide natural language explanations of issues
- Generate actionable recommendations for code improvements
- Understand business logic and suggest better implementations
- Identify architectural issues across multiple files
Enable AI analysis
Add the--ai flag to any Vibrant command:
Available providers
OpenRouter
Free models available. Best for getting started without costs.
Google Gemini
Generous free tier. Fast and accurate for code analysis.
OpenAI
Industry-leading models. Paid service with excellent quality.
Claude
Anthropic’s AI. Great for complex reasoning. Paid service.
Ollama
Run models locally. Completely free and private.
Provider comparison
| Provider | Cost | Speed | Quality | Best for |
|---|---|---|---|---|
| OpenRouter | Free tier | Fast | Good | Getting started, trying different models |
| Gemini | Free tier | Very fast | Excellent | Daily development, CI/CD |
| OpenAI | Paid | Fast | Excellent | Production use, critical analysis |
| Claude | Paid | Medium | Excellent | Complex codebases, deep reasoning |
| Ollama | Free | Medium | Good | Privacy-sensitive projects, offline use |
Choose a provider
Free options (recommended for getting started)
OpenRouter
Get instant access to multiple free models. Setup guide
Gemini
Google’s generous free tier with fast performance. Setup guide
Ollama
Run models locally on your machine. Setup guide
Paid options (for production use)
OpenAI
Industry standard with excellent quality. Setup guide
Claude
Great for complex analysis and reasoning. Setup guide
Specify a provider
Use the--provider flag to choose a specific provider:
If you don’t specify a provider, Vibrant will automatically detect and use the first available provider based on your environment variables.
Configuration
You can set a default provider in yourvibrant.config.js:
vibrant.config.js
vibrant . --ai without specifying --provider each time.
Token optimization
Vibrant includes a Smart Summarizer that reduces token usage by 50-60% while maintaining detection accuracy:- Lower API costs for paid providers
- Faster analysis times
- More files can be analyzed in a single request
- Better free tier utilization
Next steps
Set up OpenRouter
Get started with free models in minutes
Compare providers
See detailed pricing and model information for each provider