feat(code-review): add --model flag to override agent model selection#31699
Open
kpatel513 wants to merge 1 commit intoanthropics:mainfrom
Open
feat(code-review): add --model flag to override agent model selection#31699kpatel513 wants to merge 1 commit intoanthropics:mainfrom
kpatel513 wants to merge 1 commit intoanthropics:mainfrom
Conversation
This was referenced Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The plugin uses different models per step (Haiku for lightweight tasks, Sonnet for compliance, Opus for bug detection). Users with different cost/quality preferences have no way to override this. This adds a
--modelflag that overrides all agents to use the specified model.Usage
Changes
plugins/code-review/commands/code-review.md--modelargument handling before step 1: if provided, overrides all per-step model defaults; if invalid, stops with a clear errorplugins/code-review/README.md--modelflag in Options section with valid values and default behaviorDesign decisions
--modelapplies to every agent uniformly. Per-agent overrides (e.g.--bug-model) would add complexity with limited benefit.haikufor everything accept the quality tradeoff. Not our call to block it.Test plan
/code-review --model sonnet— all agents use Sonnet/code-review --model opus— all agents use Opus/code-review --model invalid— stops with "unknown model — valid values are haiku, sonnet, opus"/code-review(no flag) — per-step model selection unchanged