Skip to content

bug: Copilot CLI 1.0.21 added a startup model validation step: when COPILOT_MODEL is set #25593

@jaroslawgajewski

Description

@jaroslawgajewski

Root Cause

Copilot CLI 1.0.21 added a startup model validation step: when COPILOT_MODEL
is set, the CLI calls GET /models to validate the requested model name before
execution. The /models endpoint does not accept classic PATs (ghp_*).

Workflows that do not set COPILOT_MODEL (i.e., use the default model)
are unaffected — they never trigger the validation call.

Affected Scope

  • Trigger: COPILOT_MODEL is set in the agent environment.
  • Token type: Classic PAT (ghp_*) used as COPILOT_GITHUB_TOKEN.
  • Unaffected: Workflows without COPILOT_MODEL; OAuth or fine-grained tokens.

Reproduction

  1. Use gh-aw v0.67.3 with COPILOT_GITHUB_TOKEN set to a classic PAT.
  2. Set COPILOT_MODEL=gpt-5.4 (or any model) in the agent environment.
  3. Trigger any workflow. Observe exit code 1 on the "Execute GitHub Copilot CLI" step.

Expected Behaviour

Model validation should either:

  • Accept classic PATs (parity with previous CLI versions), OR
  • Fail gracefully with a clear diagnostic pointing to the token type issue.

Prior Versions

gh-aw v0.67.2 (Copilot CLI 1.0.20) did not perform model validation on
startup. This regression was introduced silently in v0.67.3.

Environment

  • gh-aw CLI: v0.67.3
  • AWF: v0.25.16
  • Copilot CLI: 1.0.21
  • GitHub MCP Server: v0.32.0
  • MCP Gateway: v0.2.16
  • COPILOT_GITHUB_TOKEN type: classic PAT

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