Conversation
…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 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
Fixed in 07c5801. When no model is explicitly configured (via frontmatter or 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot It should show the actual model for auditability. |
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6bbd3eaa-4b1e-4dfe-b7b1-10205426f944
Fixed in 9f249f3.
The actual model value flows through: 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
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_VERSIONto the installation/default engine version when not explicitly configured. - Default
GH_AW_INFO_MODELto 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.
| // 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) | ||
| } |
There was a problem hiding this comment.
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.
| // 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 "" | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
Both
model: (none)andversion: (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_VERSIONnow falls back toagentVersion(fromgetInstallationVersion()) when no explicit version is configured, so the run details always show the version being used:compiler_yaml.go:GH_AW_INFO_MODELnow uses|| 'auto'as the fallback for known engines (copilot, claude, codex, gemini) instead of|| '', so the runtime-evaluated model (e.g. the value ofGH_AW_MODEL_AGENT_*) is captured at activation time, falling back toautowhen no model is configured.compiler_yaml_helpers.go: AddedgetDefaultAgentModel()helper that returns"auto"for known engines and""for custom/unknown engines.safe_outputs_env.go:buildEngineMetadataEnvVarsnow always setsGH_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 inbuildJobLevelSafeOutputEnvVarsfor the consolidated safe-outputs job.aw_info_agent_version_test.go: Expanded assertion to also verifyGH_AW_INFO_VERSIONmatches 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:
After:
The actual model value flows through:
GH_AW_INFO_MODEL(activation) →generate_aw_infooutput →activation.outputs.model→agent.outputs.model→GH_AW_ENGINE_MODEL(safe-outputs footer). A user-configured model (viaengine.modelfrontmatter or theGH_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.