Troubleshooting¶
FAQ and solving common problems.
Common Problems¶
Action Shows --help Instead of Running¶
Symptom: In CI job logs you see:
Usage: ai-review [OPTIONS]
...
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --provider -p [github|gitlab] CI provider... โ
Cause: Using an old Docker image version (before v1.0.0a2).
Solution:
Update to the latest version:
If the problem persists, explicitly specify version:
Review Not Appearing¶
Symptom: CI job passed successfully, but there are no comments.
Check:
- CI job logs โ are there errors?
- API key โ is
AI_REVIEWER_GOOGLE_API_KEYvalid? - Token โ are there write permissions?
- github_token โ is it explicitly passed?
"Configuration Error: AI_REVIEWER_GOOGLE_API_KEY is too short"¶
Cause: Key is not set or is incorrect.
Solution:
- Check that the secret is added in repo settings
- Check the name (case-sensitive)
- Check that the key is valid at Google AI Studio
"401 Unauthorized" / "403 Forbidden"¶
Cause: Invalid or insufficient token.
"404 Not Found"¶
Cause: PR/MR or repository not found.
Solution:
- Check that PR/MR exists
- Check repository name
- Check that token has access to the repository
"429 Too Many Requests" (Rate Limit)¶
Cause: API limit exceeded.
Gemini Free Tier limits:
| Limit | Value |
|---|---|
| Requests per minute | 15 |
| Tokens per day | 1,000,000 |
| Requests per day | 1,500 |
Solution:
- AI Code Reviewer automatically retries with exponential backoff
- If the problem persists โ wait or switch to paid tier
- Add
concurrencyto cancel duplicates:
"500 Internal Server Error"¶
Cause: Problem on the API side (Google, GitHub, GitLab).
Solution:
- AI Code Reviewer automatically retries (up to 5 attempts)
- Check service status:
- Google Cloud Status
- GitHub Status
- GitLab Status
Review Too Slow¶
Cause: Large PR or slow network.
Solution:
- Reduce PR size
- Configure limits:
- Set timeout:
Fork PRs Not Getting Review¶
Cause: Secrets are not available for fork PRs (security).
Solution:
This is expected behavior. For fork PRs:
- Maintainer can run review manually
- Or use
pull_request_target(be careful with security!)
Wrong Response Language¶
Cause: Incorrect language configuration.
Solution:
-
For fixed language:
-
For adaptive language โ make sure PR description is written in the desired language
FAQ¶
Can I use it without an API key?¶
No. A Google Gemini API key is required. Free tier is sufficient for most projects.
Is Bitbucket supported?¶
No (not yet). Only GitHub and GitLab.
Can I use other LLMs (ChatGPT, Claude)?¶
No (in MVP). Support for other LLMs is planned for future versions.
Is it safe to send code to Google API?¶
Important to know:
- Code is sent to Google Gemini API for analysis
- Review the Google AI Terms
- For sensitive projects, consider self-hosted solutions (in future versions)
How much does it cost?¶
Gemini Flash pricing:
| Metric | Cost |
|---|---|
| Input tokens | $0.075 / 1M |
| Output tokens | $0.30 / 1M |
Approximately: ~1000 reviews = ~$1
Free tier: ~100 reviews/day for free.
How to disable review for certain files?¶
There's no .ai-reviewerignore yet. Planned for future versions.
Workaround: filter in workflow:
Can I run it locally?¶
Yes:
pip install ai-reviewbot
export AI_REVIEWER_GOOGLE_API_KEY=your_key
export AI_REVIEWER_GITHUB_TOKEN=your_token
ai-review --provider github --repo owner/repo --pr 123
Debugging¶
Enable Verbose Logs¶
Check Configuration¶
# Check that variables are set
echo $AI_REVIEWER_GOOGLE_API_KEY | head -c 10
echo $GITHUB_TOKEN | head -c 10
Test API Call¶
# Test Gemini API
curl -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=$AI_REVIEWER_GOOGLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents":[{"parts":[{"text":"Hello"}]}]}'
Get Help¶
If the problem is not resolved:
GitHub Issues โ for bugs
GitHub Discussions โ for questions
When creating an issue, include:
- AI Code Reviewer version (
ai-review --version) - CI provider (GitHub/GitLab)
- Logs (with secrets hidden!)
- Steps to reproduce