Skip to content

docs(model-routing): explain Copilot CLI vs SDK mode, define allowed-models, add compiling examples - #67755

Merged
SivaKesava1 merged 9 commits into
mainfrom
copilot/update-model-routing-guide
Oct 12, 2026
Merged

SivaKesava1 merged 9 commits into
mainfrom
copilot/update-model-routing-guide

Conversation

Copilot AI commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

The model routing guide had fallen behind main. It never said that cross-family sub-agents work only in Copilot SDK mode. It called allowed-models the request policy. It still listed threat detection as a limitation (fixed in #66670) and stated an old default AWF version. Only docs/src/content/docs/reference/model-routing.md changes.

CLI mode vs SDK mode (new section)

allowed-models

  • Now described as the router's candidate list for the main agent, which compiles to AWF routing.candidateModels.
  • Declared sub-agent models are allowed automatically (Separate routing candidates from sub-agent model policy #66234). Listing one also makes it a main-agent candidate.
  • The request policy is models.allowed / models.blocked, linked to the glossary's Model Policy entry. Both the candidates and the sub-agent models must satisfy it.

Examples and reference workflows

  • CLI mode routes over a GPT pool with a GPT inline sub-agent.
  • SDK mode routes over a mixed six-model pool with a Claude inline sub-agent:
    permissions:
      contents: read
      copilot-requests: write
    engine:
      id: copilot
      copilot-sdk: true
      model-routing:
        goal: cost
        mode: auto
        allowed-models: [gpt-5.4-mini, gpt-5.6-luna, gpt-5.6-sol, claude-haiku-4.5, claude-sonnet-5, claude-opus-5]
    The inline sub-agent (## agent:) sets model: claude-haiku-4.5.
  • Links the three routing smokes:
    • smoke-copilot-routed.md routes over three models and has no sub-agents.
    • smoke-copilot-sdk-routed.md and smoke-pi-routed.md route over a single model only so their sub-agent checks stay deterministic. This is not a recommendation.

Other fixes

Compile results (required by the issue)

gh-aw was built from this branch, which is based on b04b77e (not the 7f713c7 named in the issue) and has no code changes. Both examples were compiled as scratch workflows:

$ gh-aw compile routing-cli
✓ Compiled 1 workflow: 1 succeeded, 0 warnings
$ gh-aw compile routing-sdk
✓ Compiled 1 workflow: 1 succeeded, 0 warnings

In both, the compiled candidateModels matches allowed-models. allowedModels was not checked.

The docs build (astro build) reports "All internal links are valid." The automated code review did not run (its model was unavailable), so the wording has not been reviewed yet. No checks were found failing on main because of this PR.

…ted examples

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Copilot AI changed the title [WIP] Update model routing guide for CLI and SDK mode docs(model-routing): explain Copilot CLI vs SDK mode, define allowed-models, add compiling examples Oct 11, 2026
Copilot AI requested a review from SivaKesava1 October 11, 2026 17:56
@SivaKesava1
SivaKesava1 marked this pull request as ready for review October 11, 2026 18:12
Copilot AI balanced review requested due to automatic review settings October 11, 2026 18:12

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

Two statements overstate CLI recovery behavior and smoke workflow validation coverage.

2 open findings
What changed in this PR

Updates the model-routing reference to match current routing behavior and observability.

Changes:

  • Clarifies allowed-models and model policy semantics.
  • Documents CLI versus SDK cross-family sub-agent behavior with examples.
  • Refreshes AWF versions, smoke references, and steering notices.
File Description
docs/​src/​content/​docs/​reference/​model-routing.md Updates model-routing guidance, examples, limitations, and observability.

🧠 Review effort: Balanced

Comment thread docs/src/content/docs/reference/model-routing.md Outdated
Comment thread docs/src/content/docs/reference/model-routing.md Outdated
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. Test Quality Sentinel skipped. PR #67755 only modifies docs/src/content/docs/reference/model-routing.md (a documentation file); no Go or JavaScript test files are in scope.

🧪 Test quality analysis by Test Quality Sentinel

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (docs/src/content/docs/reference/model-routing.md:77): The linked CLI issue does not guarantee that the main model redoes the failed delegation: its recorded runs either reported the missing result or did the work another way. Stating that it always redoes the work could lead authors to assume the delegated task still completes after the 400. Describe the recovery as nondeterministic instead. - docs(model-routing): explain Copilot CLI vs SDK mode, define allowed-models, add compiling examples #67755 (comment)
  3. Review (docs/src/content/docs/reference/model-routing.md:144): This overstates what the smoke assertion helper verifies. It checks every main-agent request against the candidate models, but R3 and S3 require only one successful request on a supported/declared endpoint; they do not validate every request's endpoint. Describe these as model/endpoint evidence checks rather than per-request checks. - docs(model-routing): explain Copilot CLI vs SDK mode, define allowed-models, add compiling examples #67755 (comment)

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: dc125f9
Sous-chef work: 18714d38b1e6cceac462fd6f67f2f0803ab83cbaf5a3bf3cbdb9a1bbb4872e53 beacfba3f5e1805e4d26541b477a16292eee7a490a0ed48fd0671cdf1e7924cc
Sous-chef state: e05e046cfc5901d0b4571966c241ae2b27c31cffc59da5ba890c4b47ac1f266c

Generated by 👨‍🍳 PR Sous Chef · pi · haiku45 · 3.44 AIC · ⌖ 7.1 AIC · ⊞ 1K · ◷
Comment /souschef to run again

Copilot AI and others added 2 commits October 11, 2026 18:54
…routing-guide

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>
…ted workflows

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

Copy link
Copy Markdown
Collaborator

@copilot /pr-finisher

@SivaKesava1
SivaKesava1 requested a review from pelikhan October 11, 2026 20:11

Copilot AI commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes....

The two linked review threads were updated in 9f8079e and are already resolved. make merge-main confirmed this branch is current with main at 6e59aae, so no additional commit was needed; the current head is 5fe82c3.

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
@SivaKesava1
SivaKesava1 merged commit ea0b267 into main Oct 12, 2026
5 checks passed
@SivaKesava1
SivaKesava1 deleted the copilot/update-model-routing-guide branch October 12, 2026 00:33
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.91.9

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 guide: CLI vs Copilot SDK mode for mixed model families, what allowed-models means, and tested examples

4 participants