#217 Make PR reviewer provider-switchable (OpenRouter/Qwen default)#218
Merged
Conversation
This was referenced Apr 14, 2026
Closed
This was referenced Apr 15, 2026
9 tasks
9 tasks
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
Closes #217. Replaces the hardcoded Claude Sonnet reviewer with a provider-switchable setup. Defaults to Qwen3.6 Plus via OpenRouter (Anthropic-compatible
/v1/messagesendpoint); flipAI_REVIEW_PROVIDER=anthropicin repo Variables to revert.AI_REVIEW_PROVIDER(openrouterdefault |anthropic),AI_REVIEW_MODEL(optional model override per provider).CLAUDE_REVIEW→AI_REVIEWso the name is vendor-neutral.claude-code-review.ymlvalidates that the required secret is non-empty before the action runs — prevents the Anthropic key from being sent toopenrouter.aiifOPENROUTER_API_KEYis missing.OPENROUTER_API_KEY(documented in.env.exampleandREADME.md).Changes
.vars.example— renameCLAUDE_REVIEW→AI_REVIEW; addAI_REVIEW_PROVIDER,AI_REVIEW_MODEL..env.example— addOPENROUTER_API_KEYplaceholder..github/workflows/claude-code-review.yml— resolver step branches on provider, setsANTHROPIC_BASE_URL, picks the right secret, and passes the right--model.README.md— rename gate in catalog + table, add rows for the two new variables, documentOPENROUTER_API_KEY.Rollout prerequisites (done before merge)
OPENROUTER_API_KEYsecret createdAI_REVIEW=truerepo variable created;CLAUDE_REVIEWdeletedAI_REVIEW_PROVIDER=openrouterandAI_REVIEW_MODEL=qwen/qwen3.6-plussetTest plan
claude-code-review.ymlwith the new defaults — confirm theResolve reviewer provider settingsstep outputsprovider=openrouter,model=qwen/qwen3.6-plus,base_url=https://openrouter.ai/api/v1(Failed pre-flight on run 24405785979; root cause addressed in [bug] PR reviewer fails with "model not found" when ANTHROPIC_BASE_URL points to OpenRouter #220/#220 Fix PR reviewer — ANTHROPIC_DEFAULT_*_MODEL + Bearer auth via direct vars #221/#220 Pass proxy key via anthropic_api_key to satisfy action pre-flight #222.)anthropics/claude-code-action@v1step completes without a 401/404A formal(Not on this PR. First Qwen verdict on PR #145 Add quality-metrics MCP server #219 came after the [bug] PR reviewer fails with "model not found" when ANTHROPIC_BASE_URL points to OpenRouter #220/#220 Fix PR reviewer — ANTHROPIC_DEFAULT_*_MODEL + Bearer auth via direct vars #221/#220 Pass proxy key via anthropic_api_key to satisfy action pre-flight #222/#223 Sharpen PR reviewer prompt — imperative framing for autonomous agents #224/#223 Require binary reviewer verdict — --comment reserved for drafts only #225 chain.)gh pr reviewverdict is posted on this PR by the Qwen-backed reviewerTemporarily flip(Var removed by [bug] PR reviewer fails with "model not found" when ANTHROPIC_BASE_URL points to OpenRouter #220.)AI_REVIEW_PROVIDER=anthropic, push a trivial commit, confirmmodel=claude-sonnet-4-6,base_url=(empty), review still worksTemporarily set(Var removed by [bug] PR reviewer fails with "model not found" when ANTHROPIC_BASE_URL points to OpenRouter #220.)AI_REVIEW_MODEL=qwen/qwen3-coder, confirm resolver honors the overrideRestore production settings ((Vars removed by [bug] PR reviewer fails with "model not found" when ANTHROPIC_BASE_URL points to OpenRouter #220.)AI_REVIEW_PROVIDER=openrouter,AI_REVIEW_MODELempty orqwen/qwen3.6-plus)grep -rn CLAUDE_REVIEW(excluding.claude/worktrees/) returns no hitsAssumptions flagged for verification
anthropics/claude-code-action@v1forwards theANTHROPIC_BASE_URLenv var into the Claude Code runtime./v1/messagesendpoint acceptsqwen/qwen3.6-plus(Anthropic-compatible routing).mcp__github_inline_comment__create_inline_commentandBash(gh pr review:*)).If any of these fail during the Test plan checks, the fallback is a custom Python script (
scripts/pr-review.py) following theself-healing.pydispatch pattern.