Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Emit model-alias deltas in AWF config and merge builtins at runtime#33875

Closed
Copilot wants to merge 4 commits into
mainfrom
copilot/update-model-mapping-compiler-log
Closed

Emit model-alias deltas in AWF config and merge builtins at runtime#33875
Copilot wants to merge 4 commits into
mainfrom
copilot/update-model-mapping-compiler-log

Conversation

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor

Compiled workflows were embedding the full builtin model alias map into awf-config.json, inflating lock output and coupling runtime behavior to heavyweight serialized config. This change stores only workflow/import alias deltas and reconstructs the effective mapping at runtime by merging against the bundled base alias file.

  • Compiler output: serialize delta, not full map

    • Added BuildModelAliasesDelta(...) in pkg/workflow/model_aliases.go.
    • BuildAWFConfigJSON now writes apiProxy.models only when aliases differ from builtins (new keys or overrides).
    • Builtin-only workflows omit apiProxy.models entirely.
  • Runtime reconstruction in setup action

    • Added actions/setup/js/merge_model_aliases.cjs.
    • At runtime, it reads:
      • base aliases: .../actions/model_aliases.json
      • workflow delta: awf-config.json -> apiProxy.models
    • It rewrites awf-config.json with the merged alias map used by AWF.
  • Setup wiring and bundled data

    • Bundled actions/setup/js/model_aliases.json into setup assets.
    • Updated AWF command setup (pkg/workflow/awf_helpers.go) to invoke merge helper before AWF starts.
    • Introduced explicit path constants for config and bundled alias file to keep runtime wiring centralized.
  • Behavioral contract updates

    • Updated Go tests to assert delta-only emission semantics.
    • Added JS tests for merge helper behavior (override, additive alias, no-op when delta absent).
    • Updated wasm golden outputs for the new setup command sequence.
# New runtime step inserted before AWF invocation
node "${RUNNER_TEMP}/gh-aw/actions/merge_model_aliases.cjs" \
  "${RUNNER_TEMP}/gh-aw/awf-config.json" \
  "${RUNNER_TEMP}/gh-aw/actions/model_aliases.json"

Copilot AI changed the title Store model alias mapping as runtime delta and merge at setup time Emit model-alias deltas in AWF config and merge builtins at runtime May 21, 2026
Copilot AI requested a review from pelikhan May 21, 2026 22:15
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot do not add a step, merge on demand from the env var

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

@copilot do not add a step, merge on demand from the env var

Updated in 1d3cce7: removed the merge_model_aliases.cjs runtime invocation (no extra step), removed the helper assets/tests, and kept delta-only apiProxy.models emission so alias merging happens via AWF env-var handling at runtime.

@pelikhan pelikhan closed this May 21, 2026
@github-actions github-actions Bot deleted the copilot/update-model-mapping-compiler-log branch June 3, 2026 14:32
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.

2 participants