Skip to content

Fix copilot fallback model path to use COPILOT_MODEL env var instead of --model flag#19509

Merged
pelikhan merged 3 commits intomainfrom
copilot/fix-copilot-model-path
Mar 4, 2026
Merged

Fix copilot fallback model path to use COPILOT_MODEL env var instead of --model flag#19509
pelikhan merged 3 commits intomainfrom
copilot/fix-copilot-model-path

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

When engine.model is not set in frontmatter, the compiler was appending ${GH_AW_MODEL_AGENT_COPILOT:+ --model "$GH_AW_MODEL_AGENT_COPILOT"} to the shell command. The Copilot CLI rejects --model as a flag entirely — only COPILOT_MODEL env var is supported. This made the org-variable model path broken for every workflow not using inline engine.model.

Changes

copilot_engine_execution.go

  • Removed needsModelFlag and the ${VAR:+ --model "$VAR"} shell expansion entirely
  • Fallback path now maps the org variable into COPILOT_MODEL directly, matching the explicit-model path:
# Before (broken)
run: copilot ... ${GH_AW_MODEL_AGENT_COPILOT:+ --model "$GH_AW_MODEL_AGENT_COPILOT"}
env:
  GH_AW_MODEL_AGENT_COPILOT: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }}

# After (correct)
run: copilot ...
env:
  COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }}

Applies to both agent (GH_AW_MODEL_AGENT_COPILOT) and detection (GH_AW_MODEL_DETECTION_COPILOT) jobs.

model_env_vars_test.go

  • Removed copilot cases from TestModelEnvVarInjectionForAgentJob and TestModelEnvVarInjectionForDetectionJob — they were asserting the broken --model flag behavior
  • Added TestCopilotFallbackModelMapsToNativeEnvVar covering both agent and detection job variants

