Skip to content

Adopt model routing in Rig guidance and workflows - #996

Open
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/update-rig-skill-samples-aws
Open

pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/update-rig-skill-samples-aws

Conversation

Copilot AI commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Update the Rig skill, samples, and eligible agentic workflows to prefer model routing while preserving provider-specific integrations.

Workflows

  • Configure explicit per-run routing for four workflows; use economy routing for routine header updates.
  • Clarify that the decomposition benchmark cannot assume different Rig agents used different models.

Rig guidance and samples

  • Document router compatibility, provider-supported selectors, and Copilot SDK model precedence.
  • Update delegation samples to express task-specific model preferences.
  • Cover workflow-provided model overrides in the Copilot engine test.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 29, 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 · copilot · routed: haiku55 xhigh · ~12 AIC · ⌖ ~2 AIC · ⊞ 5.7K · history

@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, /codebase-design, and /grill-with-docs lenses. The routing and override docs match the code I checked. Tests were not run: npm ci failed on a self-signed certificate from the package feed, so these findings come from source review only.

📋 Key Themes & Highlights

Key Themes

  • Missing negative-path test in src/engines/copilot.test.ts: only the workflow override is covered. The documented precedence has no test with the variable unset.
  • Selector drift: sample docs now use small/large, but src/samples/20-issue-reproducer.ts and src/samples/36-subagent-delegation.ts still use "mini". sample:check does not catch this.
  • Pi routing contradiction: agentic-workflows.md says the Pi outer agent leaves selection to the workflow, but the Pi lock has routing disabled and the Pi prompt still claims the router selects the model.
  • Lock files: frontmatter hashes changed as expected. I could not confirm they match a fresh gh aw compile.

Positive Highlights

  • ✅ The caveat that GH_AW_COPILOT_SDK_MULTI_PROVIDER_JSON overrides Rig selectors matches resolveCopilotMultiProvider in skills/rig/rig.ts.
  • ✅ The benchmark prompt forbids claiming per-agent model differences without evidence.

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

const Diagnosis = s.object({ rootCause: s.string, confidence: s.number });
// Agent role: diagnose the failing test output.
const diagnose = agent({ model: "mini", output: Diagnosis, instructions: "Diagnose the failing test output." });
const diagnose = agent({ model: "small", output: Diagnosis, instructions: "Diagnose the failing test output." });

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.

[/codebase-design] The sample doc now says small/large, but its runnable source src/samples/20-issue-reproducer.ts still uses "mini" (lines 8, 17, 29, 46), and src/samples/36-subagent-delegation.ts has the same drift. sample:check validates the inventory and duplicates, not model selectors, so nothing catches this.

💡 Suggested change

Update each model: "mini" in those TypeScript sources to "small" or "large" to match the docs. AGENTS.md also asks for small in examples. Alternatively, state which file is canonical.

});

await copilotEngine()({ model: "small" });
await copilotEngine()({ model: "large" });

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.

[/tdd] This new call runs while GH_AW_COPILOT_SDK_MULTI_PROVIDER_JSON is set, so it only exercises the override. Nothing asserts the documented no-override precedence (invocation model, then agent model, then the "small" default). Add a case with the variable unset.

💡 Suggested test
it("passes Rig model selectors through without a workflow provider", async () => {
  await copilotEngine()({ model: "large" });
  expect(mocks.createSession).toHaveBeenCalledWith(expect.objectContaining({ model: "large" }));
});

beforeEach already clears the override variable, so this case runs without it.

that same non-secret placeholder; it does not use native Copilot OAuth or
an OpenAI key. Its outer engine and judges pin `gpt-5.3-codex` to keep the
integration model deterministic rather than using gh-aw's `auto` routing.
an OpenAI key. The outer agent leaves model selection to the workflow and the

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.

[/grill-with-docs] This says the Pi outer agent "leaves model selection to the workflow", but rig-skill-integration-pi.lock.yml has routing.enabled: false. The same doc says routing does not apply to custom drivers, and Pi uses pi_agent_core_driver.cjs. Meanwhile rig-skill-integration-pi.md (lines 37-38) still tells the agent that the workflow model router selects the outer model. Align that prompt text with this doc so the agent is not told to expect routing.

💡 Suggested wording

State that Pi uses the harness-provisioned gateway model and that routing does not apply to this custom driver. Replace the prompt sentence "Let the workflow's model router select the outer agent model" to match.

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot fix ci failures

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix ci failures

Fixed in 4165999: both references now meet the size limit, and relative-link and lint checks pass. The targeted Vitest test could not run locally because DNS resolution failed for both approved npm feeds; CI will need to verify it.

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