Repository navigation
Description
Change requested
Change only the implicit model-routing default from goal: cost / mode: balanced to goal: cost / mode: auto. Eligible workflows that choose neither a model nor routing should let the router choose the mode for the task received on each run, without having to author a routing block.
This follows #76312 and #76313, merged 10 November 2026 at 06:05:58 UTC. The implementation is already present: defaultModelRoutingGoal and defaultModelRoutingMode currently specify cost and balanced.
Keep the goal, eligibility rules, model-family restrictions, runtime model-variable bypass, engine.model-routing: false opt-out, explicit choices, and main-agent-only scope from #76313 unchanged. mode: auto here is a routing mode, not model: auto; do not change the latter or make explicit routing's required fields optional.
Verified behavior
- The router's
resolvedProfileuses the classifier's recommended mode forauto, falling back tobalancedwhen classification is absent/null or its mode isunknown. A supplied classification with a missing/invalidmodeis not valid router input; AWF can discard invalid classifier output and take the degraded-classification path. See the router contract. - AWF attempts classification for fixed modes as well as
auto; it does not skip it merely because the objective mode is fixed. Successful classification includes the recommendation. This is not a guarantee that every run returns a recommendation: bootstrap failures and degraded classification are possible. Seerouting-controller.js. - In a
model-routing.jsonlrecord withstage: selection,objective.modeis the assigned mode; top-levelmodeis the classifier's recommendation, not necessarily the effective mode used to rank a fixed-mode run. AWF records both, along with labels and ranked choices, in the selection record. The sampled unified sessions also containtype: firewall.model_routing, withdata.stage: selection,data.objective.mode, anddata.mode. - At main commit
82791611f2b55, 92 committed locks contain the implicit routing activation decision (id: resolve-model-routing). This is a snapshot count, not a count to hard-code.
Independent run spot-check
These are existing runs on main, not new test dispatches. Audits used a Windows development build of main at 82791611f2b55, reporting dev-main-82791611f2b5, with --no-baseline --artifacts usage --json; the old installed stable CLI was not used for audits. All four audits completed successfully. Both raw routing records and the unified-session selection event were checked for Team Status.
| Workflow / run | Run conclusion | Assigned mode | Classifier recommendation | Live selected model:effort | Offline auto selection |
Observed main-agent AIC |
|---|---|---|---|---|---|---|
| daily-team-status / 42807674243 | success | balanced, implicit | economy | claude-sonnet-5.5:high | claude-haiku-5.5:xhigh | 25.97247 |
| tidy / 42770090235 | success | balanced, implicit | economy | claude-sonnet-5.5:high | claude-haiku-5.5:high | 36.79772 |
| agentic-token-audit / 42808094187 | success | balanced, implicit | economy | claude-sonnet-5.5:high | claude-haiku-5.5:high | 36.10579 |
| avenger / 42885421085 | failure | balanced, explicit | balanced | claude-sonnet-5.5:high | claude-sonnet-5.5:high | not a success baseline |
Avenger's source explicitly requests balanced. Its routing selection is observable despite the overall failed run; it is not evidence that the workflow succeeded.
Replay method: re-ranked each run's own 68 logged, already-routable ranked_choices, retaining its recorded labels, recommendation, and goal, first under the assigned mode and then under auto. The cached router:0.29.10 image reports router version 0.3.0, with immutable image digest sha256:cf7ba6dedba5037c51e84487fdfcdfa7c294fd295c29e083cb6ae872a9512bbd; execution had no network or host mounts. The six bundled routing-table blob SHAs match between AWF v0.29.10 and v0.29.11. Assigned-mode replay reproduced the live model and effort in all four cases. Logged choices omit IDs, so replay assigned fresh IDs; this does not claim to reproduce live choice IDs, classification calls, candidate discovery, or the full execution.
Version correction: the sampled runs actually used AWF v0.29.11, and their selection records report router 0.3.0. v0.29.10 was the earlier collection-window floor, not the sampled runtime version. The router image tag tracks the AWF release, while its internal router version is separate.
Limits of the broader supplied evidence
The supplied analysis reports 138 runs across 94 routed workflows; economy recommendations for 34/35 implicit workflows that had run; agreement with manually chosen modes for 53/56 explicit-mode workflows; and recommendation stability for 59/60 repeated runs across 20 workflows. Those fleet totals and repeat-classification results were not independently reproduced by this four-run spot-check. A run manifest/export, exact collection cutoff, cohort definitions, and replay inputs are needed to verify their denominators and stability claim. The other named examples (including spec-extractor, daily-formal-spec-verifier, code-scanning-fixer, daily-vulnhunter-scan, sergo, and static-analysis-report) were not individually audited here.
The reported 0.16-0.31x per-arm credits from a router-training release named 2026-11-04-cell-lookup also remain unverified: no resolvable training-repository/release link or underlying price export was supplied. The shipped runtime tables contain rankings, not prices or benchmark evidence (table documentation). Do not present this ratio as measured workflow AIC savings. Offline choices establish a selection counterfactual, not lower end-to-end credits or preserved task quality; the AIC column above is observed usage of the existing Sonnet runs only. Agreement with authored modes and repeatability are useful consistency signals, not proof of quality.
Implementation scope
- Change
defaultModelRoutingModetoautoinpkg/workflow/model_routing_default.go; keepdefaultModelRoutingGoal = cost. Update directly related comments describing the old default. - Ensure the informational compile notice says
autofor both single and batch compilation, without turning it into a warning. The notice helpers already interpolate the shared default. - Update
docs/src/content/docs/reference/model-routing.md: the default-routing section and the two other statements that no-model workflows get balanced. Explain in one sentence thatautouses the classifier's recommended mode per run, falling back tobalancedwhen classification is unavailable or recommendsunknown. - Update the same default claim in
reference/engines.md,reference/engines/{copilot,claude,codex,pi}.md, andreference/glossary.md. Keep examples and documentation of intentionally explicit modes unchanged. - Update expectations for the implicit default in
pkg/workflow/model_routing_test.goand any other directly affected tests, including the provider matrix and notices. Preserve explicit-mode fixtures/assertions and the eligibility, bypass, opt-out, and isolation contracts. - Run
make recompileand commit the regenerated affected locks. Do not add per-workflow routing blocks or edit workflow prompts. For provenance-managedsource:workflows such as agentic-token-audit, leave source Markdown untouched; regenerate locks through the compiler, never by hand.
Acceptance cases
A. Compilation and notices. Input: an otherwise eligible Copilot workflow with no model or authored/imported routing choice. Result: the routed AWF configuration contains apiProxy.routing.objective with goal: cost and mode: auto; the single-workflow notice says auto, and batch compilation reports the same default. Inputs with explicit routing modes, explicit models, an opt-out, or ineligible configurations retain their prior behavior and no new default-routing notice.
B. Bounded regeneration. Input: the implementation on an up-to-date main baseline, followed by make recompile. Result: only implicitly routed workflow locks change; list the changed workflows in the PR and explain any difference from the current approximately 92-lock baseline. Allow only the implicit mode's serialized occurrences (AWF objective and routing run-info metadata), the directly corresponding activation message (Model routing enabled: goal cost, mode auto), and required lock hash/bookkeeping changes. Correction to the original proposal: the diff cannot literally be just the objective and hash, because the generated activation message embeds the mode too. Explicitly routed and opted-out locks must not gain behavior changes; do not include unrelated compiler/version/pin drift.
C. Authorized branch-run evidence. Input: the exact reviewed, published PR revision, with no runtime model-variable bypass, and two or three eligible implicit workflows (for example daily-team-status and the code-changing tidy workflow). In an environment authorized for live branch testing, follow the repository's live-testing gates. Result: successful runs whose firewall.model_routing selection events show objective.mode: auto, the classifier's recommendation in mode, and a selected model/effort ranked under the resolved mode. Report each selected model, observed agent AIC, and task outcome next to the last comparable main run, identifying both revisions and run URLs. Do not substitute counterfactual prices or an old green main run for new execution evidence. Cloud-agent restrictions still apply: only explicitly authorized, reviewed dry-run dispatches are permitted there; label dry-run evidence and its outcome limitations rather than claiming unrestricted live validation. This issue is not itself permission to dispatch.
D. Preserved contracts. Input: the existing focused routing tests, including provider eligibility, explicit settings, imported choices, runtime model-variable guards, opt-out precedence, and detection/evals/sub-agent isolation. Result: they still pass with the same behavioral assertions, except expectations specifically asserting the implicit mode/notice now say auto. In particular, a nonempty supported engine model variable still selects the original non-routed path; opting out still does not pin a model; explicit modes still override the recommendation; detection/evals remain outside the implicit default.
Non-goals
Changing explicit workflow routing modes; broadening eligibility; changing the opt-out or runtime bypass; changing AWF, the router, its tables, or the classifier; adding per-workflow allowed-models; changing prompts, safe outputs, or unrelated tests.
Scope
- Keep the PR to this one fix. Do not change files or behavior unrelated to it.
- Before fixing a failing check, compare it with the same check on main. If it also fails on main, do not fix it in this PR; merge main once main is fixed, and note in the PR which checks are known failures on main.
- This applies even if a bot comment asks to fix a failing check: fix only failures caused by this PR's changes.
- Manual test runs on the PR branch can fail for reasons unrelated to this change (GitHub errors, API quota, draft PRs,
report_incomplete). Do not change prompts, safe outputs, or tests in response to those unrelated failures. Record them separately from routing/selection regressions.
Activity