# What AI code review costs per pull request

URL: https://codepanel.ai/guides/ai-code-review-cost

The token math behind an AI code review: diff size, surrounding code, repo rules, output and push rounds, with worked examples at list prices.

An AI code review costs the tokens each model reads and writes, times that model's rates, summed over every model call in every review round of the pull request. For a medium pull request on small models that is well under a cent per reviewer call; on frontier models it is tens of cents. The total is driven less by the diff than by four other things: how much surrounding code is fetched, how many models run, how much they reason, and how many times the pull request is reviewed.

## The formula

For one model call:

```
cost = input_tokens  × input_rate  / 1,000,000
     + output_tokens × output_rate / 1,000,000
```

For one review round, sum that over every reviewer and the step that merges their findings. For one pull request, sum it over every round. Reasoning tokens count as output.

A rough conversion: one token is about four characters of English or code. A 400-line diff with its headers is around 20,000 characters, or 5,000 tokens.

## What goes into the input

The diff is usually the smallest part of a reviewer's prompt. Here is what a reviewer in CodePanel reads, with the caps that bound each part:

| Part | Cap in CodePanel | Tokens at the cap, roughly |
| --- | --- | --- |
| Instructions and pull request description | Fixed, plus the description | 1,000 to 3,000 |
| Diff of the files in scope | 120,000 characters per round | 30,000 |
| Surrounding code of changed files | 80,000 characters, first 25 files | 20,000 |
| Repository rules and docs | 16,000 characters | 4,000 |

Without caps, the surrounding code would dominate. A one-line fix in a 3,000-line file still needs context to review well, and sending the whole file costs more than the fix. CodePanel sends the whole file only up to 24,000 characters and otherwise about 40 lines around each change.

Files that cost tokens and teach a model nothing are skipped before anything is sent: lock files, generated code, minified bundles, snapshots, and any single patch over 20,000 characters. A dependency bump that rewrites `package-lock.json` should not cost a dollar to review.

## A worked example

A medium pull request: about 30,000 input tokens per reviewer and 3,000 output. Four reviewers on Claude Haiku 5.5, and an orchestrator on Claude Sonnet 5.5 that reads 15,000 tokens of findings and code and writes 4,000. At list price on 2026-10-16:

| Call | Tokens in / out | Rates per 1M | Cost |
| --- | --- | --- | --- |
| Reviewer × 4 | 30,000 / 3,000 each | $0.10 / $0.50 | $0.018 |
| Orchestrator | 15,000 / 4,000 | $2.00 / $10.00 | $0.07 |
| **Round total** | | | **$0.088** |

Swap the four reviewers for Claude Opus 5.5 and each reviewer call goes from $0.0045 to $0.18, and the round to $0.79.

The orchestrator's input depends on how much the reviewers reported, not on the size of the diff. It reads the findings and the code for only the files they name. A clean change with few findings costs less to consolidate than a messy one.

## What pushes the cost above the estimate

### Long-prompt pricing

Some models charge a higher rate for the whole request once the prompt passes a threshold. Claude Haiku 5.5 charges five times more above 100,000 input tokens. A 99,000-token call with 3,000 tokens out costs $0.0114; at 101,000 tokens it costs $0.058. Two thousand extra tokens multiply the bill.

Most OpenAI models switch above 272,000 input tokens, and Gemini Pro and xAI models above 200,000. If your tool sends whole repositories as context, check where those cliffs are. CodePanel's caps keep a reviewer's prompt to roughly 55,000 tokens, below all of them.

### Reasoning

Reasoning tokens are billed at the output rate. A Sonnet 5.5 call that thinks for 10,000 tokens before writing 3,000 costs $0.19 instead of $0.09. Set high effort only on the roles that need it.

### Repeated rounds

Every push can start a new review. A pull request that takes six pushes to land is reviewed six times. Three things keep that in check:

- **Debounce pushes.** A coding agent that pushes three fixup commits in a minute should get one review. CodePanel waits 60 seconds after a push and reviews only the latest head.
- **Review only what changed.** After the first round, review the range since the last reviewed commit and hand the reviewers the findings still open. An incremental round costs roughly the ratio of the change to the whole pull request.
- **Skip base-branch merges.** A push that only merges `main` into the branch brings in other people's code. CodePanel calls no model for it and carries the open findings over.

A round cap is the backstop. In an agent loop it matters more than with people, because an agent never gets tired of pushing. CodePanel lets you set a maximum number of automatic rounds per pull request; after that, only an explicit `/review` starts one. The coding agent can also stop early with a `/rounds stop` reply once nothing is left to fix.

### Repository context

Rules and docs go into every reviewer's prompt on every round. 16,000 characters of context is about 4,000 tokens, times five calls, times every round. Keep rules short and specific. A 3,000-character summary of your conventions does more than a 40,000-character handbook that gets trimmed anyway.

### Off-peak and scheduled prices

Some providers vary price by time. DeepSeek charges half outside its peak hours. Providers also change list prices, which is why CodePanel records each call's price at the time it was made.

## A month for a team

Take a team that merges 400 pull requests a month. Each gets one full round, and most get one or two incremental rounds after review comments are addressed. Say 400 full rounds and 600 incremental rounds a third the size, on the panel above:

| Rounds | Reviewer calls | Orchestrator calls |
| --- | --- | --- |
| 400 full | 1,600 at 30,000 / 3,000 | 400 at 15,000 / 4,000 |
| 600 incremental | 2,400 at 10,000 / 1,500 | 600 at 8,000 / 3,000 |

That comes to about $67.00 for the month at list price on 2026-10-16. The orchestrator is most of it. Moving it to a smaller model would cut the bill sharply, at the cost of the judgement that makes the review worth reading.

## Limits that stop a surprise bill

Put two caps on spend: one per pull request across all its rounds, and one per repository per month. Check them before a round starts, not after. CodePanel's defaults are $5 per pull request and $25 per repository per month, both changeable; a round that would start past either is refused before any model is called, and the pull request says why. See [Budgets and spending limits](/docs/budgets-and-limits).

A model with no known price should never count as free. CodePanel reports it as "cost unknown" and marks spend totals as lower bounds when one ran.

To compare per-model costs for pull requests of different sizes, each model's page, listed on the [Models](/models) hub, shows the input cost of reading a 10K, 30K and 100K-token pull request. [LLM API pricing](/models/pricing) puts every priced model's rates in one table, with a calculator for your own token counts. [Choosing models and cost](/docs/choosing-models) lists the tiers CodePanel suggests for each reviewer role.
