Skip to content

Route four pinned Codex workflows with cost/economy model routing - #75470

Merged
SivaKesava1 merged 17 commits into
mainfrom
copilot/model-routing-cost-economy
Nov 7, 2026
Merged

SivaKesava1 merged 17 commits into
mainfrom
copilot/model-routing-cost-economy

Conversation

Copilot AI commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Four Codex workflows were pinned to large models and cost about 1,800 AIC/week, most of it Daily CLI Tools Tester. This PR replaces the pins with goal: cost, mode: economy model routing through the Copilot provider.

Workflow Provider Removed pin
daily-cli-tools-tester.md openai → github openai/gpt-6-astra
schema-consistency-checker.md openai → github openai/gpt-6.1-sol
daily-spending-forecast.md github (unchanged) copilot/gpt-6.1-sol
issue-triage-agent.md github (unchanged) copilot/gpt-6-sol

Why Copilot, not the OpenAI key

In AWF today, routing on the OpenAI key can only pick gpt-5.4: it's the only OpenAI model with effort levels in AWF's model data (github/gh-aw-firewall#10030). The first test runs here picked openai/gpt-5.4:xhigh for both OpenAI workflows (Schema Consistency Checker 89 AIC vs ~24 before). Copilot routing can pick from every Copilot model, including Luna.

Changes

  • Frontmatter: the model: pins are removed; each engine block is id: codex, model-provider: github, model-routing with goal: cost, mode: economy.
  • Permissions: copilot-requests: write added to Daily CLI Tools Tester and Schema Consistency Checker, so the run's own token can call Copilot models. This replaces use of the OpenAI key.
  • Locks: only these four were recompiled. Routing is on with no provider set (Copilot routing).
  • Test: TestModelRoutingCopilotLocksUnchanged now also checks each of the four locks keeps Copilot routing.

Test runs on this branch

Judge Daily CLI Tools Tester by its findings issue, not the run conclusion.

Copilot AI and others added 2 commits November 6, 2026 18:58
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Copilot AI changed the title [WIP] Update model routing for four pinned Codex workflows Route four pinned Codex workflows with cost/economy model routing Nov 6, 2026
Copilot AI requested a review from SivaKesava1 November 6, 2026 19:22
@SivaKesava1
SivaKesava1 marked this pull request as ready for review November 6, 2026 19:41
Copilot AI auto review requested due to automatic review settings November 6, 2026 19:41
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~1 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from PR Specification Reviewer · gpt56 · ~5 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷

Generated by PR Specification Reviewer for #75470

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate 🏗️ · routed: opus55 medium · ~12 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · routed: gpt56 max · ~2 AIC · ⌖ ~1 AIC · ⊞ 118 · ◷

Generated by Ponytail Reviewer for #75470

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the changed workflow routing declarations and associated test update. I found no actionable correctness, security, or maintainability issues in the changed lines. Static review only; repository tests were not run.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the economy-routing changes across the four Codex workflows.

No open issues 🎉

What changed in this PR

This PR extends gh-aw’s existing cost/economy model routing to four previously pinned Codex workflows, addressing #75469 while preserving their providers and reporting behavior.

Changes:

  • Replaces fixed models with goal: cost and mode: economy, leaving permissions, prompts, triggers, imports, and safe outputs unchanged.
  • Regenerates four locks with router setup, runtime model metadata, and default threat-detection model resolution.
  • Updates the routing regression test to recognize the two additional native OpenAI workflows.
File Description
pkg/​workflow/​model_routing_native_test.go Adds two OpenAI workflows to expected native routing providers.
.github/​workflows/​schema-consistency-checker.md Replaces the OpenAI model pin with economy routing.
.github/​workflows/​schema-consistency-checker.lock.yml Adds native OpenAI routing and runtime model reporting.
.github/​workflows/​issue-triage-agent.md Replaces the Copilot model pin with economy routing.
.github/​workflows/​issue-triage-agent.lock.yml Adds Copilot routing and runtime model reporting.
.github/​workflows/​daily-spending-forecast.md Replaces the Copilot model pin with economy routing.
.github/​workflows/​daily-spending-forecast.lock.yml Adds Copilot routing and runtime model reporting.
.github/​workflows/​daily-cli-tools-tester.md Replaces the OpenAI model pin with economy routing.
.github/​workflows/​daily-cli-tools-tester.lock.yml Adds native OpenAI routing and runtime model reporting.

Review effort: Balanced (auto)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /tdd (test coverage of the routing allowlist) and /diagnosing-bugs (checking the generated lock output). Verdict: COMMENT. The config changes look correct. One test gap and one open security alert need a decision before merge.

📋 Key Themes & Highlights

Key Themes

  • Test gap: TestModelRoutingCopilotLocksUnchanged checks the provider of each routed lock it finds, but never requires the four workflows in this PR to be routed. See the inline comment.
  • Open security alert (not blocking here): the "Prepare model-routing conversation" step writes the rendered prompt to /tmp/gh-aw/routing-conversation.json. That prompt can contain issue or PR text fetched through tools. The step is compiler-generated (pkg/workflow/model_routing.go) and already appears in base routed locks such as auto-triage-issues, so this PR does not add the pattern. It does newly apply it to daily-cli-tools-tester, which reads untrusted issue and PR content. Please resolve the alert or record why it is accepted. The pre-fetched alert text was truncated, so this is based on the lock file.

Verification

  • TestModelRoutingCopilotLocksUnchanged and TestNativeRoutingSmokeEvidence pass at PR head 6994471.
  • Recompiling the four workflows from a clean export of HEAD matches the committed locks, apart from cron scatter minutes.
  • The detection alias is defined in pkg/workflow/data/model_aliases.json, so threat detection resolves as the PR describes.

Positive Highlights

  • ✅ Frontmatter changes are minimal and match the existing routed workflows.
  • ✅ Test allowlist is updated in the same commit as the locks.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~1 AIC · ⊞ 5.4K
Comment /matt to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/model_routing_native_test.go:325): [/tdd] The routed-lock check is global: routed counts matches across all locks, and a lock with no routing is skipped. If daily-cli-tools-tester.lock.yml or schema-consistency-checker.lock.yml silently lost routing, this test would still pass. Assert that each routed lock matches, with its expected provider. - Route four pinned Codex workflows with cost/economy model routing #75470 (comment)
  3. Fix failing check safe_outputs (FAILURE): https://github.com/github/gh-aw/actions/runs/42286237477/job/128144794051.

Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI.

