Key takeaways
- OCR is a dedicated code-review CLI, not a chatbot: it reads Git diffs → uses tools to gather context → outputs line-level review comments. On the same model, tokens run about ~1/9 of Claude Code’s general review, with higher Precision/F1 (slightly lower Recall—less noise by design).
- 12+ built-in providers:
anthropic(Claude),openai(GPT), DashScope (Qwen), DeepSeek, Kimi, Zhipuz-ai, and more; only two protocols: Anthropic Messages and OpenAI Chat Completions. - Gemini is not in the built-in table, but Google offers an OpenAI-compatible API—wire it as a custom provider; Vertex AI enterprise gateways work the same way.
- Two execution tracks: ① OCR-managed LLM (
ocr review); ② Delegation Mode (ocr delegate)—OCR handles file selection and rules; Claude Code / Cursor agents run review with their own models. - Model capability is not the dividing line—the review pipeline (deterministic engineering + Agent) and billing track (OCR API vs subscription Delegation) are.
Bottom line: Open Code Review supports Claude and GPT; Gemini uses a custom track
Model quality sets the ceiling, but signal-to-noise and cost are shaped by OCR’s deterministic pipeline—the same Claude Opus uses fewer tokens and produces fewer false positives than Claude Code’s bare
/code-review.
As of August 2026, alibaba/open-code-review lists 13 built-in providers in the official configuration docs. Three paths matter most for this guide:
- Claude (recommended default) —
ocr config set provider anthropic, nativeanthropicprotocol; models likeclaude-opus-4-6,claude-sonnet-4-6; auto-readsANTHROPIC_API_KEYor Claude Code’sANTHROPIC_*env vars. - GPT —
provider openaiviahttps://api.openai.com/v1; good for teams on ChatGPT Team / API credits, or those wantinggpt-5.x/o-seriesreasoning models. - Gemini — no built-in preset; point
custom_providersat Google’s OpenAI-compatible endpoint (https://generativelanguage.googleapis.com/v1beta/openai/), modelgemini-2.5-pro, etc.; enterprises can use a Vertex gateway URL.
If you are already in the Open Code Review Claude ecosystem (Claude Code plugin installed), enable Delegation Mode: OCR never touches external APIs—the review logic runs inside your Claude Code session, and subscription quota and OCR review share one bill. That is a completely different cost structure from “OCR with your own API key.”
1. Why isn’t “just ask Claude Code to review” enough?
Claude Code’s built-in /code-review Skill works, but after two years of large-scale internal use Alibaba open-sourced OCR separately. Three pain points drove the split:
- Incomplete coverage — on large diffs, general Agents tend to “pick important files” and miss co-changed files; OCR uses deterministic file selection + smart bundling (e.g. pairing
message_en.propertieswithmessage_zh.properties) for full coverage. - Line-number drift — general Agent comments often miss the right line; OCR has a dedicated localization and reflection module to anchor line-level feedback.
- Quality swings + token waste — pure natural-language Skills are hard to debug; OCR’s official benchmark (50 open-source repos, 200 real PRs, 10 languages) shows F1 / Precision well above Claude Code’s general review on the same model, tokens about 1/9, faster runs; slightly lower Recall is intentional under-reporting to cut false-positive triage cost.
In short: Open Code Review Claude is not “another layer on Claude”—it puts Claude inside a pipeline optimized for review. Swap the model for GPT or Gemini and the pipeline stays the same—that is the point of multi-model support.
2. What is Open Code Review? How do models connect?
2.1 Product positioning
OCR is a global CLI installed via npm install -g @alibaba-group/open-code-review (command ocr). Typical flow:
ocr config provider # interactive: pick provider + model + test connectivity
ocr review # review staged/unstaged workspace changes
ocr review --from main --to feature/x # branch comparison
ocr scan --path internal/agent # full-file scan (no diff required)
Agent tools include file_read, code_search, file_read_diff, code_comment, and more—cross-file references, not just patch surface.
2.2 Three model integration types
| Integration type | Entry point | Typical models | Setup cost | Best for |
|---|---|---|---|---|
| Built-in provider | ocr config provider |
Claude, GPT, DeepSeek, Qwen… | Low (API key) | Default path for most teams |
| Custom provider | custom_providers.* |
Gemini, self-hosted vLLM, enterprise gateway | Medium (URL + protocol) | Existing model gateway / compliant intranet |
| Delegation Mode | ocr delegate |
Claude Code / Cursor current model | Zero OCR key | Paid subscription, want to skip API bills |
2.3 Full built-in provider list (2026-08)
All ship with preset base URLs—API key (or matching env var) only:
| Name | Protocol | Representative models / use | Environment variable |
|---|---|---|---|
anthropic | anthropic | Claude Opus / Sonnet | ANTHROPIC_API_KEY |
openai | openai | GPT-5.x / o-series | OPENAI_API_KEY |
dashscope | openai | Qwen series | DASHSCOPE_API_KEY |
deepseek | openai | DeepSeek V3, etc. | DEEPSEEK_API_KEY |
kimi | openai | Moonshot Kimi | MOONSHOT_API_KEY |
z-ai | openai | Zhipu GLM | Z_AI_API_KEY |
volcengine | openai | Volcano Ark | ARK_API_KEY |
baidu-qianfan | openai | ERNIE Qianfan | QIANFAN_API_KEY |
Also dashscope-tokenplan, tencent-tokenhub, hy-tokenplan, mimo, minimax, and other China token-plan endpoints | |||
Config lives at ~/.opencodereview/config.json; override the model per run with ocr review --model claude-sonnet-4-6 without editing the file.
3. Claude, GPT, Gemini: three configuration paths in detail
3.1 Claude (smoothest Open Code Review path)
Claude uses the native Anthropic protocol, not an OpenAI compatibility layer—tool calls and Messages API behavior are most stable, and this is the combo Alibaba validated most in production.
# Interactive (recommended)
ocr config provider
# pick anthropic → paste ANTHROPIC_API_KEY → choose claude-opus-4-6
# Non-interactive CI
ocr config set provider anthropic
ocr config set model claude-sonnet-4-6
ocr config set providers.anthropic.api_key "$ANTHROPIC_API_KEY"
ocr llm test
Reuse Claude Code environment: if ANTHROPIC_AUTH_TOKEN / ANTHROPIC_BASE_URL are already exported (same as Claude Code), OCR picks them up with zero duplicate config. After installing the Claude Code plugin, trigger the same review rules from the IDE via slash command.
Model picks: pre-merge PR gate → Sonnet (cost-controlled); security/concurrency/financial core modules → Opus; disable thinking to save tokens: ocr config set providers.anthropic.extra_body '{"thinking":{"type":"disabled"}}'.
3.2 GPT (official OpenAI track)
ocr config set provider openai
ocr config set model gpt-5.2
ocr config set providers.openai.api_key "$OPENAI_API_KEY"
ocr review --from origin/main --to HEAD
GPT fits teams standardized on OpenAI Platform API, or those used to OpenAI model families in the GitHub Copilot ecosystem. OCR normalizes OpenAI protocol URLs; Azure OpenAI can use custom_providers with your deployment endpoint.
vs Claude inside the OCR pipeline: differences are mostly inference style (GPT leans toward convention checks, Claude toward edge cases)—not missing OCR features; both get the same toolset.
3.3 Gemini (custom provider, not built-in)
Google does not appear in the built-in table, but the Gemini API provides an OpenAI compatibility layer—wire it as a custom provider:
ocr config set provider gemini-google
ocr config set custom_providers.gemini-google.url \
https://generativelanguage.googleapis.com/v1beta/openai/
ocr config set custom_providers.gemini-google.protocol openai
ocr config set custom_providers.gemini-google.model gemini-2.5-pro
ocr config set custom_providers.gemini-google.api_key "$GEMINI_API_KEY"
ocr config set custom_providers.gemini-google.models \
"gemini-2.5-pro,gemini-2.5-flash,gemini-2.0-flash"
ocr llm test
For large monorepos, Gemini’s million-token context has theoretical upside—but OCR already bundles files and shards concurrency; most PRs never need full context. The practical reason is usually: the team already has Google AI Studio / Vertex contracts and wants billing consolidated on GCP.
Vertex AI enterprise: swap url for a regional endpoint (e.g. https://us-central1-aiplatform.googleapis.com/... OpenAI adapter path), protocol stays openai. More Gemini background: Gemini 3.5 Pro deep dive.
4. Claude vs GPT vs Gemini: five-axis comparison (inside OCR)
| Model family | Entry / protocol | Execution (in OCR) | Context / cost | Permissions / compliance | Best fit |
|---|---|---|---|---|---|
| Claude | Built-in anthropic; can delegate to Claude Code |
Most stable tool calls; plugin / Skill one-click integration | Opus costs more but misses less; tokens already ~9× cheaper than bare Agent | Anthropic enterprise compliance; Bedrock custom URL | Default for review quality; existing Claude Code subscription |
| GPT | Built-in openai |
Same pipeline as Claude; o-series slower but deeper | API unit price varies by model; Team quota does not feed OCR directly | OpenAI data policy; Azure private deploy | Single-vendor OpenAI strategy teams |
| Gemini | Custom openai protocol endpoint |
Full features; self-test with ocr llm test |
Flash cheap for high-volume CI; Pro for critical paths | GCP / Vertex IAM; direct access varies by network | Existing Google contract; extra-long single-file ocr scan |
For horizontal Agent comparison (not review-specific), see GPT-5.6 vs Claude & Gemini for coding—that is the “write code” scenario; this article is “review code,” with a completely different cost structure.
5. Delegation Mode: the zero-API-key path for Open Code Review Claude
If you do not want a separate API bill for review, or policy forbids OCR holding production keys, use Delegation Mode:
ocr delegate preview
ocr delegate rule src/handler.go src/handler_test.go
# OCR outputs rules + file list → paste into Claude Code / Cursor Agent
In this mode:
- OCR handles deterministic steps: file selection, rule matching (built-in sets for NPE, thread safety, SQL injection, etc.), and review task packaging.
- LLM inference runs in Claude Code, Codex, Cursor, or other installed Agents—using your existing subscription or Agent quota.
- Official Claude Code plugin, Codex Skill, and Cursor Skill support slash-command triggers.
This is the shortest path for “Open Code Review Claude” search intent: OCR rules, Claude Code Pro/Max pays the model bill. Trade-off: you lose unattended concurrent CI unless the Agent also runs on a CI runner.
6. Scenario selection matrix
| Scenario | Recommended model / mode | Why | Avoid |
|---|---|---|---|
| Individual dev with Claude Pro | Delegation + Claude Code plugin | Zero OCR API cost; rules still beat bare /code-review |
Buying a second Anthropic API key |
| Team PR gate (GitHub Actions) | OCR + Claude Sonnet API | Scriptable, concurrent, token-controlled | Delegation (no interactive Agent in CI) |
| Open source, global contributors | OCR + GPT-5 mini / Flash | Low unit cost; English comments sufficient | Default Opus (too expensive) |
| Finance / security-sensitive modules | Claude Opus + ocr scan |
High Precision; full-file audit | Diff-only surface scan |
| Existing GCP enterprise contract | Custom Gemini + Vertex | Billing on GCP; unified IAM | Opening a separate Anthropic contract |
| Domestic intranet, no public API | dashscope / deepseek built-in provider | Preset domestic endpoints | Direct api.anthropic.com |
7. Recommended stacks
【Stack A — Solo dev · Claude subscriber】
Review: OCR Claude Code plugin + Delegation Mode
Coding: Claude Code CLI (Sonnet default)
Trigger: local pre-push → ocr delegate preview
Upgrade: large PR → ocr review --model claude-opus-4-6 (API per run)
【Stack B — 10-person team · unified API billing】
Review: GitHub Action runs ocr review (Sonnet)
Coding: Cursor + Claude Code in parallel
Model: org-level ANTHROPIC_API_KEY; no personal keys in CI
Rules: .ocr/rules custom path filters
【Stack C — multi-cloud models · cost optimization】
Daily PR: GPT-5 mini (openai provider)
Friday security scan: Gemini 2.5 Pro (custom provider)
Release branch: Claude Opus
Switch: ocr review --model <name> per run
【Stack D — Cloud Mac CI runner】
Runner: kvmboot Cloud Mac M4 always-on
Review: ocr review --from main --to $PR_BRANCH
Environment: same machine as xcodebuild / device builds—review then test
Pairing: see Cloud Mac dual-Agent isolation article on kvmboot
Whether Claude Code subscription + Delegation pays off: Claude Code 2026 pricing guide; Skills that enhance review: best Claude Code Skills to install (/code-review and OCR stack—OCR specializes, Skill stays general).
8. Common mistakes
- Mistake 1: OCR only supports Claude. Built-ins include OpenAI and a dozen China/open-friendly endpoints; Claude is the default recommendation, not the only option.
- Mistake 2: Gemini cannot be used with OCR. It can—via
custom_providers+ OpenAI protocol; there is just no one-click preset—two extra URL steps. - Mistake 3: a stronger model eliminates false positives. OCR’s Precision comes from the pipeline; bare Opus can still lose to OCR + Sonnet.
- Mistake 4: Delegation and
ocr reviewbehave identically. Rule filtering is the same, but Delegation depends on Agent session quality—unattended CI should use API mode. - Mistake 5: ChatGPT Plus subscription feeds OCR directly. Plus is a chat product; OCR needs an API key (OpenAI Platform) or Delegation to Codex/Agent.
- Mistake 6: review language follows the model. Comment language is controlled by
ocr config set language English, independent of provider.
9. Rollout in 7 steps
- Install OCR:
npm install -g @alibaba-group/open-code-review; confirmocr --versionand Git ≥ 2.41. - Pick a billing track: Claude Code subscription → try Delegation first; CI gate → prepare API key.
- Configure provider:
ocr config provider— anthropic / openai / custom Gemini;ocr llm testmust pass. - Local smoke test:
ocr reviewon a real repo; verify line-level comments align with the diff. - Install Agent plugin (optional): Claude Code / Cursor OCR plugin for unified team slash commands.
- Wire CI: follow official CI/CD docs on PR trigger; use
--modelto split daily vs security scans. - Monthly review: compare API bill vs false-positive triage hours; tune model tier instead of blindly upgrading to Opus.
If review and build share one pipeline, run OCR alongside xcodebuild on the same Cloud Mac execution node—avoid finishing review then waiting in a remote runner queue.
10. FAQ
Does Open Code Review support Claude?
Yes. anthropic is a built-in provider with native Messages API; configure Opus / Sonnet, or reuse subscription via Claude Code plugin + Delegation.
Does it support GPT / OpenAI?
Yes—built-in openai provider; set OPENAI_API_KEY; Azure OpenAI uses a custom URL.
Does it support Gemini?
No built-in preset; point custom_providers at Google’s OpenAI-compatible endpoint; Vertex enterprise works the same way.
How is this different from Claude Code’s /code-review?
Same model: OCR uses fewer tokens, sharper line anchors, fewer false positives; Claude Code Skill is more flexible but quality varies. Stack both: OCR for CI gate, Skill for quick local scans.
Can I skip the API key?
Yes—ocr delegate hands inference to Claude Code / Cursor; OCR still owns files and rules.
Can I switch models for one review?
Yes: ocr review --model claude-opus-4-6 overrides once without editing config.json.
11. Summary
Which AI does Open Code Review support? — Claude and GPT work out of the box; China also has Qwen, DeepSeek, Kimi, and more; Gemini uses a custom OpenAI-compatible track; Delegation Mode hands model choice to Claude Code / Cursor for “Open Code Review Claude” with zero duplicate keys.
Do not get stuck on “which model is strongest”—inside OCR, the pipeline matters more than the model name. Pick the billing track first (API vs subscription Delegation), then the scenario tier (Sonnet daily / Opus gate / Flash savings), then fine-tune the provider. That way Claude, GPT, and Gemini are swappable engines—not three separate wheel reinventions.
Run OCR + builds in CI on one Cloud Mac
After Open Code Review finishes on a PR, the next step is often xcodebuild, signing, or integration tests—if review and build runners are separate, queue time and context switching eat the tokens you saved. kvmboot Cloud Mac mini M4 is a unified execution node: ocr review and iOS/macOS builds on one machine, Apple Silicon unified memory for concurrent review workers, native macOS without WSL friction; 24/7 uptime for GitHub Actions self-hosted or launchd scheduled scans.
Start with a daily rental to prove “OCR review → build → test,” then move to monthly. kvmboot Cloud Mac is the cost-efficient plane for Open Code Review + Apple toolchain — See plans and validate Claude / GPT / Gemini review results on the spot—not on the next machine in queue.