Skip to content

bug: byok-copilot feature generates empty COPILOT_MODEL fallback, breaking BYOK mode #26565

@lpcox

Description

@lpcox

Problem

When using the byok-copilot feature flag, the compiler generates COPILOT_MODEL with an empty string fallback:

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

Copilot CLI 1.0.28 in BYOK mode requires an explicit model and fails immediately with:

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

This means every recompile of a byok-copilot workflow requires a manual patch to the .lock.yml to set a model fallback (e.g. claude-opus-4.6), which is fragile and easy to forget.

Reproduction

  1. Create a workflow with features: byok-copilot: true
  2. gh aw compile .github/workflows/my-workflow.md
  3. Inspect the generated .lock.ymlCOPILOT_MODEL fallback is ''
  4. Run the workflow — Copilot CLI exits immediately with exit code 1

Expected behavior

The compiler should generate a non-empty default model for BYOK workflows, or allow specifying a default model in the .md frontmatter. For example:

# Option A: compiler picks a sensible default for byok-copilot
COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }}

# Option B: allow model to be specified in frontmatter
# smoke-copilot.md
features:
  byok-copilot: true
model: claude-opus-4.6

Workaround

After every gh aw compile, manually patch the lock file:

# Replace empty fallback with explicit model
sed -i "s/GH_AW_MODEL_AGENT_COPILOT || '' /GH_AW_MODEL_AGENT_COPILOT || 'claude-opus-4.6' /" .github/workflows/smoke-copilot.lock.yml

Or set the GH_AW_MODEL_AGENT_COPILOT repository variable (but this affects all copilot workflows, not just BYOK ones).

Impact

This affects both smoke-copilot and smoke-copilot-byok workflows in github/gh-aw-firewall. Every recompile (including gh aw upgrade) resets the fallback to empty, requiring manual intervention.

References

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