Sous-chef requested-head: 6994471
Sous-chef requested-work: b6db4f4a8b14e7f73161bba01933490445b5d1bdbded2d23a5e4cbc5b38ffcc1 c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e
Sous-chef requested-state: 2f911b88e99c46e9c3306082e566498dae61afd74e9aa8b05b4a6e2827666b13

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~11 AIC · ⌖ ~11 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

Copilot AI commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@copilot

Copilot assignment requested for the following outstanding work:...

Work in progress:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Assert that each expected routed lock matches its expected provider.
  3. Investigate and fix the failing safe_outputs check.

Sous-chef requested-head: 6994471
Sous-chef requested-work: b6db4f4a8b14e7f73161bba01933490445b5d1bdbded2d23a5e4cbc5b38ffcc1 c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e
Sous-chef requested-state: 2f911b88e99c46e9c3306082e566498dae61afd74e9aa8b05b4a6e2827666b13

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI and others added 2 commits November 6, 2026 22:09
…-cost-economy

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
…rge main; recompile

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>

Copilot AI commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Switching Daily CLI Tools Tester and Schema Consistency Checker to Copilot routing (model-provider: github) instead of the OpenAI key.

Why: on the OpenAI key, AWF can only route to gpt-5.4, becau...

Done in f86614d. daily-cli-tools-tester and schema-consistency-checker now use model-provider: github and have copilot-requests: write added. They still use id: codex with economy cost routing. The native allowlist matches main again, and the per-lock subtest now expects "" for both. I merged main and recompiled.

All four locks now have apiProxy.routing with no provider. The two locks only list OPENAI_API_KEY under --exclude-env, the same as daily-spending-forecast.lock.yml. go test ./pkg/workflow -run 'TestModelRouting|TestNativeRouting' and make agent-report-progress both pass.

make recompile removes the unused docker/login-action@v4.8.0 pin from .github/aw/actions-lock.json. That isn't part of this fix, so I reset the file to main. This also undoes the removal an earlier commit on this branch had made. git diff --name-only origin/main...HEAD now lists only the four workflows' .md/.lock.yml files and the test.

CI on the new commit has only just started, so no failures yet. The CodeQL check timed out and didn't produce results.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check conclusion (FAILURE): https://github.com/github/gh-aw/actions/runs/42313887602/job/128225863656.

Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI.

