Skip to content

Add a top-level routing opt-out and deprecate nested model routing - #79117

Merged
rabeckett merged 3 commits into
mainfrom
feat/router-opt-out-deprecations
Nov 18, 2026
Merged

rabeckett merged 3 commits into
mainfrom
feat/router-opt-out-deprecations

Conversation

@rabeckett

@rabeckett rabeckett commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #78930, following #79106. This is the compiler migration window, not the removal of the speed objective.

Use top-level model-routing: false in a workflow or shared import to opt out without pinning a model. Model overrides and the engine default keep their existing precedence. A router selector or shortlist cannot be combined with the opt-out.

Compiling the old engine.model-routing form gives one migration warning per authored declaration. A cost route points to the matching selector. A speed route explains that there is no equivalent: it still selects for speed until the author deliberately picks a cost level. Nothing is silently converted and no firewall options, tables, or existing locks are removed.

ADR-79117: Disable implicit routing without choosing a model records why omission, pinning, and router/off are not equivalent. This addresses the Design Decision Gate feedback.

Validation

  • go test ./pkg/workflow -run 'TestCompile(RouterOptOut|LegacyRoutingMigrationWarnings|DefaultModelRouting|RouterModelValue)' -count=1: 138 tests and subtests passed. Covers local and shared opt-outs, model overrides, invalid combinations, and unchanged compiled speed objectives and candidates.
  • make fmt, make check-instruction-prefixes, and make agent-report-progress passed. All 366 maintained workflows compiled without lock drift.
  • The generated reference now shows model-routing: false. Its regression assertion failed before the generator fix and passed afterward. Three unrelated dispatch-repository assertions also fail on the unmodified base.
  • Runtime follow-up for Migrate routed smoke workflows to top-level model shortlists #79106: none of the 11 migrated smokes had run on main since merge as of 2026-11-18 21:53 UTC. No live smoke was dispatched; the next scheduled routed SDK smoke is the independent runtime check for that migration.

Keep speed objectives and model overrides intact during migration. Report the specific migration in workflows and shared imports.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rabeckett
rabeckett marked this pull request as ready for review November 18, 2026 21:25
Copilot AI adaptive review requested due to automatic review settings November 18, 2026 21:25
@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Specification Reviewer has started processing this pull request

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 18, 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.

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~2 AIC · ⊞ 8.6K · ◷

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

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 by Ponytail Reviewer for #79117 · codex · routed: gpt61 medium · ~6 AIC · ⊞ 185 · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic: 221 added lines under pkg/, over the 100-line threshold. It has no implementation label. Excluding test files, it still adds 120 lines.

The branch already contains docs/adr/78930-disable-implicit-routing-without-a-model.md. That file has Context, Decision, and Consequences, but no Alternatives Considered section, so the gate does not count it as a complete ADR. The PR body also does not link it.

I did not commit a second draft. This decision already has a record in this PR, and a duplicate would split it across two files.

🔒 This PR cannot merge until a complete ADR is linked in the PR body.

📋 What to do next
  1. Add an Alternatives Considered section to docs/adr/78930-disable-implicit-routing-without-a-model.md, with at least two real alternatives. Suggested starting points are below.

  2. Link the ADR in the PR body, for example:

    ADR: ADR-78930: Disable implicit routing without choosing a model (link unavailable: invalid HTTPS URL)

  3. Optionally add a Deciders line to the ADR header.

Once a complete ADR is linked, this gate re-runs and checks that the implementation matches the Decision.

🧭 Suggested alternatives (drafted from the ADR text; verify before committing)
  • Omit model and rely on default routing. The Context explains why this fails: eligible workflows would start routing, so it is not an opt-out.
  • Pin a model to disable routing. The Context explains why this fails: pinning changes how runtime model overrides work.
  • Add a router/off model value. The Decision rejects this. The ADR does not record why, so add the reason if you have one.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~2 AIC · ⊞ 8.6K · ◷
Comment /review to run again

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

The published opt-out example uses model-routing: true, which the schema rejects, causing compilation to fail rather than disabling routing.

1 open issue
What changed in this PR

This PR adds a top-level routing opt-out to gh-aw and begins the nested-routing deprecation window for #78930, following the smoke workflow migration in #79106. Speed routing remains supported; runtime and routing-table removal are separate work.

Changes:

  • Support model-routing: false in workflows and shared imports while preserving model override precedence.
  • Warn on legacy nested declarations and test opt-out behavior, conflicts, and unchanged routing objectives.
  • Update schemas, migration guidance, reference documentation, and release notes.
File Description
pkg/​workflow/​model_routing_test.go Update notice expectations and allow migration warnings.
pkg/​workflow/​model_routing_default.go Recognize top-level choices and update opt-out notices.
pkg/​workflow/​model_router_value_test.go Test opt-outs, precedence, conflicts, and migration warnings.
pkg/​workflow/​engine_resolution.go Apply opt-outs after engine and import resolution.
pkg/​workflow/​compiler_orchestrator_workflow.go Use opt-out-aware engine resolution during compilation.
pkg/​workflow/​compiler_orchestrator_tools.go Emit authored nested-routing warnings.
pkg/​parser/​schemas/​main_workflow_schema.json Accept top-level false and describe nested deprecation.
pkg/​parser/​model_routing_deprecation.go Generate migration guidance for legacy routing.
pkg/​parser/​import_processor.go Expose imported opt-out state.
pkg/​parser/​import_extract_frontmatter.go Warn on imported legacy declarations and reject conflicts.
pkg/​parser/​import_extract_engine.go Extract top-level opt-outs from imports.
pkg/​parser/​import_accumulator.go Carry imported opt-outs into parser results.
docs/​src/​content/​docs/​specs/​model-alias-specification.md Specify opt-out and migration requirements.
docs/​src/​content/​docs/​reference/​model-routing.md Document migration and shared routing configuration.
docs/​src/​content/​docs/​reference/​frontmatter.md Introduce the opt-out and link migration guidance.
docs/​src/​content/​docs/​reference/​frontmatter-full.md Refresh generated routing descriptions and examples.
docs/​src/​content/​docs/​reference/​engines/​pi.md Document Pi’s top-level opt-out.
docs/​src/​content/​docs/​reference/​engines/​copilot.md Document Copilot’s top-level opt-out.
docs/​src/​content/​docs/​reference/​engines/​codex.md Document Codex’s top-level opt-out.
docs/​src/​content/​docs/​reference/​engines/​claude.md Document Claude’s top-level opt-out.
docs/​src/​content/​docs/​reference/​engines.md Update general engine opt-out guidance.
docs/​adr/​78930-disable-implicit-routing-without-a-model.md Record the migration decision and release boundaries.
.github/​aw/​syntax-engine.md Update authoring guidance for opt-outs and deprecation.
.changeset/​deprecate-nested-model-routing.md Announce the opt-out and migration warnings.

Review effort: Balanced (adaptive)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants