Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/agent-performance-analyzer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/agentic-token-audit.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/agentic-token-optimizer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/architecture-guardian.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/auditor.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/aw-issue-clustering.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/breaking-change-checker.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/ci-coach.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/cli-consistency-checker.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/copilot-opt.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/copilot-pr-merged-report.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/copilot-pr-nlp-analysis.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/copilot-pr-prompt-analysis.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/craft.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-agent-of-the-day-blog-writer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-ambient-context-optimizer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-assign-issue-to-user.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-compiler-quality.lock.yml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-declarative-engine-improver.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-ecosystem-explorer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-experiment-report.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-formal-spec-verifier.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-geo-optimizer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-graft-intelligence.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-pr-review-cursor.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-regression-audit-kiro.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-report-dispatcher.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-safe-output-integrator.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-schema-audit-cursor.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-secrets-analysis.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-security-observability.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-spdd-spec-planner.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-spec-coverage-kiro.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-squid-image-scan.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-syntax-error-quality.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-team-status.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-testify-uber-super-expert.lock.yml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-work-queues-report.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-workflow-security-model.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/daily-workflow-updater.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/dataflow-pr-discussion-dataset.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/dead-code-remover.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/delight.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/deployment-incident-monitor.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/dev-hawk.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/dictation-prompt.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/docs-noob-tester.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/draft-pr-cleanup.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/engine-conformance-copilot.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/engine-conformance-dispatcher.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/enterprise-docs-audit.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/eslint-factory-dispatcher.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/eslint-miner.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/firewall-escape.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/firewall.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/layout-spec-maintainer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/mcp-inspector.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/mergefest.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/objective-impact-report.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/org-health-report.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/plan.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/pr-finisher.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/pr-nitpick-reviewer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/refiner.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/release.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/repository-quality-improver.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/security-compliance.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/slide-deck-maintainer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-checkout-pr-dispatch.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-copilot-dynamic-workflow.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-create-cross-repo-pr.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-issues.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-multi-pr.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-project.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-security-alerts.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-update-cross-repo-pr.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-work-queue-dispatcher.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-work-queue-worker.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/smoke-workflow-call-with-inputs.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/spec-extractor.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/spec-librarian.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/stale-pr-cleanup.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/tidy.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/ubuntu-image-analyzer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/visual-regression-checker.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/weekly-blog-post-writer.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/weekly-editors-health-check.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/workflow-health-manager.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/workflow-skill-extractor.lock.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Resolution produces `model.resolution` evidence in `usage/aw_session.jsonl`. See

### Default model routing

When a `copilot`, `claude`, `codex`, or `pi` workflow on GitHub Copilot inference chooses no model and no routing settings, the compiler routes its main agent with `goal: cost` and `mode: balanced`. For Claude and Codex, that requires `model-provider: github`. Any explicit `model`, `engine.model`, `engine.model-routing`, `engine.fallback-models`, or `engine.env` model variable, including from imports, keeps today's behavior, as do unsupported or uncertain configurations. A nonempty `GH_AW_MODEL_AGENT_<ENGINE>` or `GH_AW_DEFAULT_MODEL_<ENGINE>` variable bypasses the default at run time for Copilot, Claude, and Codex. Opt out with `engine.model-routing: false`. See [Default routing for workflows without a model](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model).
When a `copilot`, `claude`, `codex`, or `pi` workflow on GitHub Copilot inference chooses no model and no routing settings, the compiler routes its main agent with `goal: cost` and `mode: auto`. For Claude and Codex, that requires `model-provider: github`. Any explicit `model`, `engine.model`, `engine.model-routing`, `engine.fallback-models`, or `engine.env` model variable, including from imports, keeps today's behavior, as do unsupported or uncertain configurations. A nonempty `GH_AW_MODEL_AGENT_<ENGINE>` or `GH_AW_DEFAULT_MODEL_<ENGINE>` variable bypasses the default at run time for Copilot, Claude, and Codex. Opt out with `engine.model-routing: false`. See [Default routing for workflows without a model](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model).