Sous-chef requested-head: f86614d
Sous-chef requested-work: 51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf
Sous-chef requested-state: ac0e75a8a4d48e976b7108f5a3f26d3c1423d56d329cc8e23e7949c1add6b587

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~6 AIC · ⌖ ~9 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

Copilot AI commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot

Copilot assignment requested for the following outstanding work:...

Work in progress:

  1. Update this branch with the latest main using make merge-main, resolving conflicts and preserving the intended changes.
  2. Investigate and fix the failing conclusion check.

Sous-chef requested-head: f86614d
Sous-chef requested-work: 51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf
Sous-chef requested-state: ac0e75a8a4d48e976b7108f5a3f26d3c1423d56d329cc8e23e7949c1add6b587

Copilot AI and others added 2 commits November 7, 2026 00:19
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…-cost-economy

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
GH_AW_ROUTING_PROMPT: /tmp/gh-aw/aw-prompts/user.txt
GH_AW_ROUTING_PROMPT_FALLBACK: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_ROUTING_CONVERSATION_FILE: /tmp/gh-aw/routing-conversation.json
run: node -e "const fs=require('node:fs'); const path=require('node:path'); const readPrompt=file=>{try{return fs.readFileSync(file,'utf8');}catch(error){if(error.code==='ENOENT')return '';throw error;}}; let prompt=readPrompt(process.env.GH_AW_ROUTING_PROMPT); if (!prompt.trim()) prompt=readPrompt(process.env.GH_AW_ROUTING_PROMPT_FALLBACK); if (!prompt.trim()) throw new Error('Rendered workflow prompt is empty; cannot route this task'); const destination=process.env.GH_AW_ROUTING_CONVERSATION_FILE; fs.mkdirSync(path.dirname(destination),{recursive:true,mode:0o700}); fs.writeFileSync(destination,JSON.stringify([{role:'user',parts:[{text:prompt}]}]),{mode:0o600});"
Copilot AI and others added 3 commits November 7, 2026 00:30
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@SivaKesava1

Copy link
Copy Markdown
Collaborator

The failing conclusion check came from our manual test run of Daily CLI Tools Tester on this branch (run 42313887602). That workflow often ends with report_incomplete, and this run still published its findings issue (#75504). It isn't a CI failure caused by this PR, so it doesn't need a fix here.

Please undo the changes made for it, and keep this PR to the routing change:

  1. Revert commit 2805816: the daily-cli-tools-tester.md prompt change, its lock changes, and the new pkg/workflow/daily_cli_tools_tester_policy_test.go.
  2. Make .github/aw/actions-lock.json identical to main.
  3. Run make merge-main (main has new compiler changes, for example Use effective runner identity and owner-only configs for safeoutputs #75443 and Decouple rootless CLI installation from runner topology #75445), then make recompile.

Afterwards the PR should change only the four workflows' .md and .lock.yml files and pkg/workflow/model_routing_native_test.go.

id: pre_agent_audit
continue-on-error: true
run: bash "${RUNNER_TEMP}/gh-aw/actions/audit_pre_agent_workspace.sh"
- name: Prepare model-routing conversation
Copilot AI and others added 2 commits November 7, 2026 00:52
…kflows"

This reverts commit 2805816.

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
…-cost-economy

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>

Copilot AI commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

The failing conclusion check came from our manual test run of Daily CLI Tools Tester on this branch (run 42313887602). That workflow often...

Done in b4971e1 (revert of 2805816) and 5b0fd45 (merge of main, then recompile). actions-lock.json now matches main. The diff against main lists only the 4 workflow .md/.lock.yml pairs and model_routing_native_test.go. Recompiling gives no diff, and go test ./pkg/workflow -run 'TestModelRouting|TestNativeRouting' passes.

id: pre_agent_audit
continue-on-error: true
run: bash "${RUNNER_TEMP}/gh-aw/actions/audit_pre_agent_workspace.sh"
- name: Prepare model-routing conversation
…-cost-economy

# Conflicts:
#	.github/workflows/daily-cli-tools-tester.lock.yml
#	.github/workflows/daily-spending-forecast.lock.yml
#	.github/workflows/issue-triage-agent.lock.yml
#	.github/workflows/schema-consistency-checker.lock.yml

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
@SivaKesava1
SivaKesava1 merged commit 0379ea6 into main Nov 7, 2026
46 of 47 checks passed
@SivaKesava1
SivaKesava1 deleted the copilot/model-routing-cost-economy branch November 7, 2026 01:51
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.

Model routing: route four pinned Codex workflows with economy

5 participants