Skip to content

Support team-configurable default models with clear documentation #70297

Backlog

Description

@v1v

Summary

Allow teams to configure which model gh-aw uses by default instead of always relying on the current built-in default.

Goals

  • Support: Define and implement a team-friendly way to set a preferred default model, including the scope and precedence of configuration and the circumstances in which it applies.
  • Document: Explain how to configure the model, which models/runtimes are supported, when the configuration takes effect, and any limitations or fallback behavior.
  • User-friendly: Make the setting discoverable, validate unsupported or incompatible values with actionable errors, and clearly report which model is selected and why.

Acceptance criteria

  • Teams can configure a preferred model without having to change every workflow individually.
  • The behavior is well-defined for explicit per-workflow model settings, team defaults, and the existing built-in default.
  • Supported configuration locations, precedence, eligibility conditions, and fallback/error behavior are documented.
  • Invalid or unsupported model choices produce clear, actionable feedback.
  • Existing workflows that do not opt into the new configuration continue to behave as they do today.

Activity

  1. locked and limited conversation to collaborators on Oct 19, 2026
  2. unlocked this conversation on Oct 19, 2026
  3. linked a pull request that will close this issueSupport team-configurable default models #70349on Oct 19, 2026
  4. pelikhan commented on Oct 19, 2026

    @pelikhan
    Collaborator

    @SivaKesava1 @rabecket

  5. SivaKesava1 commented on Oct 19, 2026

    @SivaKesava1
    Collaborator

    Teams have two ways to avoid choosing a model in every workflow: a team default model, or model routing, which picks the model for each run. Both work today.

    Option 1: a team default model

    For Copilot, Claude and Codex, set an organization or repository Actions variable:

    gh variable set GH_AW_DEFAULT_MODEL_COPILOT --org MY_ORG --body "opus"

    Precedence, resolved when the workflow runs (see Compiler Enterprise Environment Controls):

    1. model: in the workflow frontmatter
    2. the phase-specific GH_AW_MODEL_AGENT_<ENGINE> / GH_AW_MODEL_DETECTION_<ENGINE>
    3. GH_AW_DEFAULT_MODEL_<ENGINE>
    4. gh-aw's built-in default

    The value goes through the same model resolution as model:, so we recommend an alias (opus, sonnet, gpt-5, small) rather than an exact id. An alias follows the newest live model, so the default keeps working when Copilot retires a model; an exact id fails once it's gone.

    Option 2: let model routing choose per run

    Model routing (experimental) doesn't fix one model. For each run, a router classifies the task and picks a model and reasoning effort from the models your Copilot plan offers:

    permissions:
      copilot-requests: write
    engine:
      id: copilot
      model-routing:
        goal: cost   # or cost-speed
        mode: auto   # or economy, balanced, robust
    • mode sets how likely the choice should be to succeed: economy for triage and labeling, balanced for general work, robust where a failed run is costly (for example opening PRs), and auto to decide per task.
    • goal picks among the choices that meet that target: the cheapest (cost) or the fastest (cost-speed).
    • Routing works with the Copilot, Claude, Codex and pi engines when they use Copilot inference behind the AWF firewall.

    Making it team-wide. There is no organization variable for routing. Instead, put the routing settings, and optionally a model policy, in a shared file that workflows import (Shared routing settings):

    # .github/workflows/shared/routing.md
    ---
    engine:
      id: copilot
      model-routing:
        goal: cost
        mode: auto
    models:
      blocked: ["claude-opus-*"]   # team guardrail: the firewall rejects these in every request
    ---

    models.allowed / models.blocked is the team's model policy. It applies to every model request in the run (main agent and sub-agents), with or without routing, and imported policies are merged.

    How routing and the default interact. When routing is enabled it chooses the main agent's model and effort, so it overrides model:, GH_AW_MODEL_AGENT_* and GH_AW_DEFAULT_MODEL_* (the compiler warns if a fixed model is also set). Threat detection and declared sub-agents keep their own models.

    Which to use:

    • A team default fits when you want the same behaviour on every run, or you depend on one model's specific strengths.
    • Routing fits when tasks vary in difficulty and you want cost to follow the task, and it never pins a model name that can be retired.
    • Routing is still experimental: it chooses the main agent's model only, and the same task can occasionally get a different choice (known limitations).

    Gaps we see

    • Pi (and Gemini/Agy) have no GH_AW_DEFAULT_MODEL_<ENGINE> variable.
    • Errors don't name the variable. When a team default names an unavailable model, the failure says the model is unavailable but not that GH_AW_DEFAULT_MODEL_<ENGINE> set it.
    • No organization-level routing default. Routing and model policies can be shared by import, but not set once for the whole organization.

    @v1v, does one of these options cover what you need, or are you looking for something they can't express (for example, defaults per team within one organization, or an organization-wide routing default)?

  6. pelikhan commented on Oct 22, 2026

    @pelikhan
    Collaborator

    Still relevant, but narrower than adding team defaults from scratch. Reviewed remote main at ffdd9c9.

    Copilot/Claude/Codex already have organization/repository Actions defaults, with documented precedence: explicit workflow model → phase variable → engine default → built-in fallback. That satisfies the basic team-default path for those engines.

    The actionable acceptance gap is reporting which setting selected the model and naming that setting when it fails. The override expression collapses the inputs to a value; the model-substitution diagnostic does not identify its originating Actions variable. #70349 is closed, unmerged, so its proposed provenance diagnostics are not shipped evidence.

    Next action: carry the winning configuration source into selection metadata and unavailable/incompatible-model errors, with coverage for explicit, phase, default, and unset cases. Also resolve the supported-runtime scope explicitly: the registered default variables still cover only Copilot/Claude/Codex, not pi/Gemini/Agy. An organization-wide routing default remains a separate scope decision; shared routing imports require workflow opt-in and are not that default.

  7. added
    backlog:engines
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai-inspectedbacklog:enginescommunitymodel-routing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions