Skip to content

Add OpenRouter free model support to Strix and OpenCode review#614

Merged
seonghobae merged 6 commits into
mainfrom
seonghobae-add-openrouter-free-model-support
Jul 23, 2026
Merged

Add OpenRouter free model support to Strix and OpenCode review#614
seonghobae merged 6 commits into
mainfrom
seonghobae-add-openrouter-free-model-support

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Why

OpenCode review and Strix model gating only supported GitHub Models, direct OpenAI, and approved Vertex inputs. We need explicit support for OpenRouter's free endpoint (openrouter/free) so CI review/scanning can route through it when configured.

What changed

  • Added OpenRouter provider wiring to OpenCode review workflow config generation:
    • enabled provider list now includes openrouter
    • provider config uses https://openrouter.ai/api/v1 with OPENROUTER_API_KEY
    • added openrouter/free model and inserted openrouter/openrouter/free into OPENCODE_MODEL_CANDIDATES
  • Updated OpenCode model-pool runner to skip OpenRouter candidates when OPENROUTER_API_KEY is absent, matching existing provider-qualified skip behavior.
  • Extended Strix workflow gate/model handling to accept openrouter/free (and openrouter/openrouter/free), route it through provider_mode=openrouter, require OPENROUTER_API_KEY, and prepare OpenRouter API base input files.
  • Kept fallback behavior aligned by allowing the existing GitHub Models fallback credential path for OpenRouter runs.
  • Updated Strix/OpenCode contract strings and model list assertions in the workflow-adjacent test/contract files to match the new allowed model/provider surface.

Notes for reviewers

  • The unsupported-model error contract text was intentionally expanded to include OpenRouter so downstream failure-diagnosis checks and static contract assertions stay in sync.
  • Runtime behavior remains fail-closed for missing provider credentials.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 23, 2026 01:46
@seonghobae
seonghobae enabled auto-merge (squash) July 23, 2026 01:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the org’s CI review/scanning infrastructure to explicitly support OpenRouter’s free endpoint (openrouter/free) across both OpenCode review model selection and Strix model gating, updating workflow wiring and contract/self-test assertions so the new provider/model surface is treated as first-class.

Changes:

  • Added openrouter as an enabled provider in the OpenCode review workflow configuration and declared the openrouter/free model with OPENROUTER_API_KEY.
  • Updated the OpenCode model-pool runner to skip OpenRouter candidates when OPENROUTER_API_KEY is not configured (mirroring existing provider-qualified skip behavior).
  • Extended Strix workflow gating to accept openrouter/free / openrouter/openrouter/free, require OPENROUTER_API_KEY, and write an OpenRouter API base input file; updated related contract/self-test strings.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_opencode_agent_contract.py Updates OpenCode workflow contract expectations to include the OpenRouter provider and candidate model.
scripts/ci/test_strix_quick_gate.sh Updates Strix/OpenCode workflow self-test assertions to include OpenRouter wording and model candidates.
scripts/ci/run_opencode_review_model_pool.sh Adds OpenRouter candidate detection and skip-on-missing-key behavior.
scripts/ci/emit_opencode_failed_check_fallback_findings.sh Updates known-missing-string findings to match expanded Strix unsupported-model contract text.
.github/workflows/strix.yml Adds OpenRouter model gating, key requirements, API base preparation, and provider-mode routing for Strix.
.github/workflows/opencode-review.yml Enables the OpenRouter provider and adds openrouter/free to the OpenCode model candidate pool and secrets environment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/strix.yml
@opencode-agent
opencode-agent Bot disabled auto-merge July 23, 2026 01:58
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 23, 2026 02:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread scripts/ci/test_strix_quick_gate.sh
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 23, 2026 02:05
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread requirements-strix-ci.txt Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 23, 2026 02:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/strix.yml
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>
Copilot AI review requested due to automatic review settings July 23, 2026 02:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

@seonghobae
seonghobae merged commit 2347847 into main Jul 23, 2026
57 checks passed
@seonghobae
seonghobae deleted the seonghobae-add-openrouter-free-model-support branch July 23, 2026 03:46
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