### Ordered model fallback (`fallback-models`)

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/engines/claude.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions:

The `copilot/` prefix selects the provider and is removed from the model ID passed to Claude. An explicit `engine.model-provider` overrides provider selection. For a fully dynamic model expression whose provider cannot be inferred at compile time, set `engine.model-provider: github`.

With `engine.model-provider: github` and no `model`, `engine.model`, or `engine.model-routing`, the main agent uses [model routing](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model) with `goal: cost` and `mode: balanced`, limited to Claude models. A nonempty `GH_AW_MODEL_AGENT_CLAUDE` or `GH_AW_DEFAULT_MODEL_CLAUDE` variable bypasses routing at run time; `engine.model-routing: false` opts out. The native Anthropic route, including `copilot-requests: write` without `model-provider: github`, isn't routed by default.
With `engine.model-provider: github` and no `model`, `engine.model`, or `engine.model-routing`, the main agent uses [model routing](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model) with `goal: cost` and `mode: auto`, limited to Claude models. A nonempty `GH_AW_MODEL_AGENT_CLAUDE` or `GH_AW_DEFAULT_MODEL_CLAUDE` variable bypasses routing at run time; `engine.model-routing: false` opts out. The native Anthropic route, including `copilot-requests: write` without `model-provider: github`, isn't routed by default.

Native `tools.web-fetch` and `tools.web-search` are unavailable on GitHub Copilot inference because the proxy sets `COPILOT_OFFLINE=true`, even for allowlisted domains. The compiler rejects these tools on this provider. Use `engine.model-provider: anthropic`, or configure an MCP fetch server for `web-fetch` or an MCP search server for `web-search`.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/engines/codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To authenticate:

GitHub inference requires the AWF sandbox. Do not set `sandbox.agent: false` for this provider. For a model supplied through an expression or repository variable, set `engine.model-provider: github` explicitly; runtime model prefixes do not change the selected credentials.

With `engine.model-provider: github` and no `model`, `engine.model`, or `engine.model-routing`, the main agent uses [model routing](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model) with `goal: cost` and `mode: balanced`, limited to GPT models. A nonempty `GH_AW_MODEL_AGENT_CODEX` or `GH_AW_DEFAULT_MODEL_CODEX` variable bypasses routing at run time; `engine.model-routing: false` opts out. The native OpenAI route isn't routed by default.
With `engine.model-provider: github` and no `model`, `engine.model`, or `engine.model-routing`, the main agent uses [model routing](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model) with `goal: cost` and `mode: auto`, limited to GPT models. A nonempty `GH_AW_MODEL_AGENT_CODEX` or `GH_AW_DEFAULT_MODEL_CODEX` variable bypasses routing at run time; `engine.model-routing: false` opts out. The native OpenAI route isn't routed by default.

GitHub inference uses direct function-backed `exec_command` for native shell execution unless `tools.bash: false`. JavaScript code mode is disabled because the compatibility adapter does not support its custom `exec` tool. gh-aw generates a direct-tool catalog from the installed binary's bundled metadata; MCP and `apply_patch` remain available. The binary must support `debug models --bundled`. `engine.config` cannot re-enable code mode or replace the managed catalog. OpenAI inference is unchanged.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/engines/copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The default CLI pin is `1.0.103`. The compiler embeds this version and its revie

### Default model routing

Without a `model`, `engine.model`, or `engine.model-routing`, a Copilot workflow on GitHub Copilot inference uses [model routing](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model) with `goal: cost` and `mode: balanced` for its main agent, instead of the `auto` model. A nonempty `GH_AW_MODEL_AGENT_COPILOT` or `GH_AW_DEFAULT_MODEL_COPILOT` variable bypasses routing at run time, with the agent variable winning. Set `engine.model-routing: false` to opt out without pinning a model. BYOK providers aren't routed by default.
Without a `model`, `engine.model`, or `engine.model-routing`, a Copilot workflow on GitHub Copilot inference uses [model routing](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model) with `goal: cost` and `mode: auto` for its main agent, instead of the `auto` model. A nonempty `GH_AW_MODEL_AGENT_COPILOT` or `GH_AW_DEFAULT_MODEL_COPILOT` variable bypasses routing at run time, with the agent variable winning. Set `engine.model-routing: false` to opt out without pinning a model. BYOK providers aren't routed by default.

