Skip to content

compiler: add implicit self-alias for provider-scoped model in AWF config - #49523

Closed
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-awf-runtime-rejection
Closed

compiler: add implicit self-alias for provider-scoped model in AWF config#49523
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-awf-runtime-rejection

Conversation

Copilot AI commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The compiler accepts provider-scoped model: values (e.g. copilot/gpt-5.6-sol) and emits a valid lock file, but the AWF api-proxy rejects them at runtime because it validates the requested model against keys of apiProxy.models — and alias keys cannot contain / (V-MAF-005), so a provider-scoped name can never appear as a key via normal frontmatter models: declarations.

Changes

  • pkg/workflow/awf_config.go — In BuildAWFConfigJSON, when WorkflowData.Model is provider-scoped (contains /) and is not a runtime expression, add an implicit self-alias entry to apiProxy.models before writing the section:

    "copilot/gpt-5.6-sol": ["copilot/gpt-5.6-sol"]

    The original ModelMappings map is never mutated (a clone is created). Existing explicit mappings are not overwritten.

  • pkg/workflow/awf_config_test.go — Five new subtests under TestBuildAWFConfigJSON_ProviderScopedModelImplicitSelfAlias covering: self-alias is injected for provider-scoped models; works when ModelMappings is nil; bare aliases are unaffected; runtime expressions are skipped; existing explicit mappings are preserved.

  • Lock file recompile — All 266 workflows recompiled. Workflows already using provider-scoped models (e.g. ab-testing-advisor.md with model: copilot/gpt-5.4) now have the implicit self-alias in their generated AWF config.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: bug | Risk: low | Priority: low
  • Score: 17/100 (impact 10 + urgency 5 + quality 2)
  • Recommended action: defer
  • Batch: wip-drafts

Note: Draft, no diff yet (still generating)

Generated by 🔧 PR Triage Agent · auto · 48.9 AIC · ⌖ 6.24 AIC · ⊞ 7.9K ·

Copilot AI and others added 2 commits August 1, 2026 07:14
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…plicit self-alias

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix runtime rejection by bundled AWF for provider-scoped model compiler: add implicit self-alias for provider-scoped model in AWF config Aug 1, 2026
Copilot AI requested a review from pelikhan August 1, 2026 07:27
@pelikhan pelikhan closed this Aug 1, 2026
@github-actions
github-actions Bot deleted the copilot/fix-awf-runtime-rejection branch August 9, 2026 02:40
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.

Provider-scoped engine.model compiles cleanly but is rejected by the bundled AWF at runtime

2 participants