Skip to content

Fix missing model and version in activation run details and safe-output footers#22405

Merged
pelikhan merged 5 commits intomainfrom
copilot/add-model-and-version-to-activation-run-details
Mar 23, 2026
Merged

Fix missing model and version in activation run details and safe-output footers#22405
pelikhan merged 5 commits intomainfrom
copilot/add-model-and-version-to-activation-run-details

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

Both model: (none) and version: (none) were shown in the activation step's Run details for workflows without an explicit engine model or version configured. Additionally, the model was not reflected in safe-output XML comment markers used for auditability.

Changes

  • compiler_yaml.go: GH_AW_INFO_VERSION now falls back to agentVersion (from getInstallationVersion()) when no explicit version is configured, so the run details always show the version being used:
// Before: version was "" when no explicit EngineConfig.Version
version := ""
if data.EngineConfig != nil && data.EngineConfig.Version != "" {
    version = data.EngineConfig.Version
}
agentVersion := getInstallationVersion(data, engine)

// After: defaults to installation version, explicit config still takes priority
agentVersion := getInstallationVersion(data, engine)
version := agentVersion
if data.EngineConfig != nil && data.EngineConfig.Version != "" {
    version = data.EngineConfig.Version
}
  • compiler_yaml.go: GH_AW_INFO_MODEL now uses || 'auto' as the fallback for known engines (copilot, claude, codex, gemini) instead of || '', so the runtime-evaluated model (e.g. the value of GH_AW_MODEL_AGENT_*) is captured at activation time, falling back to auto when no model is configured.

  • compiler_yaml_helpers.go: Added getDefaultAgentModel() helper that returns "auto" for known engines and "" for custom/unknown engines.

  • safe_outputs_env.go: buildEngineMetadataEnvVars now always sets GH_AW_ENGINE_MODEL. When no explicit model is configured, it falls back to ${{ needs.agent.outputs.model }} — the runtime model captured by the activation job — so safe-output XML comment markers always show the actual model used for auditability.

  • compiler_safe_outputs_job.go: Same runtime model fallback applied in buildJobLevelSafeOutputEnvVars for the consolidated safe-outputs job.

  • aw_info_agent_version_test.go: Expanded assertion to also verify GH_AW_INFO_VERSION matches the expected version in the no-explicit-version case.

  • Golden files & lock files: Updated WASM golden files and recompiled all 177 workflow lock files.

Result:

Before:

Run details - copilot
model: (none)
version: (none)

After:

Run details - copilot latest
model: auto         ← or the configured model/variable value
version: latest

The actual model value flows through: GH_AW_INFO_MODEL (activation) → generate_aw_info output → activation.outputs.modelagent.outputs.modelGH_AW_ENGINE_MODEL (safe-outputs footer). A user-configured model (via engine.model frontmatter or the GH_AW_MODEL_AGENT_* GitHub variable) takes full priority throughout.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…tivation run details

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/184336d4-153b-4b68-9a64-7649df5a12da
Copilot AI changed the title [WIP] Add model and version to activation run details Fix missing version in activation run details Mar 23, 2026
Copilot AI requested a review from mnkiefer March 23, 2026 10:27
@mnkiefer
Copy link
Contributor

@copilot Both version and model were missing.

…odel is configured

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/af751507-52b5-4d5f-a7aa-8b46868ee39a
Copy link
Contributor Author

Copilot AI commented Mar 23, 2026

@copilot Both version and model were missing.

Fixed in 07c5801. When no model is explicitly configured (via frontmatter or GH_AW_MODEL_AGENT_COPILOT variable), the run details now show model: auto instead of model: (none) — indicating the model is automatically selected by the AI provider. A user-configured model still takes full priority.

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 --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git --local credential.helperev-parse x_amd64/vet 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 /tmp/go-build314-c tnet/tools/bash git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/find -unreachable=falsh /tmp/go-build314-c /opt/hostedtoolc&#34;prettier&#34; --write &#39;../../../**/*.json&#39; &#39;!../../../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettierignore find (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 /tmp/go-build314-c ash git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /tmp/TestGetNpmBinPathSetup_GorootOrdering1190501966/001/go/1.25.0/x64/bin/go -unreachable=falsh /tmp/go-build314-c /opt/hostedtoolc&#34;prettier&#34; --write &#39;../../../**/*.json&#39; &#39;!../../../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettierignore go (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 -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /home/REDACTED/.local/bin/bash (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 se 0844375/b044/vet.cfg .cfg (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 get --local x_amd64/vet credential.helpebash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git --noprofile (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 -unreachable=false /tmp/go-build3140844375/b080/vet.cfg /opt/hostedtoolcache/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 -unreachable=false /tmp/go-build3140844375/b166/vet.cfg /opt/hostedtoolcache/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 x_amd64/vet /usr/bin/git --verify copilot/add-moderev-parse x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git --noprofile (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 -unreachable=false /tmp/go-build3140844375/b144/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -bool -buildtags /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /home/REDACTED/.cargo/bin/bash -errorsas -ifaceassert -nilfunc bash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -bool -buildtags /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /usr/local/bin/bash -errorsas -ifaceassert -nilfunc bash (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 -unreachable=false /tmp/go-build3140844375/b071/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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 -unreachable=false /tmp/go-build3140844375/b077/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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 --noprofile (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 h ../../../.pret.prettierignore /opt/hostedtoolc--log-level=error /usr/bin/git -unreachable=falnode /tmp/go-build314/home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/pre�� /opt/hostedtoolc--write git rev-�� w/js/**/*.json&#39; --ignore-path /opt/hostedtoolc../../../.prettierignore /usr/bin/git -unreachable=falgit /tmp/go-build314-C /home/REDACTED/.ca/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility --show-toplevel /tmp/go-build1148067815/b001/workflow.test r: $owner, name: $name) { hasDiscussionsEnabled } } -test.timeout=10infocmp -test.count=1 /usr/bin/git git js ../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettierignore git /usr/bin/git --show-toplevel r /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha --noprofile (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --noprofile (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 (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 w/js/**/*.json&#39; --ignore-path /opt/hostedtoolc../../../.prettierignore /usr/bin/git -bool -buildtags /home/REDACTED/.loxterm-color git log --oneline bec1814a9664cc4fe89a6df9f5b4a05403d8608a..HEAD /usr/bin/git --noprofile -tests /home/REDACTED/.loxterm-color 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 (http block)

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

Copilot AI changed the title Fix missing version in activation run details Fix missing model and version in activation run details Mar 23, 2026
@mnkiefer
Copy link
Contributor

@copilot It should show the actual model for auditability.

Copy link
Contributor Author

Copilot AI commented Mar 23, 2026

@copilot It should show the actual model for auditability.

Fixed in 9f249f3. GH_AW_ENGINE_MODEL in safe-output jobs now falls back to ${{ needs.agent.outputs.model }} — the runtime-evaluated model from the activation job's generate_aw_info step. This means:

  • If a model is configured via frontmatter or the GH_AW_MODEL_AGENT_* GitHub variable: that model name shows in the XML comment marker (e.g. model: gpt-4o)
  • If neither is set: the marker shows model: auto