## Capabilities and limitations

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/engines/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For first-time setup, see [Using Pi](/gh-aw/engines/pi/). Shared options are in

The default Pi version is `1.3.0`. Copilot defaults to `copilot/auto` with the gateway; native execution without the gateway retains `copilot/gpt-5.4`. `auto` delegates selection to the gateway and need not appear in its concrete-model inventory. OpenAI/Codex routes use the Responses API, not Chat Completions.

Without a `model`, `engine.model`, or `engine.model-routing`, Pi on GitHub Copilot inference uses [model routing](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model) with `goal: cost` and `mode: balanced` for its main agent. Pi has no model variables, so this default isn't bypassed at run time; set `engine.model-routing: false` to opt out, or set a model.
Without a `model`, `engine.model`, or `engine.model-routing`, Pi on GitHub Copilot inference uses [model routing](/gh-aw/reference/model-routing/#default-routing-for-workflows-without-a-model) with `goal: cost` and `mode: auto` for its main agent. Pi has no model variables, so this default isn't bypassed at run time; set `engine.model-routing: false` to opt out, or set a model.

Threat detection defaults to Copilot regardless of Pi's provider. Supply its separate Copilot credential or [configure another detection engine](/gh-aw/reference/threat-detection/).

Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/reference/frontmatter-full.md
Original file line number Diff line number Diff line change
Expand Up @@ -3491,7 +3491,7 @@ engine:
# Copilot, Claude, Codex, and pi engines, on GitHub Copilot or, for Claude and
# Codex, natively on Anthropic or OpenAI; requires the AWF firewall and ignores
# fixed model and effort settings. Eligible workflows that choose no model or
# routing on GitHub Copilot inference default to goal cost and mode balanced; set
# routing on GitHub Copilot inference default to goal cost and mode auto; set
# false to opt out. See https://github.github.com/gh-aw/reference/model-routing/.
# (optional)
# Accepted formats:
Expand Down Expand Up @@ -3522,7 +3522,7 @@ engine:
allowed-models: []
# Array of strings

# Format 2: Disable the implicit cost/balanced model-routing default without
# Format 2: Disable the implicit cost/auto model-routing default without
# pinning a model; the existing model variables and fallback model apply.
model-routing: false

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ models:

### Model Routing (`engine.model-routing`)

An experimental feature that chooses the model and reasoning effort for each run from the task the run receives, instead of a single fixed `engine.model`. Configured with a required `goal` (`cost` or `cost-speed`) and `mode` (`economy`, `balanced`, `robust`, or `auto`), optionally limited to a shortlist of allowed models. Eligible workflows on the `copilot`, `claude`, `codex`, or `pi` engine that set no model run on GitHub Copilot with `goal: cost` and `mode: balanced` by default; setting `model-routing: false` opts out. See [Model Routing](/gh-aw/reference/model-routing/).
An experimental feature that chooses the model and reasoning effort for each run from the task the run receives, instead of a single fixed `engine.model`. Configured with a required `goal` (`cost` or `cost-speed`) and `mode` (`economy`, `balanced`, `robust`, or `auto`), optionally limited to a shortlist of allowed models. Eligible workflows on the `copilot`, `claude`, `codex`, or `pi` engine that set no model run on GitHub Copilot with `goal: cost` and `mode: auto` by default; setting `model-routing: false` opts out. See [Model Routing](/gh-aw/reference/model-routing/).

### Default AI Credits Pricing (`models.default-ai-credits-pricing`)

Expand Down
8 changes: 5 additions & 3 deletions docs/src/content/docs/reference/model-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ safe-outputs:
Find the likely cause of issue #${{ github.event.issue.number }} and comment with a suggested fix.
```

This explicit configuration is a good starting point for most workflows. Eligible workflows that set no model at all are already routed with `goal: cost` and `mode: balanced`; see [Default routing for workflows without a model](#default-routing-for-workflows-without-a-model). `goal: cost` prefers the cheapest choice that is likely to succeed, and `mode: auto` lets the router judge how demanding each task is. Because the workflow doesn't restrict models, the router can choose any model it supports that your organization's Copilot plan offers. [Choose which models the router can use](#choose-which-models-the-router-can-use) shows how to narrow that.
This explicit configuration is a good starting point for most workflows. Eligible workflows that set no model at all are already routed with `goal: cost` and `mode: auto`; see [Default routing for workflows without a model](#default-routing-for-workflows-without-a-model). `goal: cost` prefers the cheapest choice that is likely to succeed, and `mode: auto` lets the router judge how demanding each task is. Because the workflow doesn't restrict models, the router can choose any model it supports that your organization's Copilot plan offers. [Choose which models the router can use](#choose-which-models-the-router-can-use) shows how to narrow that.

This example routes models served through GitHub Copilot, so the workflow needs Copilot authentication, here through the [`copilot-requests: write`](/gh-aw/reference/auth/#copilot-requests-write-permission) permission. Claude and Codex can instead route on their own provider, Anthropic or OpenAI, with the same API key they use without routing; see [Use routing with Claude, Codex, or pi](#use-routing-with-claude-codex-or-pi). Routing also needs the AWF firewall, which is enabled by default.

Expand All @@ -53,12 +53,14 @@ If the workflow already sets `engine.model`, or another fixed model or reasoning

## Default routing for workflows without a model

A workflow that chooses neither a model nor routing settings is routed by default with `goal: cost` and `mode: balanced`, when all of the following hold:
A workflow that chooses neither a model nor routing settings is routed by default with `goal: cost` and `mode: auto`, when all of the following hold:

- The engine is `copilot`, `claude`, `codex`, or `pi`, and inference runs on GitHub Copilot. For Claude and Codex that means `model-provider: github`; a `copilot-requests: write` permission alone doesn't switch the provider. Claude and Codex keep their model family, as in [Use routing with Claude, Codex, or pi](#use-routing-with-claude-codex-or-pi).
- Neither the workflow nor its imports set a top-level `model`, `engine.model` (including aliases, `auto`, and expressions), `engine.model-routing`, `engine.fallback-models`, or an `engine.env` model variable such as `COPILOT_MODEL` or `GH_AW_DEFAULT_MODEL_COPILOT`.
- The workflow uses the AWF firewall with a version and images that support routing, and doesn't customize model selection or inference in other ways, such as a custom engine command, model or effort arguments in `engine.args`, a custom agent, sub-agent models, a custom API target, or custom sandbox images.

With `mode: auto`, each run uses the mode the classifier recommends for its task, falling back to `balanced` when classification is unavailable or recommends `unknown`.

The default applies only to the main agent. Threat detection, evals, and sub-agents keep their models. When any condition isn't met, or eligibility is uncertain, the workflow compiles as before. When the default applies, compilation prints an informational notice; it doesn't add a warning.

**Model variables bypass the default at run time.** For the `copilot`, `claude`, and `codex` engines, the activation job checks the repository or organization variables `GH_AW_MODEL_AGENT_<ENGINE>` and `GH_AW_DEFAULT_MODEL_<ENGINE>`, for example `GH_AW_MODEL_AGENT_COPILOT`, before the firewall starts. If either is set, the run uses that model without routing, with the agent variable winning over the default one. The variables aren't read at compile time. The `pi` engine has no such variables, so its default routing always applies.
Expand Down Expand Up @@ -95,7 +97,7 @@ The **goal** decides which of the choices that meet the target the router prefer
| `cost` | The cheapest model and effort that meet the target. |
| `cost-speed` | The fastest model and effort that meet the target, even when a slower choice would cost less. |

When you configure routing explicitly and are unsure, start with `goal: cost` and `mode: auto`. Workflows without a model already get `goal: cost` and `mode: balanced` by default; see [Default routing for workflows without a model](#default-routing-for-workflows-without-a-model). Set a fixed mode when you know what kind of tasks the workflow gets, for example `economy` for a labeling workflow. Choose `cost-speed` when someone is waiting on the result, such as a workflow that replies to a comment.
When you configure routing explicitly and are unsure, start with `goal: cost` and `mode: auto`. Workflows without a model already get `goal: cost` and `mode: auto` by default; see [Default routing for workflows without a model](#default-routing-for-workflows-without-a-model). Set a fixed mode when you know what kind of tasks the workflow gets, for example `economy` for a labeling workflow. Choose `cost-speed` when someone is waiting on the result, such as a workflow that replies to a comment.

Targets are success rates estimated from benchmark results on similar tasks, not guarantees for a particular repository. The router can choose below the target when no candidate meets it or, with `goal: cost`, when a choice just below the target costs much less.

Expand Down
4 changes: 2 additions & 2 deletions pkg/parser/schemas/main_workflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15926,7 +15926,7 @@
"description": "Ordered alternative models after model-specific failures, supported by engines with a built-in retry harness. Each model receives its own harness retry budget. Cannot be combined with model-routing or a custom driver or harness."
},
"model-routing": {
"description": "Experimental per-run model and reasoning-effort selection from the task text for Copilot, Claude, Codex, and pi engines, on GitHub Copilot or, for Claude and Codex, natively on Anthropic or OpenAI; requires the AWF firewall and ignores fixed model and effort settings. Eligible workflows that choose no model or routing on GitHub Copilot inference default to goal cost and mode balanced; set false to opt out. See https://github.github.com/gh-aw/reference/model-routing/.",
"description": "Experimental per-run model and reasoning-effort selection from the task text for Copilot, Claude, Codex, and pi engines, on GitHub Copilot or, for Claude and Codex, natively on Anthropic or OpenAI; requires the AWF firewall and ignores fixed model and effort settings. Eligible workflows that choose no model or routing on GitHub Copilot inference default to goal cost and mode auto; set false to opt out. See https://github.github.com/gh-aw/reference/model-routing/.",
"oneOf": [
{
"type": "object",
Expand Down Expand Up @@ -15967,7 +15967,7 @@
{
"type": "boolean",
"const": false,
"description": "Disable the implicit cost/balanced model-routing default without pinning a model; the existing model variables and fallback model apply."
"description": "Disable the implicit cost/auto model-routing default without pinning a model; the existing model variables and fallback model apply."
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/workflow/compiler_mutators.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *Compiler) CopilotRequestsTipNeeded() bool {
}

// DefaultModelRoutingWorkflowCount returns how many workflows compiled in batch
// mode received the implicit cost/balanced model-routing default.
// mode received the implicit cost/auto model-routing default.
func (c *Compiler) DefaultModelRoutingWorkflowCount() int {
return c.defaultRoutingCount
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/workflow/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ type EngineConfig struct {

ModelRouting *CopilotModelRoutingConfig
// ModelRoutingDisabled records an explicit `engine.model-routing: false`,
// which opts out of the implicit cost/balanced routing default.
// which opts out of the implicit cost/auto routing default.
ModelRoutingDisabled bool
FallbackModels []string

Expand Down
2 changes: 1 addition & 1 deletion pkg/workflow/model_routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type CopilotModelRoutingConfig struct {
Goal string
Mode string
AllowedModels []string
// implicit marks the compiler's cost/balanced default, as opposed to an
// implicit marks the compiler's cost/auto default, as opposed to an
// authored or imported engine.model-routing block. It is never emitted.
implicit bool
}
Expand Down
Loading
Loading