Uh oh!
There was an error while loading. Please reload this page.
Pin tool-capable OpenRouter free models in OpenCode review pool - #619
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Write trimmed provider API keys to llm_api_key_file in Strix workflow and lock this behavior in the workflow contract self-test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This reverts commit 7a92991.
The openrouter/free router selects arbitrary free models, most of which cannot produce the reviewer's structured control block, so every cycle failed with 'output did not include a valid control conclusion'. Pin nvidia/nemotron-3-ultra-550b-a55b:free (1M context) and poolside/laguna-m.1:free (262k) instead, update the openrouter provider model entries, and update all contract tests that pin the candidate list. Remove the temporary OpenRouter diagnostic workflow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Pins OpenRouter’s tool-capable free models in the OpenCode review model pool to avoid the nondeterministic openrouter/*/free router selecting models that can’t emit the required structured control block (which was causing repeated pool-cycle failures/timeouts).
Changes:
- Replace the OpenCode pool’s OpenRouter router candidate with two pinned OpenRouter free models and add an explicit
openrouterprovider block inopencode-review.yml. - Extend the OpenCode model-pool runner to skip
openrouter/*candidates whenOPENROUTER_API_KEYis not configured. - Update Strix workflow + self-test contracts to recognize OpenRouter (
openrouter/free) in the allowlist/errors and route provider-scoped key/base inputs accordingly.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/test_opencode_agent_contract.py | Updates contract expectations for OpenCode model candidates/provider blocks to include pinned OpenRouter models. |
scripts/ci/test_strix_quick_gate.sh | Updates Strix/OpenCode workflow contract assertions for OpenRouter strings/provider-mode routing and candidate lists. |
scripts/ci/strix_quick_gate.sh | Adjusts API-base resolution to support cross-provider fallback routing for github_models/* models (e.g., when primary uses OpenRouter). |
scripts/ci/run_opencode_review_model_pool.sh | Adds OpenRouter candidate detection + credential-missing skip logic. |
scripts/ci/emit_opencode_failed_check_fallback_findings.sh | Updates known-missing-string evidence matcher to the new Strix unsupported-model error text. |
requirements-strix-ci.txt | Adds an explicit pyasn1 pin. |
requirements-strix-ci-hashes.txt | Updates hash-locked pyasn1 version/hashes to match the new pin. |
.github/workflows/strix.yml | Adds OpenRouter provider-mode handling (secrets gating, key/base preparation, model file normalization) and updates error strings. |
.github/workflows/opencode-review.yml | Adds OpenRouter provider configuration + pinned free models, injects OPENROUTER_API_KEY, and updates OPENCODE_MODEL_CANDIDATES. |
Comments suppressed due to low confidence (1)
.github/workflows/strix.yml:612
- The “Prepare GitHub Models fallback credentials” step now runs for both direct-OpenAI and OpenRouter provider modes, but the inline comment + ::notice:: message still says “Direct-OpenAI” only. Also, the fallback token is written using the CR/LF-sanitized value rather than the trimmed value, which is inconsistent with the earlier LLM key handling and can break auth if the secret has leading/trailing whitespace.
if: steps.gate.outputs.provider_mode == 'openai_direct' || steps.gate.outputs.provider_mode == 'openrouter'
env:
GITHUB_MODELS_FALLBACK_TOKEN: ${{ secrets.STRIX_GITHUB_MODELS_TOKEN || github.token }}
run: |
# Direct-OpenAI scans keep GitHub Models candidates as fallbacks, so
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
8192 output tokens can truncate a long review before the control block, reproducing the exact no-control-conclusion failure this PR fixes. The live provider caps are 65536 (nemotron-3-ultra) and 32768 (laguna-m.1). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Why
After #614 landed, live review runs showed the
openrouter/openrouter/freecandidate failing every pool cycle withoutput did not include a valid control conclusion. Theopenrouter/freeslug is a router, not a model: it picks an arbitrary free model per request (observed: content-safety and small instruct models) that cannot produce the reviewer's required structured control block. With GitHub Models and direct OpenAI currently failing, this left the whole org review queue exhausting its 12000s budget per PR and returningMODEL_OUTPUT_UNAVAILABLE.What
openrouter/nvidia/nemotron-3-ultra-550b-a55b:free(1M context)openrouter/poolside/laguna-m.1:free(262k context)openrouterprovidermodelsblock inopencode-review.ymlaccordingly (tool_call enabled, real context limits).tests/test_opencode_agent_contract.py(candidate pairs + both exactOPENCODE_MODEL_CANDIDATESstrings) and the three assertions inscripts/ci/test_strix_quick_gate.sh.openrouter-diag.ymldiagnostic workflow used to root-cause the failure (free-tier 50 req/day limit, since resolved by purchasing credits; verifiedis_free_tier: falseand all OpenCode flag variants succeed).Strix is untouched: its opt-in
openrouter/freegate works via LiteLLM and stays as-is.Verification
test_opencode_model_pool_sets_high_effort_for_capable_candidates,test_workflow_provisions_sandbox_tool_and_reviewer_agent, job-timeout test).Note: this PR is reviewed by main's workflow, which still uses the failing router candidate; if review cannot conclude, admin intervention may be needed as with #614.