What Is OpenCodeReview? Setup, Example Reviews, Agent Skills and Which Models It Works With
After changing your code, you type `ocr review` in the terminal; OpenCodeReview reads the Git change, uses a rule-based pipeline to decide which files and rules to review, then has an AI agent review them and returns bug, security and quality issues as comments with line numbers. It's Alibaba's open-source (Apache-2.0) tool; the software is free and the model cost goes to the provider you choose. If you use Claude Code, Codex or Cursor, you can install it as a skill and have your agent review with its own model, without a separate key.
- What it does
- Reviews Git changes line by line
- Type
- Command-line tool + agent skills
- Maker
- Alibaba (official repository)
- Where
- Terminal, Claude Code, Codex, Cursor, Kimi Code, Copilot CLI, GitHub Actions, GitLab CI
- Updates
- The npm install updates itself automatically
- Version
- 1.13.12 (November 18, 2026)
- Cost
- Free (Apache-2.0); model cost is separate
What is OpenCodeReview for?
A team wants a second pair of eyes on every change in a client project before release, but there isn't always time. Reviewing with general-purpose coding agents has problems the README lists: skipping some files on large changes, pointing at the wrong line, and quality that shifts when the prompt changes slightly. OpenCodeReview puts these steps under rules: the software decides which files to review, which files to read together and which rules apply, and the AI agent only does the review.
According to Alibaba, the tool served tens of thousands of developers as the company's official internal code review assistant for two years (manufacturer's claim). The README's comparison reports higher precision and roughly one-ninth of the tokens versus a general-purpose agent with the same model, in exchange for lower recall; this is the manufacturer's own measurement.
Who it helps: agency development teams that want to lighten the PR review load on client projects, and freelance developers and small teams that want one more pass over a change before release.
How does OpenCodeReview work?
› ocr review --from mainThe workspace, a branch range or a single commit.result.jsonfile + line + commentPositioning and reflection modules check each comment's location and content.You can define your own review rules by path and file type; the built-in rules cover issues such as null pointers, thread safety, XSS and SQL injection. You choose the comment language with ocr config set language; the default is English.
How do you install OpenCodeReview?
Requirements: Git 2.41 or later; Node.js 18 or later for the npm install. In native mode, a model provider's key; in delegation mode no key is needed. The commands come from the official README and installation docs.
› npm install -g @alibaba-group/open-code-review› ocr config provider
ocr llm test› brew install open-code-review
curl -fsSL https://open-codereview.ai/install.sh | shocr config provider has you pick a provider, takes the key, saves the model and tests the connection once. In CI you write the same settings with ocr config set.
› npx skills add alibaba/open-code-review› /plugin marketplace add alibaba/open-code-review
/plugin install open-code-review@open-code-review› codex plugin marketplace add alibaba/open-code-review› copilot plugin install alibaba/open-code-review:plugins/open-code-review| Native mode | Delegation mode | |
|---|---|---|
| Who reviews? | OCR's review agent and pipeline | Your coding agent, following OCR's rules |
| Model and key | OCR's provider settings | The agent's own model and sign-in |
| Claude Code command | /open-code-review:review | /open-code-review:delegate-review |
Native mode doesn't use your Claude Code Team/Pro sign-in; it uses OCR's own provider settings. In Cursor, the plugin folder is copied manually under ~/.cursor/plugins/local/.
› mkdir -p .github/workflows
curl -o .github/workflows/ocr-review.yml \
https://raw.githubusercontent.com/alibaba/open-code-review/main/examples/github_actions/ocr-review.yml- Add the
OCR_LLM_URL,OCR_LLM_AUTH_TOKENandOCR_LLM_MODELsecrets under Settings › Secrets and variables › Actions. - The workflow runs when a PR is opened and when someone comments
/open-code-review, posting findings as inline comments.
There's a ready-made pipeline for GitLab CI too. The workflow uses pull_request_target; according to the docs, OCR only reads the diff and doesn't run code from the PR.
ocr installed with npm updates itself automatically in the background. To pin the version, type npm install -g @alibaba-group/open-code-review@1.13.12 and set the OCR_NO_UPDATE=1 environment variable.
What do you type, what do you get? Example reviews
The examples come from the README and the quickstart docs; the output is described as far as the documentation describes it.
› ocr review --preview
ocr reviewWhat you get: a review of all staged, unstaged and untracked changes; each comment comes with a file and line number.
› ocr review --from main --to feature-odeme --format json --output result.jsonWhat you get: a review of the branch's changes since it diverged from main, in a JSON file with a comments[] array that CI or another agent can read.
› ocr scan --path internal/agentYou find an interrupted review with ocr session list and continue it with --resume <session-id>.
Which models does OpenCodeReview work with?
OpenCodeReview has no model of its own. A provider is the service it reaches the model through; you pick one, give it the key and choose the model with ocr config model. A provider's model list is only a suggestion; you can also pass another model name with --model.
| What you have | Provider (name in the docs) | Note |
|---|---|---|
| An API key | anthropic, openai, openai-responses, gemini, openrouter, deepseek, xai, kimi-global, minimax, siliconflow, novita | The key goes in settings or an environment variable (e.g. ANTHROPIC_API_KEY) |
| An AWS account | bedrock | No key; the AWS credential chain and region |
| A ChatGPT account | chatgpt (preview) | ocr auth login; for one person's local use, not for shared CI |
| Your own gateway or another compatible service | custom provider (OpenAI- or Anthropic-compatible) | You set the URL and protocol |
| A local model | Ollama (as a custom provider) | The model must support native tool calling; according to the docs qwen3 works and deepseek-r1 doesn't |
Which should you pick? If you already use Claude Code, Codex or Cursor, try delegation mode first: no separate key or provider setup is needed. For OCR's full pipeline, connect a provider's API key; for Claude models you use an Anthropic API key or Bedrock. If you don't want your code to leave your computer, connect a local model that supports tool calling; speed and quality depend on your hardware.
Checked on November 18, 2026. Source: configuration.md (built-in providers table; a few China-specific providers are abbreviated here), faq.md and chatgpt-preview.md.
What does OpenCodeReview access, and where does my code go?
The Git diff, the full contents of changed and related files when needed, code search and review rules.
According to the docs, the only code that leaves your machine is diffs and optional read-tool snippets, sent to the model endpoint you configured. Beyond code: the npm install checks the npm registry for updates on every run (OCR_NO_UPDATE=1 turns this off), and at install time it downloads the binary from GitHub Releases if no platform package supplied it.
Comments to the terminal or a file you give; session logs and settings under ~/.opencodereview. In the CI recipe it posts comments on the PR.
Off by default. If you turn it on, OpenTelemetry data goes to the collector you choose; prompt and response content isn't exported.
!There's no built-in redaction of secrets in content (a built-in list of secret file paths is simply not reviewed): keep keys out of the repository and leave sensitive files out with exclude. Only the latest release gets security updates; versions before 1.11.1 had a medium-severity issue where a repository's rule.json could pull files from the machine into the model prompt; it was fixed in 1.11.1.
Source: faq.md ("Privacy & security"), telemetry.md, GitHub security advisory GHSA-wwg6-qfxw-xffj. This section isn't a security certification.
Is OpenCodeReview free?
Yes. The software is Apache-2.0 open source; there's no account, subscription or usage limit. The only cost comes from the model provider you choose. Delegation mode adds no separate charge; your coding agent's own plan and limits apply. OpenCodeReview charges nothing extra for the ChatGPT sign-in preview; OpenAI decides eligibility. Prices are in US dollars.
- Apache-2.0: free to use in commercial projects, modify and distribute
- When distributing you must keep the license and copyright notices; it grants no permission to use Alibaba's trademarks
Source: LICENSE (Apache-2.0) and the README. This isn't legal advice.
Common problems and fixes
| What's happening | What to do |
|---|---|
no valid LLM endpoint configured | No provider is configured: ocr config provider, then ocr llm test. Delegation mode skips this step. |
ocr llm test returns 401 or 403 | The key is wrong or expired. |
| "No tool calls parsed" and zero comments with a local model | The model doesn't support native tool calling; choose one that does. |
not a git repository | Run the command inside a Git repository; OCR works only with Git. |
| A file got no comments | First check with ocr review --preview whether the file is on the review list; exclude rules or file-type filters may be skipping it. |
How do you uninstall OpenCodeReview?
- npm:
npm uninstall -g @alibaba-group/open-code-review - Homebrew:
brew uninstall open-code-review(Homebrew's standard command; not stated in the official documentation). - Skills and plugins: Delete the open-code-review folders in the agent's skill directory, or remove the plugin from the agent's plugin menu.
- Settings: Manually delete the
~/.opencodereviewfolder, where keys and session logs are stored.
Frequently asked questions
What is OpenCodeReview, and is it Alibaba's?
It's Alibaba's open-source AI code review tool; the repository is in Alibaba's GitHub organization. It reads Git changes and returns bug, security and quality issues as comments with line numbers.
How do you use it in Claude Code, Cursor or Codex?
Install the skills with npx skills add alibaba/open-code-review in the project folder, or add the plugin from the agent's plugin marketplace. In delegation mode the review runs on your agent's own model, with no separate key.
How do you install it with npm?
Install it with npm install -g @alibaba-group/open-code-review, then choose a model provider with ocr config provider. The npm install updates itself automatically; OCR_NO_UPDATE=1 turns that off.
Can it run on every PR in GitLab or GitHub?
Yes. The repository has ready-made recipes for GitHub Actions and GitLab CI; results are posted as inline comments on the PR or MR. The model endpoint, key and model name are provided as CI secrets.
Which models does it work with, and does OpenRouter work?
It has no model of its own; Anthropic, OpenAI, Gemini, OpenRouter, DeepSeek, Bedrock and many other providers are built in, and you can add a custom OpenAI- or Anthropic-compatible endpoint. A local model must support tool calling.
Is it free?
The software is Apache-2.0 licensed and free. The only cost comes from the model provider you choose; in delegation mode your coding agent's own plan applies.
Related guides
Sources
- alibaba/open-code-review repository (README)
- Official website
- Docs: installation
- Docs: configuration and providers
- Docs: CI/CD
- Docs: FAQ
- Coding agent plugins
- Security advisory GHSA-wwg6-qfxw-xffj
Not clear in the official sources: The quality of comments in Turkish (there's a language setting but no Turkish example) · the README's comparison results are the manufacturer's own measurement. Each is covered in its section.