The actual model value flows through: GH_AW_INFO_MODEL (activation) → generate_aw_info output → activation.outputs.modelagent.outputs.modelGH_AW_ENGINE_MODEL (safe-outputs footer).

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 (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 53 ash git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git -unreachable=falnode /tmp/go-build361/opt/hostedtoolcache/node/24.14.0/x64/bin/npx 6460555/b287/vetprettier 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 6460555/b074/vet-c ache/go/1.25.0/x&#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error git rev-�� h ../../../.prettierignore ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile /usr/bin/git -unreachable=falnode /tmp/go-build361/home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/prettier /opt/hostedtoolc--write git (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 -unreachable=false /tmp/go-build3616460555/b212/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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 scripts synced successfully&#34; .cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --noprofile -tests /usr/bin/git ./cmd/gh-aw (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git --local gpg.program x_amd64/vet git rev-�� --show-toplevel x_amd64/vet n-dir/node (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 -unreachable=false /tmp/go-build3616460555/b032/vet.cfg 6460555/b275/vet.cfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha /tmp/go-build3616460555/b075/_pkg_.a -trimpath 6460555/b300/vet.cfg -p testing/internalrev-parse -lang=go1.25 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build3616460555/b119/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet go1.25.0 -c=4 -nolocalimports /opt/hostedtoolcache/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 x_amd64/vet /usr/bin/git get --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git set-url origin x_amd64/compile git (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 -unreachable=false /tmp/go-build3616460555/b020/vet.cfg 6460555/b288/vet.cfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha 4674718/b001/workflow.test /tmp/go-build3616460555/b047/vet.cfg 4674718/b001/importcfg.link (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -unreachable=false /tmp/go-build3616460555/b052/vet.cfg 6460555/b295/vet.cfg customEnvVars\|egit _job.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 -unreachable=false /tmp/go-build3616460555/b039/vet.cfg 6460555/b285/vet.cfg .json...&#34; (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 -unreachable=false /tmp/go-build3616460555/b033/vet.cfg 6460555/b293/vet.cfg (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 --noprofile .cfg 64/pkg/tool/linux_amd64/vet (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 ath ../../../.pr**/*.json ache/go/1.25.0/x--ignore-path /usr/bin/git -unreachable=falsh /tmp/go-build361-c (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility 0/x64/bin/git git r: $owner, name: $name) { hasDiscussionsEnabled } } --show-toplevel (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha --noprofile (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --noprofile (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 .egg (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 ache/go/1.25.0/x64/pkg/tool/linux_amd64/cgo /usr/bin/git -bool -buildtags /opt/hostedtoolc--get git rev-�� js/**/*.json&#39; --ignore-path ../../../.prettierignore /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/sed -bool -buildtags /usr/bin/git sed (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 .egg (http block)

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

Copilot AI changed the title Fix missing model and version in activation run details Fix missing model and version in activation run details and safe-output footers Mar 23, 2026
This was referenced Mar 23, 2026
@pelikhan pelikhan marked this pull request as ready for review March 23, 2026 16:22
Copilot AI review requested due to automatic review settings March 23, 2026 16:22
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 missing/blank engine model and version metadata in activation run details and propagates the resolved model into safe-output footer metadata for improved auditability.

Changes:

  • Default GH_AW_INFO_VERSION to the installation/default engine version when not explicitly configured.
  • Default GH_AW_INFO_MODEL to a non-empty fallback (auto) for known engines when no model is configured.
  • Ensure safe-output footer metadata includes the effective model by falling back to needs.agent.outputs.model.

Reviewed changes

Copilot reviewed 187 out of 187 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/workflow/compiler_yaml.go Sets version fallback to installation version; adds model fallback logic for activation run info.
pkg/workflow/compiler_yaml_helpers.go Adds getDefaultAgentModel() helper for known-engine default model display.
pkg/workflow/safe_outputs_env.go Adds runtime-model fallback for GH_AW_ENGINE_MODEL when no compile-time model is configured.
pkg/workflow/compiler_safe_outputs_job.go Adds runtime-model fallback for consolidated safe-outputs job env var injection.
pkg/workflow/aw_info_agent_version_test.go Expands assertions to cover GH_AW_INFO_VERSION fallback behavior.
pkg/workflow/step_summary_test.go Updates expectations for model env-var expression fallback variants.
pkg/workflow/safe_output_helpers_test.go Updates expectations for engine metadata env vars to include model fallback.
pkg/workflow/testdata/wasm_golden/** Updates compiled golden outputs to reflect new defaults (auto, latest).
.github/workflows/*.lock.yml Regenerates workflow lock files to reflect updated activation and safe-output metadata.

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

Comment on lines +654 to +661
// Use the engine's default model as fallback when neither explicit model nor
// model variable is configured, so the run details show "auto" rather than "(none)".
defaultModel := getDefaultAgentModel(engineID)
if defaultModel != "" {
fmt.Fprintf(yaml, " GH_AW_INFO_MODEL: ${{ vars.%s || '%s' }}\n", modelEnvVar, defaultModel)
} else {
fmt.Fprintf(yaml, " GH_AW_INFO_MODEL: ${{ vars.%s || '' }}\n", modelEnvVar)
}
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

For engineID "gemini", modelEnvVar currently falls through to EnvVarModelAgentCustom (see the switch earlier in generateCreateAwInfo), so this will render vars.GH_AW_MODEL_AGENT_CUSTOM || 'auto' and ignore GH_AW_MODEL_AGENT_GEMINI. Add an explicit "gemini" case mapping to constants.EnvVarModelAgentGemini so activation captures the correct runtime model variable for Gemini.

Copilot uses AI. Check for mistakes.
Comment on lines +175 to +185
// getDefaultAgentModel returns the model display value to use when no explicit model is configured.
// Returns "auto" for known engines whose model is dynamically determined by the AI provider
// (i.e. the provider chooses the model automatically), or empty string for custom/unknown engines.
func getDefaultAgentModel(engineID string) string {
switch engineID {
case "copilot", "claude", "codex", "gemini":
return "auto"
default:
return ""
}
}
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

getDefaultAgentModel treats "gemini" as a known engine, but getInstallationVersion (above) does not include a "gemini" case (even though constants.DefaultGeminiVersion exists). This means GH_AW_INFO_VERSION will still be empty for Gemini when no explicit version is configured. Consider adding a "gemini" branch in getInstallationVersion returning constants.DefaultGeminiVersion so the version fallback works consistently for known engines.

Copilot uses AI. Check for mistakes.
@pelikhan pelikhan merged commit 9976689 into main Mar 23, 2026
114 checks passed
@pelikhan pelikhan deleted the copilot/add-model-and-version-to-activation-run-details branch March 23, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing model/version in activation run details

4 participants