heredoc_interpolation_test.go

  • Fixed a test that was checking for ${GH_AW_ in compiled output — this was only passing because the now-removed model flag expansion happened to match. The prompt content actually uses __GH_AW_...__ (Handlebars placeholder syntax); updated check accordingly.

Golden files & lock files

  • Updated wasm golden files and recompiled all 165 workflow lock files to reflect the new env block structure.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GO111MODULE 64/bin/go git rev-�� pload-artifact/git/ref/tags/v7 go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GO111MODULE 64/bin/go git rev-�� pload-artifact/git/ref/tags/v7 go /usr/bin/git cli/install.sh..git GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw git 64/bin/go git rev-�� --show-toplevel node (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha add origin /usr/bin/git -json GO111MODULE 64/bin/go git conf�� user.email test@example.com /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha xterm-color sh /usr/bin/git "prettier" --wrigit git 64/bin/go git rev-�� --show-toplevel t /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/pipx_bin/sh GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x--jq (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE /usr/local/bin/sh GOINSECURE GOMOD GOMODCACHE sh -c "prettier" --check '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.pret.prettierignore GOPROXY /usr/bin/git GOSUMDB GOWORK 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha '**/*.ts' '**/*.json' --ignore-path ../../../.pr**/*.json GO111MODULE 8d519d9/node_modules/.bin/prettier GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 680605/b419/imporemote.origin.url /opt/hostedtoolcache/node/24.13.1/x64/bin/node k/gh-aw/gh-aw/scgit k/gh-aw/gh-aw/screv-parse 64/bin/go node /tmp�� /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/brave.md /opt/hostedtoolc/tmp/go-build4230178063/b395/_testmain.go /usr/bin/infocmp /tmp/go-build820git -trimpath 64/bin/go infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha /tmp/gh-aw-test-runs/20260304-051859-27661/test-1833687326 config /usr/bin/git remote.origin.urgit GO111MODULE 64/bin/go git conf�� user.name Test User e/git 680605/b402/_pkggit GO111MODULE 64/bin/go e/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --get remote.origin.url 28142ea28640e73dbec04231d8c86d181a13e84c1c94ebff59b1e2ac8c81ae04-d 80bf13b2620176ebgit GO111MODULE 64/bin/go git init�� erignore 98SOCpl_QrR0 ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet 680605/b384/_pkggit GO111MODULE 64/bin/go ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� pload-artifact/git/ref/tags/v7 go /usr/bin/git -json GO111MODULE 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha g_.a GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env tutil.test g/envutil/envutil_test.go ortcfg.link GOINSECURE GOMOD GOMODCACHE _hV3O2Cg4KalLpCxFj/loOf-cgjR6MKz0XVD7GS/mRL0tEU7JbrieQ94-F8q (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha s "-s -w -X main.version=421b3d4-dirty" -o gh-aw ./cmd/gh-aw GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE go env 1859-27661/test-2066814382 GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go ache�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha g/logger/exampleGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 680605/b398/_pkgGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha a1e46e74a3655a0aGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/sh ache/go/1.25.0/xGO111MODULE env 680605/b414/_pkgGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/time-atomic GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha /tmp/gh-aw-test-runs/20260304-051859-27661/test-9683608 0178063/b428/_testmain.go /usr/bin/git g/cli/access_loggit g/cli/actionlintrev-parse 64/bin/go git rev-�� --show-toplevel ache/go/1.25.0/xGO111MODULE e/git 680605/b357/_pkggit GO111MODULE 64/bin/go e/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha /tmp/gh-aw-test-runs/20260304-052013-40176/test-3356202311/.github/workflows rev-parse /usr/bin/git --write **/*.cjs 64/bin/go git rev-�� --show-toplevel node /usr/bin/git prettier --write modules/@npmcli/--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha -json GO111MODULE ache/node/24.13.1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*.js' --ignore-path .prettierignore GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel -extld=gcc /usr/bin/git 92621063164b9cfcgit GO111MODULE 64/bin/go git conf�� --get remote.origin.url /usr/bin/git 680605/b354/_pkggit GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel node /usr/bin/git --write **/*.cjs 64/bin/go git rev-�� s/test.md node /usr/bin/git prettier --write 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha -json GO111MODULE es/.bin/sh GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*.js' --ignore-path .prettierignore GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha -json GO111MODULE 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE go t-ha�� ithub/workflows/agent-persona-explorer.md GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha ck 'scripts/**/*.js' --ignore-path .prettierignore GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /home/REDACTED/work/gh-aw/gh-aw/node_modules/.bin/node GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE tions/setup/js/node_modules/.bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha -json GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha -json GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env aw.test GO111MODULE ortcfg.link GOINSECURE GOMOD GOMODCACHE PXIu3Rj7Nwxxi7Q9ca/ny1RJv3hXd3Qzku74ENl/Ap7TMFO4--jq (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha --show-toplevel infocmp ache/go/1.25.0/x64/bin/node xterm-color git n-dir/bash git ache�� --show-toplevel nly /usr/bin/git --show-toplevel git n-dir/bash git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/bin/sh GOINSECURE GOMOD GOMODCACHE go env archie.md GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go estl�� -json GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 1/x64/bin/sh GOINSECURE GOMOD GOMODCACHE go env .js' --ignore-path .prettierignore GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env .js' --ignore-path .prettierignore GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE de/node/bin/sh GOINSECURE GOMOD GOMODCACHE go env .js' --ignore-path .prettierignore GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env .js' --ignore-path .prettierignore GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path heck '**/*.cjs' GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git ache/node/24.13.1/x64/bin/node git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git sh git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha -json GO111MODULE At,event,headBranch,headSha,displayTitle GOINSECURE GOMOD GOMODCACHE go env 3257218178/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha ath ../../../.pr**/*.json !../../../pkg/wo--ignore-path 64/bin/go ../../../.pretti/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet go /usr/bin/git go env re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha "prettier" --wriGOINSECURE git 64/bin/go uest|push_to_pulnode go 86_64/node sh -c npx prettier --w**/*.ts git 64/bin/go --show-toplevel go /usr/bin/git go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha "prettier" --wriGOSUMDB git 64/bin/go rror go /usr/bin/git go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha e=false GO111MODULE 64/bin/go GOINSECURE %H %ct %D GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha 680605/b392/_pkgGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/envu-atomic GOMODCACHE go env v2pU/RWquzQgp_1Y-errorsas GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 680605/b392/imporev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha 680605/b393/_pkgGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env XWML/sJ2GQWlxnpa-errorsas GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 680605/b393/impo-tests (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha ath ../../../.pr**/*.json ../../../**/*.js--ignore-path 64/bin/go --ignore-path ../../../.pretti-atomic /usr/bin/git go env re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git 64/pkg/tool/linux_amd64/vet git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git --show-toplevel git ache/go/1.25.0/xgraphql git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha ath ../../../.pr**/*.json ../../../**/*.js--ignore-path 64/bin/go --ignore-path ../../../.pretti-atomic /usr/bin/git go env re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha "prettier" --wriGOINSECURE git 64/bin/go --show-toplevel go /usr/bin/git sh -c npx prettier --w**/*.ts git 64/bin/go --show-toplevel go /usr/bin/git dependencies." (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env " GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go m/_n�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go --show-toplevel go /usr/bin/gh sh -c npx prettier --wGOSUMDB gh 64/bin/go /repos/actions/ush --jq /usr/bin/git go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go --show-toplevel go 64/bin/node sh -c npx prettier --wGOSUMDB git 64/bin/go --show-toplevel go /usr/bin/infocmp"prettier" --check 'scripts/**/*.js' --ignore-path .prettierignore go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build4230178063/b383/cli.test /tmp/go-build4230178063/b383/cli.test -test.testlogfile=/tmp/go-build4230178063/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE rtcfg k/gh�� ternal/tools/genGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD erignore ache/go/1.25.0/xGO111MODULE (http block)
    • Triggering command: /tmp/go-build35402538/b383/cli.test /tmp/go-build35402538/b383/cli.test -test.testlogfile=/tmp/go-build35402538/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true --show-toplevel 64/pkg/tool/linuenv run-script/lib/n-json sh -c "prettier" --wriGOINSECURE git de "; \ else \ echo "��� Warning: .github/aw/actions-lock.json does not exist yet"; \ fi dwFO3cBOLj36ZOwl-w /usr/bin/git node (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name prettier --write 64/bin/go **/*.ts **/*.json --ignore-path node /opt�� run format:pkg-json 64/bin/go xterm-color go /usr/bin/git go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Copilot engine fallback model path uses --model CLI flag instead of COPILOT_MODEL env var</issue_title>
<issue_description>## What happens

When engine.model is not explicitly configured in workflow frontmatter, the compiler generates a shell command that conditionally appends --model "$GH_AW_MODEL_AGENT_COPILOT" as a CLI flag to the Copilot CLI invocation. The Copilot CLI does not accept --model as a flag — it errors with argument '<model>' is invalid.

When engine.model is configured, the compiler correctly sets the COPILOT_MODEL environment variable, which the Copilot CLI reads natively. So the "explicit model" path works, but the "fallback from GitHub org variable" path is broken.

The test suite contains contradictory expectations: one test expects the --model flag to appear, while another asserts it should NOT appear.

What should happen

Both code paths should use COPILOT_MODEL as an environment variable. When the model comes from a GitHub org variable (GH_AW_MODEL_AGENT_COPILOT), the compiler should map it to COPILOT_MODEL in the step's env: block rather than appending it as a CLI flag.

Where in the code

All references are to main at 99b2107.

Path selection:

  • copilot_engine_execution.go:78modelConfigured := workflowData.EngineConfig != nil && workflowData.EngineConfig.Model != "" determines which path is taken

Broken fallback path (no explicit model):

  • copilot_engine_execution.go:154needsModelFlag := !modelConfigured
  • copilot_engine_execution.go:182-183 — sandbox mode: generates ${GH_AW_MODEL_AGENT_COPILOT:+ --model "$GH_AW_MODEL_AGENT_COPILOT"}
  • copilot_engine_execution.go:191-192 — non-sandbox mode: same --model flag expansion
  • copilot_engine_execution.go:312-318 — sets GH_AW_MODEL_AGENT_COPILOT or GH_AW_MODEL_DETECTION_COPILOT in env block (the value source is correct, but it's consumed as a CLI flag)

Correct explicit-model path:

  • copilot_engine_execution.go:309-311env[constants.CopilotCLIModelEnvVar] = workflowData.EngineConfig.Model — sets COPILOT_MODEL directly

Contradictory tests:

  • model_env_vars_test.go:21-25 — expects --model flag in shell command (tests the broken behavior)
  • model_env_vars_test.go:213-243 — asserts --model flag should NOT appear when COPILOT_MODEL env var is used

Evidence

Source-level verification (2026-03-03):

  • Confirmed both code paths exist at the specified lines on current main
  • Confirmed needsModelFlag is true exactly when modelConfigured is false
  • The generated shell expansion ${GH_AW_MODEL_AGENT_COPILOT:+ --model "$GH_AW_MODEL_AGENT_COPILOT"} will pass --model gpt-5 (or whatever value) as a positional argument to the Copilot CLI

Copilot CLI verification (v0.0.421):

  • copilot --model gpt-5 --prompt 'say hi' fails with argument 'gpt-5' is invalid
  • COPILOT_MODEL=gpt-5 copilot --prompt 'say hi' runs normally
  • Confirms the CLI does not accept --model as a flag; the env var is the only supported mechanism

Related issue: #17265 (closed) requested the model be provided via env var. The fix was applied for the explicit-model path (COPILOT_MODEL env var) but the fallback path was missed and still uses the broken --model flag.

Proposed fix

In copilot_engine_execution.go, when needsModelFlag is true, instead of generating ${GH_AW_MODEL_AGENT_COPILOT:+ --model "$GH_AW_MODEL_AGENT_COPILOT"} in the shell command, map the org variable to COPILOT_MODEL in the step's env: block:

// Instead of appending --model to the shell command,
// map the org variable to the native env var:
env[constants.CopilotCLIModelEnvVar] = fmt.Sprintf("${{ vars.%s || '' }}", constants.EnvVarModelAgentCopilot)

Remove the needsModelFlag / --model flag expansion from buildCopilotCommand() entirely. Update the contradictory test at model_env_vars_test.go:21-25 to expect COPILOT_MODEL in the env block instead of --model in the command string.

Impact

Frequency: Affects every workflow run where the model is configured via GitHub org variables (GH_AW_MODEL_AGENT_COPILOT / GH_AW_MODEL_DETECTION_COPILOT) rather than inline engine.model frontmatter. This is the default path for repos that don't customize per-workflow.
Cost: The --model flag produces a hard error from the Copilot CLI. If the org variable is set, the run fails immediately. If the org variable is unset, the conditional expansion is a no-op and the default model is used — so the bug is latent until someone configures the org variable.</issue_description>

Comments on the Issue (you are @copilot in this section)

@pelikhan Use COPILOT_MODEL

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.



✨ PR Review Safe Output Test - Run 22656720599

💥 [THE END] — Illustrated by Smoke Claude ·

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Hey @pelikhan 👋 — great to see this bug fix being tracked! Issue #19473 was a well-analyzed agentic plan from the community, and this PR is the right vehicle to address it.

This is a WIP draft with no code committed yet — all tasks in the checklist are still pending. Here's a summary of what remains to land this fix:

  • Remove needsModelFlag / --model shell expansionpkg/workflow/copilot_engine_execution.go lines 154, 182–183, and 191–192 still generate \$\{GH_AW_MODEL_AGENT_COPILOT:+ --model "$GH_AW_MODEL_AGENT_COPILOT"}, which the Copilot CLI rejects with argument '' is invalid.
  • Fix the env-block fallback — lines 312–318: instead of setting GH_AW_MODEL_AGENT_COPILOT / GH_AW_MODEL_DETECTION_COPILOT (consumed as a CLI flag), map the org variable to COPILOT_MODEL (constants.CopilotCLIModelEnvVar) directly in the env: block.
  • Update TestModelEnvVarInjectionForAgentJob — the Copilot test case at model_env_vars_test.go:21–25 currently expects the broken --model flag behavior. It needs to be updated or removed.
  • Add TestCopilotFallbackModelMapsToNativeEnvVar — a new test asserting COPILOT_MODEL appears in the env block (not as a CLI flag) when the model comes from the GH_AW_MODEL_AGENT_COPILOT org variable.

Generated by Contribution Check ·

…model CLI flag

When engine.model is not configured, the compiler was generating
${GH_AW_MODEL_AGENT_COPILOT:+ --model "$GH_AW_MODEL_AGENT_COPILOT"} in
the shell command. The Copilot CLI does not accept --model as a flag.

Now both the explicit and fallback paths use COPILOT_MODEL env var:
- Explicit: COPILOT_MODEL: <configured-value>
- Fallback: COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }}

Also fixes TestHeredocInterpolation to check for __GH_AW__ placeholder
syntax instead of ${GH_AW_} shell syntax in prompt content.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Copilot engine fallback model path to use COPILOT_MODEL Fix copilot fallback model path to use COPILOT_MODEL env var instead of --model flag Mar 4, 2026
@pelikhan pelikhan marked this pull request as ready for review March 4, 2026 05:39
Copilot AI review requested due to automatic review settings March 4, 2026 05:39
@pelikhan pelikhan added the smoke label Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Copilot engine’s “fallback model” behavior by removing the invalid --model CLI flag usage and instead mapping the org-level model variables (GH_AW_MODEL_*_COPILOT) into the native COPILOT_MODEL environment variable, aligning fallback behavior with the explicit engine.model path.

Changes:

  • Updated Copilot engine execution step generation to always pass the model via COPILOT_MODEL (no --model flag / shell expansion).
  • Updated/added tests to assert the new fallback mapping behavior and adjusted a heredoc interpolation assertion to match the actual placeholder syntax.
  • Regenerated wasm golden outputs and updated numerous workflow lock files to reflect the new env: layout.

Reviewed changes

Copilot reviewed 114 out of 114 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/workflow/copilot_engine_execution.go Removes conditional --model shell expansion and maps fallback org var to COPILOT_MODEL.
pkg/workflow/model_env_vars_test.go Reworks Copilot-related expectations; adds coverage for fallback mapping to COPILOT_MODEL.
pkg/workflow/heredoc_interpolation_test.go Updates assertion to match __GH_AW_...__ placeholder syntax used in compiled output.
pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden Golden update: removes --model expansion and adds COPILOT_MODEL env mapping.
pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/smoke-copilot.golden Golden update: removes --model expansion and adds COPILOT_MODEL env mapping.
pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden Golden update: removes --model expansion and adds COPILOT_MODEL env mapping.
.github/workflows/workflow-health-manager.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/workflow-generator.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/weekly-safe-outputs-spec-review.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/test-workflow.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/test-project-url-default.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/test-dispatcher.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/terminal-stylist.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/super-linter.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/sub-issue-closer.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/smoke-update-cross-repo-pr.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/smoke-create-cross-repo-pr.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/security-review.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/security-compliance.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/repository-quality-improver.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/repo-tree-map.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/repo-audit-analyzer.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/refiner.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/q.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/pr-triage-agent.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/pr-nitpick-reviewer.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/plan.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/pdf-summary.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/notion-issue-summary.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/metrics-collector.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/issue-triage-agent.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/grumpy-reviewer.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/gpclean.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/functional-pragmatist.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/firewall.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/example-permissions-warning.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/example-custom-error-patterns.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/dictation-prompt.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/dev.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/dependabot-go-checker.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/dependabot-burner.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/dead-code-remover.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-workflow-updater.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-team-status.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-semgrep-scan.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-secrets-analysis.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-regulatory.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-malicious-code-scan.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-cli-tools-tester.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-cli-performance.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-assign-issue-to-user.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/daily-architecture-diagram.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/craft.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/copilot-pr-merged-report.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/contribution-check.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/code-simplifier.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/code-scanning-fixer.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/ci-coach.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/brave.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/bot-detection.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/artifacts-summary.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/archie.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/agent-persona-explorer.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.
.github/workflows/agent-performance-analyzer.lock.yml Lock update: remove --model expansion; add COPILOT_MODEL env mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq v4.52.4
curl 8.5.0
gh 2.87.3
node v20.20.0
python3 3.12.3
go 1.24.13
java 21.0.10
dotnet 10.0.102

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test ·

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Smoke Test: Copilot - 22656720591

Test Result
GitHub MCP
Safe Inputs GH CLI
Serena MCP
Playwright
Web Fetch
File Writing
Bash Tool
Discussion Interaction
Build gh-aw
Discussion Creation
Workflow Dispatch
PR Review

Overall: ⚠️ PARTIAL PASS (Serena MCP unavailable)

@pelikhan — run §22656720591

📰 BREAKING: Report filed by Smoke Copilot ·

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke test review ✅ — Clean simplification: using COPILOT_MODEL env var consistently removes conditional --model flag logic and eliminates duplicated sandbox/non-sandbox branches. Code is easier to read and maintain.

📰 BREAKING: Report filed by Smoke Copilot

@@ -147,12 +147,8 @@ func (e *CopilotEngine) GetExecutionSteps(workflowData *WorkflowData, logFile st
// Build the copilot command
var copilotCommand string

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification! Using COPILOT_MODEL env var consistently instead of the conditional --model flag approach makes the code much cleaner and easier to reason about.

copilotCommand = baseCommand
}
}
// Build the command - model is always passed via COPILOT_MODEL env var (see env block below)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The consolidation of the sandbox/non-sandbox branches into a single command builder is a great cleanup — the old code had identical logic in both branches.

@pelikhan pelikhan merged commit ac7a7f6 into main Mar 4, 2026
134 of 136 checks passed
@pelikhan pelikhan deleted the copilot/fix-copilot-model-path branch March 4, 2026 05:45
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Smoke Test Results - Run §22656720599

Core: ✅ GitHub MCP · ✅ GH CLI · ✅ Make Build · ✅ Playwright · ✅ Tavily · ✅ File Write · ✅ Bash · ✅ Discussion · ✅ AW MCP Status · ⚠️ Serena (activate ✅, find_symbol ❌ EOF)

PR Review: ✅ Update PR · ✅ Review Comments · ✅ Submit Review · ⚠️ Resolve Thread (skipped) · ✅ Add Reviewer · ✅ Push to Branch · ⚠️ Close PR (skipped)

Overall: PARTIAL (core tests pass, Serena find_symbol failing)

💥 [THE END] — Illustrated by Smoke Claude ·

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥 Automated smoke test review - all systems nominal!

💥 [THE END] — Illustrated by Smoke Claude

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copilot engine fallback model path uses --model CLI flag instead of COPILOT_MODEL env var

3 participants