11# PR Pilot Review
22
3- > ** Intelligent Multi-Model Consensus AI PR Reviewer** — Automated code reviews with consensus from multiple Gemini AI models .
3+ > ** Intelligent Multi-Model Consensus AI PR Reviewer** — Automated code reviews with consensus from configurable LLM providers like Gemini and Groq .
44
55[ ![ Build Status] ( https://github.com/bishalprasad321/prpilot-review/actions/workflows/ci.yml/badge.svg )] ( https://github.com/bishalprasad321/prpilot-review/actions )
66[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
77
88## Overview
99
10- PR Pilot Review is a GitHub Action that performs intelligent, consensus-based code reviews on pull requests using Google's Gemini AI models . Unlike single-model reviewers, it runs ** 3 independent AI reviewers in parallel** and uses a ** judge model to reach consensus** , ensuring more thorough and balanced code quality feedback.
10+ PR Pilot Review is a GitHub Action that performs intelligent, consensus-based code reviews on pull requests using configurable LLM providers such as Gemini or Groq . Unlike single-model reviewers, it runs ** 3 independent AI reviewers in parallel** and uses a ** judge model to reach consensus** , ensuring more thorough and balanced code quality feedback.
1111
1212### Key Features
1313
@@ -22,20 +22,28 @@ PR Pilot Review is a GitHub Action that performs intelligent, consensus-based co
2222
2323## Quick Start
2424
25- ### 1. Get a Gemini API Key
25+ ### 1. Choose your LLM provider
2626
27- 1 . Visit [ Google AI Studio] ( https://makersuite.google.com/app/apikey )
28- 2 . Click "Create API Key"
29- 3 . Copy the key
27+ This action supports multiple providers today, including ` gemini ` and ` groq ` .
3028
31- ### 2. Add to GitHub Secrets
29+ ### 2. Add the API key to GitHub Secrets
3230
3331Go to your repository:
3432
3533- ** Settings** → ** Secrets and variables** → ** Actions**
36- - Add secret: ` GEMINI_API_KEY ` (paste your key)
34+ - Add a provider-specific secret, e.g. ` GROQ_API_KEY `
3735
38- ### 3. Use the Action
36+ ### 3. Optional base URL for Groq OpenAI-compatible API
37+
38+ If you are using Groq's OpenAI-compatible models, set ` llm_provider_url ` to:
39+
40+ ``` yaml
41+ llm_provider_url : https://api.groq.com/openai/v1
42+ ` ` `
43+
44+ This will route requests to ` https://api.groq.com/openai/v1/chat/completions` for chat-based model inference.
45+
46+ # ## 4. Use the Action
3947
4048Create `.github/workflows/ai-review.yml` :
4149
6169 - uses: bishalprasad321/prpilot-review@v1
6270 with:
6371 github_token: ${{ secrets.GITHUB_TOKEN }}
64- gemini_api_key : ${{ secrets.GEMINI_API_KEY }}
72+ llm_provider: groq
73+ llm_api_key: ${{ secrets.GROQ_API_KEY }}
74+ llm_provider_url: https://api.groq.com/openai/v1
6575 # Optional: customize model configuration
6676 # reviewer_models: "gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.5-pro"
6777 # judge_model: "gemini-2.5-pro"
@@ -79,7 +89,9 @@ All inputs are optional (sensible defaults provided):
7989with:
8090 # Required
8191 github_token: ${{ secrets.GITHUB_TOKEN }}
82- gemini_api_key : ${{ secrets.GEMINI_API_KEY }}
92+ llm_provider: groq
93+ llm_api_key: ${{ secrets.GROQ_API_KEY }}
94+ llm_provider_url: https://api.groq.com/openai/v1
8395
8496 # Optional: Model Configuration
8597 reviewer_models: "gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.5-pro" # 3 models
@@ -93,47 +105,51 @@ with:
93105 debug: "false" # Verbose logging
94106` ` `
95107
96- Use stable Gemini ` v1beta` model codes. If you still pass legacy aliases such as `gemini -3.0-flash` or `gemini -3.1-pro`, the action will try to remap them to supported 2.x models before calling the API .
108+ Use stable provider-specific model IDs. For Gemini, use `v1beta` model codes. For Groq, use models like `llama -3.1-8b-instant`, `openai/gpt-oss-20b`, or `llama -3.3-70b-versatile` (check [Groq console](https://console.groq.com/keys) for available models) .
97109
98- # ## Model Presets
99-
100- Choose models based on your needs :
101-
102- # ### Default (Recommended) ✅
110+ # ## Groq Example
103111
104112` ` ` yaml
105- reviewer_models: "gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.5-pro"
106- judge_model: "gemini-2.5-pro"
113+ with:
114+ github_token: ${{ secrets.GITHUB_TOKEN }}
115+ llm_provider: groq
116+ llm_api_key: ${{ secrets.GROQ_API_KEY }}
117+ reviewer_models: "llama-3.1-8b-instant,openai/gpt-oss-20b,llama-3.3-70b-versatile"
118+ judge_model: "openai/gpt-oss-120b"
119+ max_consensus_rounds: "3"
120+ inline_comments_enabled: "true"
107121` ` `
108122
109- Best balance of speed, quality, and cost.
123+ # ## Model Presets
124+
125+ Choose models based on your needs :
110126
111- # ### High Capability (Best Quality)
127+ # ### Groq Default Production ✅
112128
113129` ` ` yaml
114- reviewer_models: "gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite "
115- judge_model: "gemini-2.5-pro "
130+ reviewer_models: "llama-3.1-8b-instant,openai/gpt-oss-20b,llama-3.3-70b-versatile "
131+ judge_model: "openai/gpt-oss-120b "
116132` ` `
117133
118- Uses most capable models. Higher cost but best findings .
134+ Best balance of production reliability and coverage .
119135
120- # ### Cost Optimized (Lowest Cost)
136+ # ### Groq Maximum Speed ✅
121137
122138` ` ` yaml
123- reviewer_models: "gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.5-flash-lite "
124- judge_model: "gemini-2.5-flash "
139+ reviewer_models: "llama-3.1-8b-instant,openai/gpt-oss-20b,openai/gpt-oss-20b "
140+ judge_model: "openai/gpt-oss-120b "
125141` ` `
126142
127- Uses lighter models. Lower cost but lighter analysis .
143+ Optimized for faster review cycles with lighter reviewer models .
128144
129- # ### Quality Optimized (Most Findings)
145+ # ### Groq Maximum Quality ✅
130146
131147` ` ` yaml
132- reviewer_models: "gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite "
133- judge_model: "gemini-2.5-pro "
148+ reviewer_models: "llama-3.3-70b-versatile,openai/gpt-oss-120b,openai/gpt-oss-20b "
149+ judge_model: "openai/gpt-oss-120b "
134150` ` `
135151
136- Maximum detection power. Highest cost, most comprehensive reviews .
152+ Highest quality review configuration for the deepest analysis .
137153
138154# # How It Works
139155
@@ -194,7 +210,7 @@ The action posts a GitHub review with:
194210See detailed architecture in [docs/adr/](./docs/adr/):
195211
196212- **ADR-001** — Multi-Model Consensus Architecture
197- - **ADR-002** — Gemini API Integration & Model Selection
213+ - **ADR-002** — LLM Provider Integration & Model Selection
198214- **ADR-003** — Inline Comment Mapping
199215- **ADR-004** — Idempotency & State Management
200216
@@ -205,7 +221,7 @@ prpilot-review/
205221├── src/
206222│ ├── index.ts # Main orchestrator (13-step pipeline)
207223│ ├── llm/
208- │ │ └── llm-client.ts # Gemini API abstraction
224+ │ │ └── llm-client.ts # LLM provider abstraction
209225│ ├── review/
210226│ │ ├── review-orchestrator.ts # Consensus logic
211227│ │ └── inline-comment-builder.ts # Line mapping
@@ -285,12 +301,11 @@ npm run all # Run all checks
285301
286302## API Keys & Billing
287303
288- ### Getting a Gemini API Key
304+ ### Getting an API Key
289305
290- 1 . Go to [ Google AI Studio] ( https://makersuite.google.com/app/apikey )
291- 2 . Click "Create API Key"
292- 3 . Select/create a project
293- 4 . Copy the key and add to GitHub repo secrets
306+ 1 . Choose your provider: ` gemini ` or ` groq `
307+ 2 . Create an API key in the provider console
308+ 3 . Copy the key and add it to GitHub repo secrets
294309
295310### Free Tier Quotas
296311
@@ -302,48 +317,48 @@ The free tier has limits:
302317If you hit quota errors:
303318
3043191 . ** Upgrade to paid plan** — Recommended for production
305- 2 . ** Use lighter models** — ` gemini-2.5-flash-lite ` uses fewer tokens
320+ 2 . ** Use lighter models** — ` gemini-2.5-flash-lite ` or Groq's smaller models like ` llama-3.1-8b-instant ` use fewer tokens
3063213 . ** Reduce reviewer count** — Use 2 instead of 3 reviewers
3073224 . ** Schedule reviews** — Spread runs across off-peak hours
308323
309- See [ quota documentation] ( https://ai.google.dev/gemini-api/docs/rate-limits ) .
324+ See provider-specific quota documentation for your chosen LLM .
310325
311326### Costs
312327
313- Typical cost per PR review:
328+ Typical cost per PR review will vary by provider and model selection :
314329
315- - ** Default config** — $0.001-0.005 per review (3 reviewers + optional judge)
316- - ** Cost-optimized** — $0.0005-0.002 per review
317- - ** Quality-optimized** — $0.005-0.02 per review
330+ - ** Default config** — Low-cost balanced review
331+ - ** Cost-optimized** — Minimal token usage and fastest reviewers
332+ - ** Quality-optimized** — More comprehensive analysis with higher cost
318333
319- Pricing based on [ Gemini API rates ] ( https://ai.google.dev/pricing ) .
334+ Pricing is provider-dependent. For Gemini, see [ Gemini pricing ] ( https://ai.google.dev/pricing ) .
320335
321336## Troubleshooting
322337
323338### Action not running?
324339
325- - Check ` GEMINI_API_KEY ` is set in repo secrets
340+ - Check ` llm_provider ` and ` llm_api_key ` are configured correctly
326341- Verify branch triggers (pull_request, branches)
327342- Check action logs for errors
328343
329344### Zero findings even with code changes?
330345
331346- Enable debug mode to see full model responses
332- - Check if models are available in v1beta API
333- - Try different model preset
334- - Verify PR has actual code changes
347+ - Check whether the selected models are valid for your provider
348+ - Try a different model preset
349+ - Verify the PR has actual code changes
335350
336351### Quota exceeded errors?
337352
338- - Check your billing plan at [ Google Cloud Console ] ( https://console.cloud.google.com )
339- - Switch to paid plan or upgrade quota
340- - Use lighter models (flash-lite variants)
353+ - Check your provider billing or free tier quota
354+ - Switch to paid plan or upgrade quota if available
355+ - Use lighter models where supported
341356
342357### Model not found errors?
343358
344- - Verify model names match available list
345- - Models must be in ` v1beta ` API
346- - Check [ available models ] ( https://ai.google.dev/gemini-api/ docs/models/gemini )
359+ - Verify model names match your provider's available models
360+ - For Gemini, check [ Gemini models ] ( https://ai.google.dev/gemini-api/docs/models/gemini )
361+ - For Groq, check your Groq account model docs
347362
348363### Slow reviews?
349364
@@ -439,7 +454,7 @@ MIT License — See [LICENSE](./LICENSE) file
439454
440455# # Acknowledgments
441456
442- - Built with [ Gemini AI API](https://ai.google.dev/)
457+ - Built with configurable LLM providers such as Gemini or Groq
443458- GitHub Actions integration via [@actions/core](https://github.com/actions/toolkit)
444459- Code bundling via [@vercel/ncc](https://github.com/vercel/ncc)
445460
0 commit comments