You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow selecting provider/model per invocation (e.g. ocr review --provider X --model Y) #680
Provider and model are global state in ~/.opencodereview/config.json (ocr config provider / ocr config set model).
To review the same diff with a different model I have to mutate that file, which affects every other run — and concurrent runs race over it.
My flow: I orchestrate reviews from a coding agent. I want to run the same diff through several models (Claude, Codex/GPT, others) via OCR, collect the JSON outputs, deduplicate findings across runs, and post the merged result as comments on a merge request.
Agreement between models is a strong signal for filtering out false positives — but today there is no clean way to vary the model per run.
Proposed Solution
Add per-run flags to ocr review (and ocr scan):
Flag
Description
--provider <name>
A provider already present in the providers map
--model <name>
Model for that provider
Both override config for that invocation only — nothing is written back.
Env vars (OCR_LLM_URL / OCR_LLM_TOKEN / OCR_LLM_MODEL / OCR_USE_ANTHROPIC) work per process, but bypass the configured providers map - every call has to re-supply URL and token, which is clumsy inside an agent and error-prone in CI.
Rewriting config.json between runs - racy under concurrency and destroys the user's own settings.
Delegate mode - solves a different problem: one agent, one model, no independent second opinion.
Affected Area
CLI / Commands
Additional Context
Additional Areas: Configuration, Output / Formatting Related: per-run overrides would also make it easy to benchmark models against each other on a fixed set of diffs, which is useful when picking a default for a team.
Thanks for the well-thought-out proposal, @nk-tedo-001! The use case of running the same diff through multiple models and deduplicating findings is compelling — and the precedence model (flag > env > config) aligns with how we handle --model today.
We already have --model wired through the resolver, so adding --provider should be fairly straightforward — the main work is threading it into loadLLMRuntime and making the resolver respect it alongside the existing provider map.
Would you be interested in contributing a PR for this? Happy to point you at the relevant files if that would help.
Thanks for the well-thought-out proposal, @nk-tedo-001! The use case of running the same diff through multiple models and deduplicating findings is compelling — and the precedence model (flag > env > config) aligns with how we handle --model today.
We already have --model wired through the resolver, so adding --provider should be fairly straightforward — the main work is threading it into loadLLMRuntime and making the resolver respect it alongside the existing provider map.
Would you be interested in contributing a PR for this? Happy to point you at the relevant files if that would help.
Activity
lizhengfeng101 commentedon Aug 3, 2026
Thanks for the well-thought-out proposal, @nk-tedo-001! The use case of running the same diff through multiple models and deduplicating findings is compelling — and the precedence model (flag > env > config) aligns with how we handle
--modeltoday.We already have
--modelwired through the resolver, so adding--providershould be fairly straightforward — the main work is threading it intoloadLLMRuntimeand making the resolver respect it alongside the existing provider map.Would you be interested in contributing a PR for this? Happy to point you at the relevant files if that would help.
nk-tedo-001 commentedon Aug 3, 2026
I'll try to give it a chance.