Skip to content

Route Agent Persona Explorer with economy model routing - #74619

Merged
SivaKesava1 merged 2 commits into
mainfrom
copilot/model-routing-agent-persona-explorer
Nov 3, 2026
Merged

SivaKesava1 merged 2 commits into
mainfrom
copilot/model-routing-agent-persona-explorer

Conversation

Copilot AI commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Agent Persona Explorer runs on Claude Code's default model, claude-sonnet-5, at about 116 AIC per run. It only files an issue with its findings, so it can use economy model routing. The issue estimates this saves about 550–680 AIC per week.

Workflow change (agent-persona-explorer.md)

engine:
  id: claude
  model-provider: github
  model-routing:
    goal: cost
    mode: economy
permissions:
  # ...
  copilot-requests: write

The prompt, triggers, sub_agent_strategy experiment, cache-memory, safe outputs and the persona-evaluator sub-agent (model: inherit) are unchanged. No model is pinned, and no allowed or blocked models are added.

Lock-file changes

  • Routing enabled:
    • The agent's AWF config sets experimental.modelRouting: true, and the agent environment sets GH_AW_MODEL_ROUTING: 1.
    • aw_info records routing: {enabled: true, goal: cost, mode: economy}.
    • A new step, "Prepare model-routing conversation", runs before the agent.
    • The router image is pinned: ghcr.io/github/gh-aw-firewall/router:0.29.6@sha256:fce2f3be….
  • Inference moves to Copilot:
    • Claude Code uses COPILOT_GITHUB_TOKEN: ${{ github.token }} instead of ANTHROPIC_API_KEY.
    • GH_AW_LLM_PROVIDER is now github, and ANTHROPIC_BASE_URL points at the api-proxy.
    • The ANTHROPIC_API_KEY validation step and its secret_verification_result output are removed.
    • copilot-requests: write is added to the agent, detection and conclusion jobs.
  • Model pin removed:
    • The GH_AW_MODEL_AGENT_CLAUDE … 'claude-sonnet-5' default is gone.
    • The agent job now outputs model, model_effort and model_routing_status from the routed run.
    • A "Restore runtime model metadata" step is added, and the routing artifacts are uploaded.
  • Threat detection: this workflow never pinned a detection model, so the detection model line is unchanged. Detection, conclusion and the decisions API now use github.token instead of secrets.COPILOT_GITHUB_TOKEN.

Notes

  • The compiler warns that the sub-agent's model: inherit "may be incompatible with the claude engine's model-routing API." The issue expects the sub-agent to follow the routed model, so it is left as is. The first routed runs should confirm this.
  • Follow-up, not part of this PR: the issue's "Check" section. Audit the first routed runs with gh aw audit against about 116 AIC/run. If the filed issues get thinner, switch to mode: balanced. To roll back, revert this PR.
  • Failures also present without this PR:
    • golint fails on main with the same lint findings in pkg/cli/update_*.go.
    • make fix fails on a codemod error in sighthound-security-scan.md.

Copilot AI changed the title [WIP] Update model routing for Agent Persona Explorer Route Agent Persona Explorer with economy model routing Nov 3, 2026
Copilot AI requested a review from SivaKesava1 November 3, 2026 21:19
@SivaKesava1
SivaKesava1 marked this pull request as ready for review November 3, 2026 21:34
Copilot AI adaptive review requested due to automatic review settings November 3, 2026 21:34
@github-actions

github-actions Bot commented Nov 3, 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 commented Nov 3, 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 3, 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 xhigh · ~12 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 3, 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 #74619

@github-actions

github-actions Bot commented Nov 3, 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 · haiku45 · ~6 AIC · ⌖ ~12 AIC · ⊞ 9.4K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-03T21:40:33Z
review_event: COMMENT
top_themes: [model-routing compatibility, sub-agent inheritance validation]
files_reviewed: [.github/workflows/agent-persona-explorer.md, .github/workflows/agent-persona-explorer.lock.yml]
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

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

@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.

Review complete. One actionable compatibility risk found: the new Claude model-routing configuration leaves the existing model: inherit sub-agent contract unverified, despite the compiler warning that it may be incompatible with routed inference. Please pin or explicitly validate the sub-agent path before relying on its evaluation results.

Review details
  • Inline comments: 1
  • Specialist pass: completed; its stale-lock concern was discarded because the generated lock file is present in the changed-file set and excluded from the pre-fetched diff.
  • No tests were run; this was a static review.

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

on: daily
max-daily-ai-credits: 10000
engine: claude
engine:

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.

The new routed Claude engine leaves the existing persona-evaluator sub-agent on model: inherit, which the compiler already warns may be incompatible with the Claude model-routing API and can make every scenario evaluation fail or fall back unexpectedly.

