Automated AI-powered code review for your pull requests. Works with any OpenAI-compatible API β just provide a base_url and API key. Also supports Anthropic Claude.
πΈ Screenshot: ReviewX posting inline comments on a PR
- π GitHub Action β Auto-reviews PRs on open/sync
- π€ Universal Provider Support β Any OpenAI-compatible API (MiMo, OpenAI, DeepSeek, Qwen, Kimi, etc.) + Anthropic Claude
- π Inline Comments β Reviews specific lines in your diff
- π Review Scoring β 0-100 score with severity breakdown
- π Smart Detection β Bugs, security, performance, style
- βοΈ Configurable β Exclude patterns, severity filters, custom rules
- π₯οΈ CLI Mode β Review files and diffs from terminal
- π Webhook Server β Standalone mode with GitHub webhooks
- π Dashboard β Flask web UI for review history & stats
-
Add secrets to your repository:
MIMO_API_KEYβ Your MiMo/OpenAI API key
-
Create
.github/workflows/review.yml:
name: AI Code Review
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: peppa486/reviewx@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ai-provider: openai
openai-api-key: ${{ secrets.MIMO_API_KEY }}
openai-base-url: https://token-plan-sgp.xiaomimimo.com/v1
openai-model: mimo-v2.5-pro- Open a PR and watch the magic! β¨
# Install
pip install -r requirements.txt
# Review a PR
python cli.py review-pr --repo owner/repo --pr 42 --post-comments
# Review a single file
python cli.py review-file src/main.py
# Review a git diff
git diff HEAD~1 | python cli.py review-diff
# Start webhook server
python cli.py serve# Copy and edit config
cp config.yaml.example config.yaml
# Start server
python bot.pyConfigure a GitHub webhook pointing to https://your-server:8080/webhook.
| Variable | Description | Default |
|---|---|---|
AI_REVIEW_PROVIDER |
openai or anthropic |
openai |
OPENAI_API_KEY |
API key for OpenAI-compatible providers | β |
OPENAI_BASE_URL |
API base URL | https://token-plan-sgp.xiaomimimo.com/v1 |
OPENAI_MODEL |
Model name | mimo-v2.5-pro |
ANTHROPIC_API_KEY |
Anthropic API key | β |
GITHUB_TOKEN |
GitHub personal access token | β |
See config.yaml.example for full options including:
- Severity level filters
- File exclusion patterns
- Review categories
- Server settings
ReviewX works with any OpenAI-compatible API β just provide a base_url and API key. No need for provider-specific code.
Any service that implements the OpenAI chat completions API works out of the box:
- Xiaomi MiMo β MiMo-V2.5 Pro (
https://token-plan-sgp.xiaomimimo.com/v1) - OpenAI β GPT-5.5 (
https://api.openai.com/v1) - DeepSeek β DeepSeek V4 Pro, DeepSeek V4 Flash (
https://api.deepseek.com) - Moonshot / Kimi β Kimi K2.6 (
https://api.moonshot.cn/v1) - Zhipu GLM β GLM-5.1 (
https://open.bigmodel.cn/api/paas/v4) - Alibaba Qwen β Qwen 3.6 Max (
https://dashscope.aliyuncs.com/compatible-mode/v1) - ByteDance Doubao β Doubao Seed 2.0 Pro (
https://ark.cn-beijing.volces.com/api/v3) - xAI β Grok 4.3 (
https://api.x.ai/v1) - MiniMax β M2.7 (
https://api.minimaxi.com/v1) - Mistral β Medium 3.5 (
https://api.mistral.ai/v1) - Any self-hosted β Ollama, vLLM, LiteLLM, etc.
Claude uses the Anthropic API format (not OpenAI-compatible), so it needs a separate provider config:
- Claude Opus 4.7 (
claude-opus-4-7) - Set
ai-provider: anthropicand provideANTHROPIC_API_KEY
The optional Flask dashboard shows review history and statistics:
python dashboard/app.pyVisit http://localhost:5000 to see:
- Total reviews and average scores
- Issue severity breakdown
- Recent review history
reviewx/
βββ action.yml # GitHub Action definition
βββ bot.py # Webhook server entry point
βββ cli.py # CLI entry point
βββ config.yaml.example # Configuration template
βββ src/
β βββ reviewer.py # Core review orchestration
β βββ providers/
β β βββ base.py # Provider interface & prompts
β β βββ openai_provider.py
β β βββ anthropic_provider.py
β βββ github_client.py # GitHub API client
β βββ diff_parser.py # Git diff parser
β βββ comment_formatter.py
β βββ config.py # Configuration management
βββ dashboard/ # Flask web dashboard
βββ tests/ # Test suite
βββ .github/workflows/ # Example workflow
pip install pytest
pytest tests/ -vMIT License β see LICENSE for details.
Built with β€οΈ by peppa486
Powered by Xiaomi MiMo and other leading AI models.