feat(project-router): native routing + drop invalid openrouter/free fallback#244
Merged
Merged
Conversation
Replace the AI-driven router (claude-code-action + custom prompt) with a deterministic actions/add-to-project step. The org board exposes only Status and Phase fields, so board membership is the meaningful action; the model, prompt, and token spend were unnecessary. Items route only when they carry a type:* label, preserving the original inclusion rule. An app installation token (org Projects: write) authorizes the org board write. Assisted-by: Claude:claude-opus-4-8
Remove the literal '|| openrouter/free' fallback from every AI workflow's model selection and collapse the phantom AI_MODEL_OPS/REVIEW/DOCS tier references (defined in no repo) down to vars.AI_MODEL. With AI_MODEL now an org-level variable, every repo inherits a valid model, so the literal fallback (an OpenRouter slug callers' keys can't access) is both unnecessary and harmful. Real tiers (CODE/ISSUES/PLAN) are retained as overrides. Assisted-by: Claude:claude-opus-4-8
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.
What
Two related changes:
project-router.ymlnow adds issues/PRs to the org board withactions/add-to-project@v1instead of runningclaude-code-actionagainst a custom prompt. The board exposes only Status and Phase fields (no Priority/Size/Type — the old prompt set fields that don't exist), so board membership is the only meaningful action. Items route only when they carry atype:*label (if:gate), preserving the original inclusion rule..github/prompts/project-router.mddeleted.|| 'openrouter/free'everywhere and collapse the phantomAI_MODEL_OPS/REVIEW/DOCStiers (defined in no repo) tovars.AI_MODEL. Real tiers (CODE/ISSUES/PLAN) retained as overrides.Why
docs / Project Routerhas failed 100% since ~2026-06-01: model resolved to the literalopenrouter/free, which the docs OpenRouter key can't access. Root cause is the per-repo model-variable fan-out (only 5 repos) leaving other callers with nothing to inherit. The companionterraform-githubPR makesAI_MODELan org-level variable so every repo inherits a valid model — making the literal fallback both unnecessary and harmful. Routing via an LLM for whatactions/add-to-projectdoes deterministically was also unnecessary token spend.The native router writes to an org Projects v2 board, which the default
GITHUB_TOKENcannot do. It mints an app token viaactions/create-github-app-token@v3(same pattern as therun-claude-codecomposite). The JacobPEvans-claude App must have organizationProjects: writepermission — please confirm/grant before relying on this. Without it,add-to-project403s.Sequencing
Merge after
terraform-github#9is applied and the orgAI_MODELvariable is live. Otherwise callers without a repo-level var get an empty--model. (The native project-router itself has no model dependency, so thedocsboard failure is fixed regardless.)Notes
claude-review.ymlis deprecated (disabled,if: false, marked for deletion). It only received the consistent one-line literal strip; its pre-existing actionlint findings (undeclared inputs in never-running jobs) are out of scope. Suggest a follow-up to delete it + its caller refs.Verification done
bun test: 147 pass / 0 fail.actionlint(run ad-hoc): changed workflows clean; only pre-existing findings in the deprecatedclaude-review.yml.openrouter/freeliteral or phantom-tier ref remains (the only match is a doc comment example insmoke-test.yml).Verification still needed (manual)
Projects: write, then open a test issue with atype:*label in a calling repo and confirm it lands on Project chore: finalize v0.0.1 release #1 "Server Infrastructure" and that an untyped item does not.🤖 Generated with Claude Code