Code Lab
Alibaba Open Code Review Explained: Review Modes, Costs and Actual Source
CODE LAB · PROJECT SPOTLIGHT
Open Code Review Go · Apache 2.0
Understand diff scope, native versus delegated models and structured findings.
Repository preview/artwork: alibaba/open-code-review · creator-supplied image.
Alibaba’s Open Code Review analyzes repository changes and produces structured findings. Its central distinction is a hybrid workflow: code determines parts of file selection, rules and reporting, while a model reasons about changes and retrieves context.
That is more specific than dropping a diff into a chat window. It also introduces choices about which changes are included, which model performs the review and where repository content is sent. We inspected the official source and documentation; we did not run a model-backed review.
Choose the review scope first
| Scope | Documented command | Boundary |
|---|---|---|
| Current workspace | ocr review | The documented workspace mode includes staged, unstaged and untracked changes. |
| Branch changes | ocr review –from main –to feature-branch | Confirm the base: the documented range uses the divergence point. |
| One commit | ocr review –commit abc123 | Replace the example with the intended real commit. |
| Whole files | ocr scan –path internal/agent | A full-file scan is different from reviewing only a diff. |
A clean diff review does not establish that untouched files are correct. A full-file scan can reveal more concerns, but also creates more findings to triage. Record the scope with the report so its coverage is not overstated.
Native and delegation modes have different costs
| Mode | Who calls the model? | Configuration |
|---|---|---|
| Native | Open Code Review’s own agent and pipeline | An OCR provider and model, using a supported authentication route. |
| Delegation | The coding agent you already use | The host agent’s existing model/authentication, plus the OCR CLI and delegation skill. |
Delegation avoids a separate OCR model-provider setup. It does not make the host agent’s subscription, limits or usage free. The README also distinguishes delegation from the complete native pipeline: the host agent performs analysis and reporting within the supplied workflow.
For native mode, choose which provider may receive repository material. A coding-assistant subscription login is not automatically an API credential for another application.
Install the CLI, then follow the chosen route
The documented prerequisite is Git 2.41 or newer. The npm installation route and native-mode configuration commands are:
npm install -g @alibaba-group/open-code-review
ocr config provider
ocr config modelDelegation follows its own instructions instead of those provider setup steps. Use the official mode comparison ↗ for the selected route. An installed skill alone does not verify that the required CLI and model path work.
When configured, the documented output options can save a machine-readable report:
ocr review --format json --output result.jsonThis is a usage example, not an output we produced. Inspect the chosen files and findings before posting review comments or applying changes.
Read the author benchmark carefully

Precision asks how many reported issues are real. Recall asks how many real issues were found. A reviewer that emits fewer confident comments can reduce noise while missing other defects. F1 combines those measures, but does not replace inspecting actual findings for your language and repository.
The README describes a precision-versus-recall trade-off and presents token and timing comparisons. Those apply to the author’s evaluation. We did not reproduce them, and lower token consumption is not a universal price quote across providers or codebases.
Inside the source: a comment needs a usable path
This excerpt is part of the comment parser. It supplies a fallback path and checks the basic fields needed to retain a finding:
The parser normalizes an explicitly supplied path. If no path remains, it tries the caller’s default. A comment without a path or content is skipped; otherwise it is appended to the parsed result.
These checks improve handling and display. They do not prove the defect exists, validate every line reference or establish that a suggested patch is correct. Structured output is useful plumbing, not a correctness certificate.
Actual source: Copyright 2026 alibaba/open-code-review Contributors, alibaba/open-code-review at the linked commit. Apache License 2.0; original line numbers and syntax coloring added. Repository license ↗
Make the first evaluation small enough to verify
Use a change whose behavior you understand. Preserve the exact base and target, selected rules, model and output. For each finding, inspect the cited code and determine whether its stated consequence can occur. If you revise the code, check the relevant behavior and tests instead of treating the number of comments as a success metric.
The release listing showed v1.13.11, dated November 17. The repository uses Apache 2.0; model inference and agent subscriptions remain separate costs. Promotional adoption claims do not establish quality for a new codebase.
For observing a browser bug after reviewing its code, our Chrome DevTools MCP guide covers runtime evidence. Use the repository ↗ and official releases ↗ for installation and version details.
Reviewed November 17, 2026. Discovery lead: Mindung’s Short ↗. Primary documentation and source checked independently. No provider was configured and no live review or benchmark reproduction is claimed.
