Efficient, tiered code reviews powered by cost-effective AI models.
Project details
tierview innovatively tiers code reviews by directing each diff hunk to the most suitable AI model based on risk assessment. This minimizes costs while maximizing accuracy, allowing users to understand the expenses involved with each review tier through detailed cost receipts. Optimize bug detection and cost management seamlessly.
tierview offers a tiered approach to code review, harnessing the potential of Claude models to assess code changes for bugs while optimizing review costs. This innovative tool efficiently routes each code change to the most appropriate Claude model, managing resources effectively by escalating only when necessary.
In a recent evaluation on 23 held-out real bug samples, tierview successfully identified 12 issues, compared to 16 findings from an all-Opus approach. Notably, tierview achieved this with an 18% reduction in costs, showing promise in both cost-effectiveness and accuracy.
Note: These results should be interpreted with caution; variances may exist between different test sets. Refer to the results for further details.

A sample review from a Django commit showcased the insights provided by tierview:
tierview: 1 finding(s) in 4 reviewed hunk(s).
[medium] django/db/models/lookups.py:290-304 self.rhs iterated twice; one-shot iterables (generators) lose values
bug, confidence 0.45, tier 3 claude-opus-5-5
fix: Turn the iterable into a list once before checking it, e.g. `rhs = list(self.rhs)`.
Receipt:
tier model effort hunks +escalated calls input cache write cache read output
total cost: $0.20 via Claude Code, $0.14 direct API (26,910 tokens)
tierview integrates seamlessly with existing Claude subscriptions, offering a cost-efficient pathway for code review without requiring additional API keys.
# To run in any git repository:
npx tierview review --dry-run # Preview routing and estimated costs
npx tierview review # Perform the review using your plan
Further customization allows options for reviewing staged changes, specific diff files, and more.
tierview represents a significant advancement in code review technology, not only achieving marked efficiencies in cost but also ensuring a rigorous approach to bug identification through tiered evaluation. For those utilizing Claude models for code assessment, tierview offers an innovative, practical solution tailored for today’s development environments.
Comments
0Start the conversation
Share the first comment.