💡 Make the sub-agent routing contract explicit

Pin the sub-agent to a model supported by this routed Claude configuration, or add a routed smoke/acceptance check that exercises the sub-agent and fails clearly before relying on its results. This workflow's output quality and baseline completion depend on those evaluations succeeding.

@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 /grill-with-docs to the routing change. Observations only, no blocking defects found in the .md source.

📋 Key Themes & Highlights

Key Themes

  • Experiment confounding: sub_agent_strategy measures aic, and routing changes AIC per run. Pre- and post-routing runs will not be comparable unless the experiment is restarted or stratified.
  • Quality guardrail gap: output_quality_score is tracked but has no threshold, so economy routing could degrade output without tripping any guardrail.
  • Unverified lock file: I could not read the PR-head agent-persona-explorer.lock.yml. The local checkout is at an older .md revision, and the API returned an empty result. The lock-file claims in the PR body are unverified here.

Positive Highlights

  • ✅ The engine block and model-routing values (goal: cost, mode: economy) match the schema.
  • ✅ copilot-requests: write is the documented way to use Copilot inference without a separate secret.
  • ✅ Rollback is simple, and the PR body states the follow-up audit plan.

Open question (not blocking)

  • The sub-agent persona-evaluator uses model: inherit. The compiler warns this may conflict with the routing API. The PR body acknowledges it, so confirm it on the first routed run.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~4 AIC · ⌖ ~1 AIC · ⊞ 5.4K
Comment /matt 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.

🟡 Changes recommended

An optional documentation correction remains: the description incorrectly names conclusion instead of evals for the permission and token changes.

1 open issue
What changed in this PR

Moves Agent Persona Explorer to economy model routing through GitHub Copilot to reduce inference costs, addressing #74613 while preserving its prompt, experiment, sub-agent configuration and safe outputs.

Changes:

  • Configure cost-focused routing and the required Copilot request permission without pinning a model.
  • Regenerate the workflow lock with router setup, token-based authentication, runtime model metadata and routing artifacts.
File Description
.github/​workflows/​agent-persona-explorer.md Enables GitHub-backed economy routing and Copilot request permission.
.github/​workflows/​agent-persona-explorer.lock.yml Updates generated execution, authentication and reporting for routed runs.

Review effort: Max (auto)

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Note

The pull request was not created — a fallback review issue was created instead due to protected file changes: #74654

PR finisher

  • Merged main locally (clean).
  • Set persona-evaluator sub-agent to model: claude-sonnet-5 (was inherit) to address the model-routing compatibility review. Submitted for publication, not confirmed pushed. Lock files were left out of the submission, so make recompile is a maintainer follow-up.
  • Validation: make recompile ran. The persona-explorer workflow compiled without the incompatibility warning. I did not run make agent-report-progress.
  • Review thread reply and resolution are deferred until the fix is published.
  • Remaining: maintainer CI re-trigger after publication.

Sous-chef head: f32d76f
Sous-chef work: 03d38c0a907428c014f7326393b07597c4977cb89cd38fa62fe2e3bdbcb2702a
Sous-chef state: 624178559ea2b73631dff602f75d5c126474483babdb02638bbd7e2f4177fbd3

Generated by 🏁 PR Finisher · copilot · auto · ~24 AIC · ⌖ ~2 AIC · ⊞ 10.7K · ◷

@SivaKesava1
SivaKesava1 merged commit 846632a into main Nov 3, 2026
96 checks passed
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

PR finisher pass:

  • Removed model: inherit from the persona-evaluator sub-agent so it no longer triggers the routing-incompatibility warning; submitted for publication (not confirmed pushed). Compile now reports 0 warnings. The generated lock file was excluded from the submission and needs regeneration (make recompile) by a maintainer.
  • Branch was already mergeable; git merge origin/main could not run (no git credentials to fetch missing objects).
  • Review reply/resolve deferred until the fix is published. Remaining: other open review threads (experiment confounding, quality guardrail) need maintainer decisions; CI needs a re-trigger.

PR finisher dispatch requested for the following outstanding work:

Sous-chef head: f32d76f
Sous-chef work: 03d38c0a907428c014f7326393b07597c4977cb89cd38fa62fe2e3bdbcb2702a
Sous-chef state: 624178559ea2b73631dff602f75d5c126474483babdb02638bbd7e2f4177fbd3

Generated by 🏁 PR Finisher · copilot · auto · ~22 AIC · ⌖ ~1 AIC · ⊞ 10.7K · ◷

@SivaKesava1
SivaKesava1 deleted the copilot/model-routing-agent-persona-explorer branch November 3, 2026 23:18
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.0

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 Agent Persona Explorer instead of defaulting to claude-sonnet-5

3 participants