Skip to content

feat(review): add keyless OmniRoute free-gateway provider to the OpenCode review pool - #675

Open
seonghobae wants to merge 1 commit into
mainfrom
claude/contextualwisdomlab-audit-governance-fb7470
Open

feat(review): add keyless OmniRoute free-gateway provider to the OpenCode review pool#675
seonghobae wants to merge 1 commit into
mainfrom
claude/contextualwisdomlab-audit-governance-fb7470

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Problem

The central OpenCode review pool depends on provider keys / free tiers that can lapse — GitHub Models retirement (2026-07-30), or unset OPENAI_API_KEY / OPENROUTER_API_KEY. When they all lapse the pool reports OPENCODE_MODEL_POOL_OUTCOME: exhausted, so no PR org-wide can produce opencode-review approval evidence and the whole queue freezes.

Fix — a keyless recovery path

Add OmniRoute (the org's free OpenAI-compatible gateway, ContextualWisdomLab/OmniRoute) as a keyless provider in the OpenCode review model pool, so the pool has a working model with no per-provider secret required.

  • enabled_providers gains "omniroute"; a new "omniroute" provider block (@ai-sdk/openai-compatible, model auto, tool_call: true, 200000/32768 limit) resolves its base URL from the org variable OMNIROUTE_API_BASE_URL and an optional OMNIROUTE_API_KEY secret — keyless by default, never a hardcoded endpoint.
  • omniroute/auto is appended to the public-only segment of OPENCODE_MODEL_CANDIDATES (never the private-repo segment). A free gateway with best-effort upstreams must not see private-repo code — this matches the existing opencode-free gating.
  • run_opencode_review_model_pool.sh skips omniroute candidates when OMNIROUTE_API_BASE_URL is unset (fail-safe fall-through) and caps its runtime with the bounded free-provider failover window.
  • Contract tests updated to pin the new provider, candidate, env wiring, and skip behavior.

Activation (org-side, not code)

  1. Set vars.OMNIROUTE_API_BASE_URL to the OmniRoute deployment (the Fly app omniroute).
  2. OmniRoute should front at least one tool-calling-capable upstream so the reviewer can emit a structured verdict (the raw reverse-engineered keyless upstreams alone cannot reliably tool-call).
  3. OMNIROUTE_API_KEY is optional — set it only if your deployment requires a caller token.

This is an independent, keyless alternative to the keyed NVIDIA NIM path in #672; either can restore the pool. Like any change to .github, it only takes effect once merged to main.

Why it's safe

Additive, fail-safe, and public-repo-gated. If the base URL var is unset the provider is skipped and the pool falls through unchanged — it cannot break an existing pipeline.

Verification

  • coverage run -m pytest tests712 passed, coverage report100% (fail_under=100).
  • interrogate100.0%.
  • bash scripts/ci/test_strix_quick_gate.shPASS.

🤖 Generated with Claude Code

https://claude.ai/code/session_016wtuYFp4E22QnEU1bFMhsr


Generated by Claude Code

…Code review pool

The central OpenCode review pool depends on provider keys / free tiers that can
lapse (GitHub Models retirement, unset OPENAI/OPENROUTER secrets), which starves
the pool of any working model and leaves every PR's opencode-review unable to
produce approval evidence. Add OmniRoute — the org's free OpenAI-compatible
gateway — as a keyless recovery path that needs no per-provider secret.

- enabled_providers gains "omniroute"; a new "omniroute" provider block
  (@ai-sdk/openai-compatible, model "auto", tool_call, 200000/32768 limit)
  resolves its base URL from the org variable OMNIROUTE_API_BASE_URL and an
  optional OMNIROUTE_API_KEY secret — keyless by default.
- omniroute/auto is appended to the public-only segment of
  OPENCODE_MODEL_CANDIDATES (never the private-repo segment): a free gateway
  with best-effort upstreams must not see private-repo code, matching the
  existing opencode-free gating.
- run_opencode_review_model_pool.sh skips omniroute candidates when
  OMNIROUTE_API_BASE_URL is unset (fail-safe fall-through) and caps its runtime
  with the bounded free-provider failover window.
- Contract tests (test_opencode_agent_contract.py, test_opencode_model_pool_runner.py,
  test_strix_quick_gate.sh) updated to pin the new provider, candidate, env
  wiring, and skip behavior.

Activation requires the org to set vars.OMNIROUTE_API_BASE_URL to its OmniRoute
deployment; OmniRoute should front at least one tool-calling-capable upstream so
the reviewer can emit a structured verdict.

Verified: coverage run -m pytest tests -> 712 passed, coverage 100% (fail_under=100),
interrogate 100%, scripts/ci/test_strix_quick_gate.sh PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016wtuYFp4E22QnEU1bFMhsr
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 83c28870-4b1b-454b-84d5-d8f313ab0b2a

📥 Commits

Reviewing files that changed from the base of the PR and between 32973e9 and 22d367b.

📒 Files selected for processing (5)
  • .github/workflows/opencode-review-dispatch.yml
  • scripts/ci/run_opencode_review_model_pool.sh
  • scripts/ci/test_strix_quick_gate.sh
  • tests/test_opencode_agent_contract.py
  • tests/test_opencode_model_pool_runner.py

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants