Skip to content

ci(review): route reviews to GPT-5.6 tiers - #39

Merged
luckyPipewrench merged 1 commit into
mainfrom
fix/pr-review-model-routing
Aug 2, 2026
Merged

luckyPipewrench merged 1 commit into
mainfrom
fix/pr-review-model-routing

Conversation

@luckyPipewrench

@luckyPipewrench luckyPipewrench commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Route ordinary PR reviews to GPT-5.6 Luna with low reasoning and deep reviews to GPT-5.6 Terra with medium reasoning. Centralize default selection in the runner, accept optional repository-variable overrides, harden trusted workflow invocation, and add regression coverage for routing and API-response failures.

Summary by CodeRabbit

  • Improvements

    • PR reviews now support configurable fast and deep review models, with reliable defaults when custom settings are unavailable.
    • Review requests can use the configured AI service endpoint and authentication settings.
    • Posted review details more accurately reflect the model and reasoning mode used.
  • Security

    • Added safeguards to ensure automated reviews run only under trusted conditions.
  • Tests

    • Added coverage for model selection, configuration overrides, fallback behavior, reasoning settings, and security checks.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@luckyPipewrench, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c2a7d85a-fbd7-4323-9c4a-361c977f053f

📥 Commits

Reviewing files that changed from the base of the PR and between e98ea1e and c3707ee.

📒 Files selected for processing (3)
  • .github/workflows/pr-review.yaml
  • scripts/pr-review.py
  • tests/test_pr_review_routing.py
📝 Walkthrough

Walkthrough

The PR makes fast and deep review models configurable through repository variables. Python defaults apply when variables are empty or unset. LiteLLM credentials are passed to the workflow, and routing and security tests were added.

Changes

PR review model routing

Layer / File(s) Summary
Model defaults and routing
scripts/pr-review.py
The script uses gpt-5.6-luna for fast modes and gpt-5.6-terra for deep mode. model_for_mode() applies non-empty environment overrides and Python fallbacks.
Review invocation and workflow integration
.github/workflows/pr-review.yaml, scripts/pr-review.py
LLM calls and posted review metadata use shared routing. The workflow passes repository model variables and LiteLLM secrets.
Routing and workflow regression tests
tests/test_pr_review_routing.py
Tests cover defaults, overrides, empty-variable fallbacks, reasoning-effort payloads, workflow delegation, and trusted-runner safeguards.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes routing reviews to the GPT-5.6 model tiers, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pr-review-model-routing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test_pr_review_routing.py`:
- Around line 5-10: Reorder the imports in the test module’s top-level import
block to match Ruff’s I001 sorting rules, preserving all existing imports and
functionality.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e5abde73-ba0f-4c9d-9e92-4d85c917619b

📥 Commits

Reviewing files that changed from the base of the PR and between f70bca2 and e98ea1e.

📒 Files selected for processing (3)
  • .github/workflows/pr-review.yaml
  • scripts/pr-review.py
  • tests/test_pr_review_routing.py

Comment thread tests/test_pr_review_routing.py Outdated
@luckyPipewrench
luckyPipewrench force-pushed the fix/pr-review-model-routing branch from e98ea1e to 929003b Compare August 2, 2026 02:06
@luckyPipewrench luckyPipewrench self-assigned this Aug 2, 2026
@luckyPipewrench
luckyPipewrench force-pushed the fix/pr-review-model-routing branch from 929003b to c3707ee Compare August 2, 2026 02:18
@luckyPipewrench
luckyPipewrench merged commit c1f98ea into main Aug 2, 2026
14 checks passed
@luckyPipewrench
luckyPipewrench deleted the fix/pr-review-model-routing branch August 2, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant