Skip to content

[awf] Copilot engine: validate model alias resolution before AWF provider startup to surface retired-model errors clearly #4021

Description

@lpcox

Problem

When a workflow specifies a retired model (e.g., gpt-5-codex), gh-aw accepts it, compiles the workflow, and passes the literal string to the Copilot CLI. The resulting startup failure looks like a provider auth error, not a model configuration error, confusing workflow authors.

Context

Upstream report: github/gh-aw#35032

Root Cause

gh-aw's model validation happens after AWF provider initialization. When the model alias resolves to a retired model, the Copilot CLI returns an auth-style error because it cannot load the model endpoint. The error message does not mention the model name.

Proposed Solution

  1. In the gh-aw compiler/engine initialization, resolve model aliases to canonical names before starting the AWF provider.
  2. Query the Copilot model catalogue at compile time; if the resolved model is absent or retired, emit a clear error: model 'gpt-5-codex' is retired — use one of: [list].
  3. Fail fast before AWF containers are started, so users see the actionable error immediately.
  4. Add a test asserting that a retired model name produces the new error message.

Generated by Firewall Issue Dispatcher · sonnet46 1.2M ·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions