From 9a84c12be297727c8d785c68b2f1d6c8dfb6e81b Mon Sep 17 00:00:00 2001 From: lishuceo Date: Mon, 13 Jul 2026 16:16:53 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(code-review):=20add=20configur?= =?UTF-8?q?able=20model=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a `model` input (default `opus`) to the reusable code-review workflow so consumer repos can pick their review model without forking the workflow. Implements the `model` parameter from RFC 0001 Phase 1. `--model opus` becomes `--model ${{ inputs.model || 'opus' }}`; the `|| 'opus'` fallback keeps direct `pull_request` runs (where workflow_call inputs are unset) on opus. Backward compatible — existing callers default to opus. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/code-review.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index ae86002..02cdb7c 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -25,6 +25,11 @@ on: required: false default: true type: boolean + model: + description: Claude model alias (opus / sonnet / haiku) or full model ID. + required: false + type: string + default: opus secrets: ANTHROPIC_API_KEY: required: true @@ -145,7 +150,7 @@ jobs: - Brief overall assessment. # Tool surface: inline comments + read-only PR inspection + scoped gh api (PR comments + GraphQL only) + gh pr comment for summary. claude_args: | - --model opus + --model ${{ inputs.model || 'opus' }} --max-turns 256 --allowedTools "Read,Glob,Grep,mcp__github_inline_comment__create_inline_comment,Bash(gh api repos/*/pulls/*/comments*),Bash(gh api graphql*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr checks:*),Bash(git log:*),Bash(git blame:*),Bash(git diff:*)" env: