Repository navigation
Docs: add experimental Copilot model-routing guide - #66338
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The documentation accurately reflects current compiler behavior and upstream routing contracts, with appropriate regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Adds an experimental Copilot model-routing reference covering configuration, runtime behavior, limitations, observability, and troubleshooting.
Changes:
- Adds and links a comprehensive model-routing guide.
- Expands schema descriptions and regenerated reference output.
- Adds regression checks for generated routing documentation.
| File | Description |
|---|---|
scripts/generate-schema-docs.test.js |
Verifies generated routing guidance. |
pkg/parser/schemas/main_workflow_schema.json |
Expands routing field descriptions. |
docs/src/content/docs/reference/model-routing.md |
Adds the model-routing reference. |
docs/src/content/docs/reference/frontmatter.md |
Links routing from frontmatter documentation. |
docs/src/content/docs/reference/frontmatter-full.md |
Regenerates schema-derived documentation. |
docs/src/content/docs/reference/engines.md |
Links routing from the Copilot engine section. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
✅ Ponytail Reviewer completed successfully!
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. No ADR enforcement needed for PR #66338: the PR does not carry the 'implementation' label (has_implementation_label=false) and adds only 4 lines in business logic directories (default_business_additions=4, threshold=100, has_custom_config=false, file_count=6).
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
There was a problem hiding this comment.
L159-166: delete: six exact prose assertions for generated schema docs. Keep the generator's existing structural coverage; wording belongs in the source schema and guide.
net: -8 lines possible.
Generated by ✂️ Ponytail Reviewer for #66338 · codex · gpt56 · 8.77 AIC · ⌖ 6.41 AIC · ⊞ 13.4K
Comment /ponytail to run again
| allPassed &= assertContains(output, "report-failed-jobs:", "Safe outputs example should include report-failed-jobs"); | ||
|
|
||
| // Test 12: Model routing descriptions explain values and link to the guide | ||
| const unwrappedOutput = output.replace(/\n\s*#\s*/g, " "); |
There was a problem hiding this comment.
L159-166: delete: six exact prose assertions for generated schema docs. Keep the generator's existing structural coverage; wording belongs in the source schema and guide.
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /grill-with-docs — this is a well-researched, accurate documentation PR with only a single minor, non-blocking nit.
📋 Key Themes & Highlights
Verification performed
- Cross-checked every claim in
model-routing.mdagainstpkg/workflow/model_routing.go,pkg/constants/version_constants.go, andpkg/parser/schemas/main_workflow_schema.json(goal/mode enums, AWF min-versionsv0.28.29/v0.28.33, default AWF/router versions, expression-vs-policy rejection logic, sub-agent API-family constraint). - Confirmed cited cross-repo references (
gh-aw#66234,gh-aw#66291,gh-aw-firewall#9509) exist and match their described content. - Ran
node scripts/generate-schema-docs.test.js— all 26 assertions pass, including the 6 new ones for the model-routing schema descriptions. - Confirmed
frontmatter-full.mdis machine-generated from the schema, so the schema and reference doc stay in sync by construction. - Checked sidebar
order: 605formodel-routing.mddoesn't collide with existing reference pages.
Minor note
- One inline comment: the new page's internal links (
../model-routing/,../sandbox/) use relative paths, while all other cross-references underreference/use the absolute/gh-aw/reference/<slug>/form. Not a functional bug, just a style inconsistency worth aligning for future-author clarity.
Positive highlights
- ✅ Clearly separates the advisory selection model from the hard request-policy (
allowed-modelsvs. admitted sub-agent models) — exactly the kind of precise domain-language distinction/grill-with-docslooks for. - ✅ Surfaces the threat-detection-fails-silently limitation prominently with a warning callout, rather than burying a real operational risk.
- ✅ Links to upstream AWF/router contracts instead of duplicating schema details that could drift.
- ✅ Adds regression tests tying generated docs to the new schema wording.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 112.9 AIC · ⌖ 14.6 AIC · ⊞ 10.1K
Comment /matt to run again
|
|
||
| ### Model Routing (`engine.model-routing:`) | ||
|
|
||
| Enables experimental per-run model and reasoning-effort selection for Copilot with the AWF firewall. Requires `goal` (`cost` or `cost-speed`), `mode` (`economy`, `balanced`, `robust`, or `auto`), and a non-empty `allowed-models` list. Overrides the fixed `engine.model` and effort settings. See [Model Routing](../model-routing/) for value meanings, requirements, sub-agent constraints, known limitations, and logs. |
There was a problem hiding this comment.
[/grill-with-docs] Minor link-convention inconsistency: this and the ../sandbox/ link below use relative paths, while every other cross-reference in reference/*.md (including the rest of this same file) uses the absolute /gh-aw/reference/<slug>/ form.
💡 Suggested fix
Change to match the established convention used throughout reference/:
See [Model Routing](/gh-aw/reference/model-routing/) for value meanings, requirements, sub-agent constraints, known limitations, and logs.Relative links (../x/) still resolve under Starlight's routing, so this won't break the build, but it diverges from the project's established domain-language/navigation convention and could confuse future doc authors about which style to use. Not blocking.
@copilot please address this.
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: ee404e1
|
|
🎉 This pull request is included in a new release. Release: |
engine.model-routingworks end to end, but the generated reference does not explain its runtime behavior, configuration semantics, or constraints. This change proposes an author-facing reference covering those gaps.engine.model-routing#66337