Skip to content

Move the five OpenRouter workflows back to the Copilot engine - #424

Closed
theletterf wants to merge 2 commits into
mainfrom
fix/move-openrouter-workflows-to-copilot
Closed

theletterf wants to merge 2 commits into
mainfrom
fix/move-openrouter-workflows-to-copilot

Conversation

@theletterf

@theletterf theletterf commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Platform engineering plans to move users from OpenRouter to Agent Router by the end of next week, and nobody has confirmed what happens to OpenRouter after that. Agent Router can authenticate GitHub Actions through workload identity federation, but it speaks only the OpenAI protocol, so the three Claude-engine workflows cannot move as they are. I wanted a fallback that does not depend on either date.

Nine of our fourteen gh-aw workflows already run on the Copilot engine with github.token. This PR moves the other five there:

Workflow Before After
gh-aw-issue-triage, gh-aw-issue-auto-triage Claude engine, Haiku 5.5 through OpenRouter Copilot, claude-haiku-4.5
gh-aw-issue-scope Codex engine, gpt-6-luna through OpenRouter Copilot, claude-sonnet-5
gh-aw-project-metadata Codex engine, gpt-6-luna through OpenRouter Copilot, claude-sonnet-5
gh-aw-docs-review Claude engine, Sonnet 5.5 through OpenRouter Copilot, claude-sonnet-5

I first tried gpt-5-mini for triage and gpt-5.3-codex for project-metadata. In the sandbox, every GPT request got 400 Bad Request from api.githubcopilot.com on the Responses path, while Claude models worked, so all three cheap slots now use Claude. Copilot serves claude-haiku-4.5 but not Haiku 5.5, so triage drops a model generation. Project-metadata uses claude-sonnet-5 because I could not test it, and it changes board fields on real events.

What I removed: the OpenRouter keys, base URLs and attribution headers, the AWF price-table overrides that only existed for the OpenRouter slugs, the Codex engine.config and -c workarounds, the empty provider variables that kept threat detection alive, and openrouter.ai, api.anthropic.com and ab.chatgpt.com from the network allowlists. The docs-review prompt now reads its six skills from .github/skills/, where gh-aw installs them for the Copilot engine, and tools.edit: false replaces the Claude --disallowed-tools rule.

Callers keep working. The triage, auto-triage, project-metadata and docs-review callers in docs-content, docs-content-internal and docs-eng-team pass ANTHROPIC_API_KEY or OPENROUTER_API_KEY explicitly, and a secret that a reusable workflow does not declare fails the caller at startup. The workflows still declare those secrets as optional and unused, so no caller needs an edit. The scope callers use secrets: inherit. The oblt-aw menus pass no secrets, so they should now work, where on OpenRouter they could not.

Things you should know before merging:

  • Per-run cost from OpenRouter generation records goes away. Only gh-aw's AIC estimate remains, and it overstates real spend.
  • Copilot usage now counts against the shared Copilot allowance, and we do not know how big it is. Scope and docs-review are the heaviest workflows and now join that pool.
  • Triage and auto-triage keep threat-detection.engine: false. I did not re-enable detection, because it adds Copilot spend to a label-only workflow.
  • edit: false removes the write tool from docs-review. Shell access can still change the checkout, but the workflow has contents: read and no push output, so nothing can land.
  • Merging changes nothing for callers. They pick this up when a release moves v1.

Testing, in elastic/docs-actions-sandbox, with callers pointed at this branch. I did not change the callers' secrets, so the run also shows the old explicit secrets are accepted:

Workflow Result
Triage, /triage on #117 and #112 Passed. triaged plus type, team and board labels. Served by claude-haiku-4.5.
Auto-triage on #260 and #261 Passed. The well-formed issue got Team:SKI, area:fleet, priority:high, release:9.2. The vague one got only human-needed.
Scope on #251 and #252 Passed, with detection. 🟠 on an issue whose premise the source code contradicts. 🔴 with a gap list on a vague issue.
Docs review on sandbox PR #253 Passed, with detection. Skills were read from .github/skills/, and 37 requests were served by claude-sonnet-5. It posted 2 action items and 3 inline comments. That looks thin for the planted defects, and I have no OpenRouter baseline.
Project-metadata Not tested. The sandbox has no PROJECT_TOKEN.

One behavior to review: the standing issue #112 ("Update the Fleet docs", almost no detail) was routed to Team:SKI instead of human-needed. The new Haiku 4.5 triage reads "Fleet" as enough to route.

Caching works under Copilot: the triage run read 54k cached tokens, so the AWF cache-miss breaker did not trip.

Related to elastic/docs-eng-team#1056

🤖 Generated with Claude Code

Triage, auto-triage, scope, project-metadata and docs-review now run on the
Copilot engine with github.token, like the other nine workflows. This removes
the OpenRouter keys, base URLs, attribution headers and AWF pricing overrides,
and drops openrouter.ai and api.anthropic.com from the network allowlists.

The workflows still declare ANTHROPIC_API_KEY or OPENROUTER_API_KEY as unused
optional secrets, so callers that pass them explicitly do not fail at startup.

Related to elastic/docs-eng-team#1056

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

Label error. Requires exactly 1 of: automation, breaking, bug, changelog:skip, chore, ci, dependencies, documentation, enhancement, feature, fix. Found:

The GPT models fail on the Copilot Responses path in the sandbox: the first
request returns 400 Bad Request from api.githubcopilot.com. Claude models
work, and Copilot serves claude-haiku-4.5 but not Haiku 5.5.

Related to elastic/docs-eng-team#1056

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@theletterf

Copy link
Copy Markdown
Member Author

Closing for now. The Agent Router workflows (#426) are released on v1 and tested in production, so this Copilot fallback is not needed today. The branch is deleted; reopen from the PR history if we need to fall back.

@theletterf theletterf closed this Oct 26, 2026
@theletterf
theletterf deleted the fix/move-openrouter-workflows-to-copilot branch October 26, 2026 10:39
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.

1 participant