Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions scripts/ci/smoke-copilot-byok-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ describe('smoke copilot BYOK workflow model selection', () => {
expect(source).toContain('COPILOT_MODEL: claude-haiku-4.5');
});

it.each(byokLockPaths)('forces workflow-level COPILOT_MODEL in %s', (lockPath) => {
it.each(byokLockPaths)('sets workflow-level COPILOT_MODEL env in %s', (lockPath) => {
const lock = fs.readFileSync(lockPath, 'utf-8');

expect(lock).toContain('COPILOT_MODEL: ${{ env.COPILOT_MODEL }}');
expect(lock).not.toContain('COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || env.COPILOT_MODEL }}');
// The compiled lock file should define COPILOT_MODEL at the workflow env level
// (pinned model from the source .md) and use vars-based selection in the agent job
expect(lock).toMatch(/^\s+COPILOT_MODEL:\s*(?:claude-haiku-4\.5|o4-mini-aw)\s*$/m);
expect(lock).not.toMatch(/COPILOT_MODEL:\s*\$\{\{\s*vars\.GH_AW_MODEL_AGENT_COPILOT\s*\|\|\s*env\.COPILOT_MODEL\s*\}\}\s*/);
});
});
Loading