feat: compute models.json in activation via on-the-fly alias merge#34681
Closed
Copilot wants to merge 3 commits into
Closed
feat: compute models.json in activation via on-the-fly alias merge#34681Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
- Add actions/setup/js/models.json (pre-computed builtin aliases, copy of data/model_aliases.json) - Add MODELS_JSON_PATH constant to actions/setup/js/constants.cjs - Add actions/setup/js/compute_models.cjs: merges builtin + user aliases, writes /tmp/gh-aw/models.json, logs to step summary - Add actions/setup/js/compute_models.test.cjs: 22 unit tests (all passing) - Add MergeUserModelAliases() helper in model_aliases.go (user-level delta without builtins) - Add UserModelAliases field to WorkflowData (compact delta for GH_AW_INFO_MODEL_ALIASES) - Populate UserModelAliases in workflow_builder.go - Emit GH_AW_INFO_MODEL_ALIASES env var in compiler_yaml.go generateCreateAwInfo (only when non-empty) - Add generateComputeModelsStep() in compiler_activation_job_builder.go (new "Compute models" step after generate_aw_info) - Add /tmp/gh-aw/models.json to activation artifact upload paths - Update golden test fixtures Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…P note) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
feat: add compute_models activation step for on-fly model alias merging
feat: compute models.json in activation via on-the-fly alias merge
May 25, 2026
Copilot created this pull request from a session on behalf of
pelikhan
May 25, 2026 15:42
View session
Collaborator
|
@copilot use computed models.json when configuring awf |
…time Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done in the latest commit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Activation jobs were inlining model alias data (or omitting it entirely), causing code bloat and making model resolution unavailable to runtime scripts. This PR introduces a
Compute modelsactivation step that merges pre-computed builtin aliases with per-workflow user overrides at runtime, producing/tmp/gh-aw/models.jsonin the activation artifact.Approach
actions/setup/js/models.json(mirrored fromdata/model_aliases.json), copied bysetup.shtoRUNNER_TEMP— never inlined in compiled YAMLmodels:+ imported workflow aliases) are emitted asGH_AW_INFO_MODEL_ALIASES— a compact JSON delta omitted entirely when no overrides are definedcompute_models.cjsmerges the two layers (user wins) → writes/tmp/gh-aw/models.json→ logs a collapsible alias table to the step summary/tmp/gh-aw/models.jsonis added to the activation artifact uploadChanges
JS (
actions/setup/js/)models.json— new pre-computed builtin alias file (auto-copied bysetup.sh*.jsonglob)compute_models.cjs— merge helper:loadBuiltinAliases()+loadUserAliases()→mergeAliases()→ write + summarycompute_models.test.cjs— 22 unit testsconstants.cjs— addsMODELS_JSON_PATHGo (
pkg/workflow/)model_aliases.go—MergeUserModelAliases(): likeMergeImportedModelAliasesbut without the builtins layercompiler_types.go—UserModelAliasesfield onWorkflowData(user-level delta only)workflow_builder.go— populateUserModelAliasesalongsideModelMappingscompiler_yaml.go— emitGH_AW_INFO_MODEL_ALIASESingenerate_aw_infoenv block (only when non-empty)compiler_activation_job_builder.go—generateComputeModelsStep()inserted aftergenerate_aw_info;/tmp/gh-aw/models.jsonadded to artifact pathsResult
For a workflow with no custom models, zero model alias data appears in the compiled YAML. For a workflow with overrides, only the delta is inlined: