Skip to content

[awf] BYOK smoke-copilot-byok fails: COPILOT_MODEL env var overridden with empty fallback #2048

@lpcox

Description

@lpcox

Problem

The smoke-copilot-byok workflow fails on every run with:

BYOK providers require an explicit model. Run `copilot help providers` for configuration details.

Failed run: https://github.com/github/gh-aw-firewall/actions/runs/24544776313/job/71757927017?pr=2043

Root Cause

The gh-aw compiler correctly sets COPILOT_MODEL: claude-opus-4.6 at the workflow-level env: (line 81 of the lock file). However, the agent job step overrides it with:

COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }}

Since the repo variable GH_AW_MODEL_AGENT_COPILOT is not set, this evaluates to an empty string, which overrides the workflow-level default. The Copilot CLI then sees no model and exits with code 1.

The copilot-driver retries 4 times, all failing with the same error (stderr=98B = the error message above).

Expected Behavior

The agent job step should fall back to the compiler-provided model when the repo variable is not set:

COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-opus-4.6' }}

Affected Workflow

  • smoke-copilot-byok.lock.yml line 743

Workarounds

  1. Set the GH_AW_MODEL_AGENT_COPILOT repo variable to claude-opus-4.6
  2. Manually patch the lock file fallback after each compile (fragile)

Related

  • gh-aw#26565 — COPILOT_MODEL empty fallback (upstream compiler bug)
  • This is a recurring issue after every gh aw upgrade / gh aw compile since the compiler regenerates the empty fallback each time

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

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