feat(review): add keyless OmniRoute free-gateway provider to the OpenCode review pool - #675
feat(review): add keyless OmniRoute free-gateway provider to the OpenCode review pool#675seonghobae wants to merge 1 commit into
Conversation
…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
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Comment |
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 reportsOPENCODE_MODEL_POOL_OUTCOME: exhausted, so no PR org-wide can produceopencode-reviewapproval 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_providersgains"omniroute"; a new"omniroute"provider block (@ai-sdk/openai-compatible, modelauto,tool_call: true, 200000/32768 limit) resolves its base URL from the org variableOMNIROUTE_API_BASE_URLand an optionalOMNIROUTE_API_KEYsecret — keyless by default, never a hardcoded endpoint.omniroute/autois appended to the public-only segment ofOPENCODE_MODEL_CANDIDATES(never the private-repo segment). A free gateway with best-effort upstreams must not see private-repo code — this matches the existingopencode-freegating.run_opencode_review_model_pool.shskips omniroute candidates whenOMNIROUTE_API_BASE_URLis unset (fail-safe fall-through) and caps its runtime with the bounded free-provider failover window.Activation (org-side, not code)
vars.OMNIROUTE_API_BASE_URLto the OmniRoute deployment (the Fly appomniroute).OMNIROUTE_API_KEYis 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 tomain.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 tests→ 712 passed,coverage report→ 100% (fail_under=100).interrogate→ 100.0%.bash scripts/ci/test_strix_quick_gate.sh→ PASS.🤖 Generated with Claude Code
https://claude.ai/code/session_016wtuYFp4E22QnEU1bFMhsr
Generated by Claude Code