# AI21 says harness changes cut GitLab review costs 97.7%

> AI21 tested GitLab Duo Code Review on 50 public pull requests. DeepSeek V4 Flash and compacted prompts cut measured cost while keeping benchmark F1 near baseline.

Oossa · 2026-10-22 · https://oossa.com/en/ai21-says-harness-changes-cut-gitlab-review-costs-97-7

AI21 Labs says it cut GitLab Duo Code Review’s measured cost from $0.589 to $0.0135 per pull request—a 97.7% drop—by running all four stages on DeepSeek V4 Flash and compacting the prompts. On Martian’s Code Review Bench, the final setup scored 47.2% F1, compared with 46.4% for the Sonnet 5 baseline.

The test used 50 public pull requests, not GitLab production traffic or customer data. AI21 says three requests exceeded its DeepSeek deployment’s 256K-token limit without compaction and fell back to Sonnet; compaction brought every review within the limit. The settings were tuned and scored on the same requests, so performance on other codebases is untested.

## The facts

- AI21 reported $0.0135 per pull request and 47.2% F1 for its final setup, versus $0.589 and 46.4% F1 for the baseline.
- The benchmark covered 50 public pull requests; AI21 says GitLab has since moved Duo Code Review to Sonnet 5.5.

## Why it matters

Teams running code-review agents can treat the results as evidence that model choice and prompt size may affect per-review spending, but AI21’s test does not establish the same savings or quality on other codebases or with GitLab’s newer model.

## Sources & references

1. [How we cut GitLab Duo Code Review’s cost by 98%](https://www.ai21.com/blog/gitlab-case-study/) – AI21 Labs

Last updated: 2026-10-22
