OpenCodeReview: Alibaba's Open-Source AI Reviewer That Doubles F1 and Slashes Token Costs
Code review is the bottleneck that AI-generated code makes worse. OpenCodeReview shows a tested architecture for making review agents reliable enough to run in CI, with precision-first output and token costs a fraction of a general-agent pass.
OpenCodeReview, born from Alibaba's internal AI code review assistant and open-sourced in May, reads Git diffs and hands changed files to a tool-calling agent. The agent can read full files, search the codebase, and pull context from other changed files before producing structured comments with file names and line ranges. On the official AACR-Bench, Claude Opus 4.6 with OpenCodeReview hit 25.1% F1 and 33.9% precision at 385K tokens per review; the same model run bare through Claude Code got 11.6% F1 and burned 5.66M tokens.
The architecture splits responsibilities: deterministic engineering handles file selection, rule routing, line-number anchoring, and a reflection module that intercepts hallucinations; the agent owns risk identification, context exploration, and classification. It covers 40+ languages, supports whole-file scanning for legacy codebases, and integrates with GitHub Actions, GitLab CI, and Gerrit. A single `ocr` CLI command installs globally, and config presets for Anthropic, OpenAI, DashScope, DeepSeek, and Z.AI get you started. Recall is deliberately low by design to keep precision high.
The 94% token reduction comes from process engineering, not model choice; the same model scores double the F1 when the pipeline constrains what it does.
A 33.9% precision means the tool remains a pre-filter that needs a human final reviewer; the official trade-off of lower recall for fewer false positives is pragmatic for CI.
The hybrid split between deterministic plumbing and agent semantics is a reusable pattern for any high-frequency agent task, not just code review.