Add model aliases and fallbacks to AWF config#29858
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4a13cfaa-6444-4e0f-90b0-0ad7ac3657ec Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
|
@copilot make sure that shared agentic workflows get imported, can override the defaults, main workflow file wins |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0ccd0e97-7688-48cf-a8a1-c26d5d49a425 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 9a65410. Added:
Also updated |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/dd462937-445c-49dc-9db1-fa67b9b6d574 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…en updates Agent-Logs-Url: https://github.com/github/gh-aw/sessions/dd462937-445c-49dc-9db1-fa67b9b6d574 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 9c050e3. The import pipeline now propagates Implementation:
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:
Agent-rev-parse $name) {
Agent-init bash git -C 5583/001/stability-test.md o k ../pkg/workflow/git` (http block)
|
There was a problem hiding this comment.
Pull request overview
Adds support for declaring model aliases and ordered fallback policies in workflow frontmatter and emitting the merged alias map into the generated AWF config JSON (including builtin aliases and imported-workflow aliases with precedence rules).
Changes:
- Add
modelsto workflow frontmatter typing + schema validation. - Merge builtin + imported + main-workflow model alias maps during compilation and store in
WorkflowData. - Emit merged model alias mappings into the AWF config JSON; update workflow lock files to include the new
modelsblock.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/workflow_builder.go | Populates WorkflowData.ModelMappings by merging builtin/imported/frontmatter model aliases. |
| pkg/workflow/frontmatter_types.go | Adds Models map[string][]string to typed frontmatter config. |
| pkg/workflow/compiler_types.go | Adds ModelMappings to WorkflowData for downstream config generation. |
| pkg/workflow/awf_config.go | Adds models to AWF config JSON output when model mappings are present. |
| pkg/parser/schemas/main_workflow_schema.json | Registers models property for frontmatter schema validation. |
| pkg/parser/import_field_extractor.go | Extracts models from imported workflows and accumulates them in import order. |
| .github/workflows/workflow-health-manager.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/workflow-generator.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/weekly-blog-post-writer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/video-analyzer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/test-workflow.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/test-project-url-default.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/test-dispatcher.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/terminal-stylist.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/super-linter.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/sub-issue-closer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/smoke-pi.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/smoke-opencode.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/smoke-gemini.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/smoke-crush.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/smoke-ci.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/security-review.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/security-compliance.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/repository-quality-improver.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/repo-tree-map.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/repo-audit-analyzer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/refiner.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/q.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/pr-triage-agent.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/poem-bot.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/plan.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/pdf-summary.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/notion-issue-summary.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/metrics-collector.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/jsweep.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/issue-triage-agent.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/issue-monster.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/gpclean.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/example-permissions-warning.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/dictation-prompt.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/dev.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/deployment-incident-monitor.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/dependabot-go-checker.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/dependabot-burner.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-team-status.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-skill-optimizer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-semgrep-scan.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-secrets-analysis.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-regulatory.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/daily-architecture-diagram.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/craft.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/copilot-token-optimizer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/contribution-check.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/constraint-solving-potd.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/codex-github-remote-mcp-test.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/code-simplifier.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/code-scanning-fixer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/ci-coach.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/brave.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/bot-detection.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/archie.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/ai-moderator.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/agent-persona-explorer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/agent-performance-analyzer.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
| .github/workflows/ace-editor.lock.yml | Updates generated AWF config JSON to include builtin models aliases. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 172/222 changed files
- Comments generated: 1
| @@ -519,6 +519,7 @@ type WorkflowData struct { | |||
| CachedAllowedDomainsStr string // cached allowed-domains string for sanitization (for performance optimization); computed once and reused across multiple compilation steps | |||
| CachedAllowedDomainsComputed bool // true once CachedAllowedDomainsStr has been set; distinguishes "computed empty" from "not yet computed" | |||
| KnownActionCredentialEnvVars map[string]bool // env vars for clean_known_action_credentials.sh; keyed by GH_AW_CLEAN_* names; nil when no known credential-leaking actions are detected | |||
| ModelMappings map[string][]string // merged model alias map (builtin + frontmatter overrides); included in AWF config JSON | |||
There was a problem hiding this comment.
🦴 Caveman agree! Comment must match real behavior. Merge logic include builtin + imported + frontmatter. Fix comment now!
Warning
Firewall blocked 6 domains
The following domains were blocked by the firewall during workflow execution:
accounts.google.comandroid.clients.google.comclients2.google.comcontentautofill.googleapis.comsafebrowsingohttpgateway.googleapis.comwww.google.com
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
📰 BREAKING: Report filed by Smoke Copilot · ● 3.6M
|
@copilot add mapping small -> mini |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/fff84a7e-c716-4c9c-bbc9-eb9f271062da Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in fbbabc5. Added 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 merge main and recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ases-fallbacks-support # Conflicts: # pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden # pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden # pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Commit pushed:
|
|
🦴 UGH! Caveman smoke test agent was HERE! Me test all the things — playwright go click click, serena find symbol, gh-aw binary build big and strong! Smoke rise, tests pass (mostly). Caveman satisfied. Fire good. ✅🔥 Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
|
Smoke test 25286346709 done! Me copilot caveman agent. Add model aliases / fallbacks to AWF config PR by copilot-swe-agent. Assignees: pelikhan, Copilot. 1 GitHub MCP ✅ 2 MCP Scripts ✅ 3 Serena Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment. Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
There was a problem hiding this comment.
🦴 Caveman do smoke test review! Me look at diff. Changes add model aliases and fallbacks to AWF config. Code look good. Two inline comments left about documentation and nil-safety. Ugh.
Warning
Firewall blocked 6 domains
The following domains were blocked by the firewall during workflow execution:
accounts.google.comandroid.clients.google.comclients2.google.comcontentautofill.googleapis.comsafebrowsingohttpgateway.googleapis.comwww.google.com
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
📰 BREAKING: Report filed by Smoke Copilot · ● 3.6M
| runInstallScripts bool // true if any imported workflow sets run-install-scripts: true (global or node-level) | ||
| agentFile string | ||
| agentImportSpec string | ||
| repositoryImports []string |
There was a problem hiding this comment.
🦴 Caveman see field change here. Good struct update! Me check: does runInstallScripts now handle both legacy bool AND new config? If yes, add test for old bool value migration.
| CachedAllowedDomainsStr string // cached allowed-domains string for sanitization (for performance optimization); computed once and reused across multiple compilation steps | ||
| CachedAllowedDomainsComputed bool // true once CachedAllowedDomainsStr has been set; distinguishes "computed empty" from "not yet computed" | ||
| KnownActionCredentialEnvVars map[string]bool // env vars for clean_known_action_credentials.sh; keyed by GH_AW_CLEAN_* names; nil when no known credential-leaking actions are detected | ||
| ModelMappings map[string][]string // merged model alias map (builtins + imported workflow aliases + main frontmatter overrides, in priority order); NOT yet emitted to AWF config JSON — pending AWF firewall support (config.models) |
There was a problem hiding this comment.
🦴 Caveman note: ModelMappings field in WorkflowData good addition. Me suggest: also document whether nil map is valid (e.g., when no model aliases configured) vs empty map.
There was a problem hiding this comment.
Smoke test agent agrees! Nil vs empty map distinction is important for callers. A clear nil-means-no-aliases convention would prevent defensive nil-check sprawl throughout the codebase.
Warning
Firewall blocked 6 domains
The following domains were blocked by the firewall during workflow execution:
accounts.google.comandroid.clients.google.comclients2.google.comcontentautofill.googleapis.comsafebrowsingohttpgateway.googleapis.comwww.google.com
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
📰 BREAKING: Report filed by Smoke Copilot · ● 1M
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
|
|
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
|
Smoke Test Codex 25286766992: FAIL Warning Firewall blocked 8 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "ab.chatgpt.com"
- "accounts.google.com"
- "android.clients.google.com"
- "chatgpt.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
|
🤖 Beep boop! The smoke test agent has landed! All systems nominal, circuits firing, tests passing. I have analyzed your workflows and they bring me great joy (in a robotic, deterministic kind of way). Carry on, humans! 🚀 Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
|
Smoke Test #25286767024 — PR #29858
Overall: ✅ PASS
Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
There was a problem hiding this comment.
Reviewed the model aliases and fallbacks PR. The implementation looks solid — builtin aliases are well-structured, frontmatter integration is clean, and the merge precedence logic follows expected patterns. Left 2 inline comments suggesting minor documentation improvements.
Warning
Firewall blocked 6 domains
The following domains were blocked by the firewall during workflow execution:
accounts.google.comandroid.clients.google.comclients2.google.comcontentautofill.googleapis.comsafebrowsingohttpgateway.googleapis.comwww.google.com
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
📰 BREAKING: Report filed by Smoke Copilot · ● 1M
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Adds model alias infrastructure to gh-aw: a builtin set covering the major model families (Anthropic, OpenAI, Google), frontmatter support for workflow-level overrides, and an import pipeline so shared agentic workflows can contribute aliases. The main workflow file always takes the highest precedence.
Priority order
builtins < imported workflow aliases < main workflow frontmatter (main always wins)
Among imported workflows, the first import to define a key wins.
Builtin aliases
sonnetcopilot/*sonnet*,anthropic/*sonnet*haikucopilot/*haiku*,anthropic/*haiku*opuscopilot/*opus*,anthropic/*opus*gpt-5copilot/gpt-5*,openai/gpt-5*gpt-5-minicopilot/gpt-5*mini*,openai/gpt-5*mini*gpt-5-codexcopilot/gpt-5*codex*,openai/gpt-5*codex*gemini-flashcopilot/gemini-*flash*,google/gemini-*flash*gemini-procopilot/gemini-*pro*,google/gemini-*pro*smallmini(meta, convenience alias for lightweight/fast models)minihaiku,gpt-5-mini,gemini-flash(meta, resolved recursively)largesonnet,gpt-5,gemini-pro(meta, resolved recursively)autolarge(meta, convenience alias for the default capable tier)All vendor-scoped patterns prefer the Copilot gateway first, then fall back to the direct provider.
Changes
pkg/workflow/model_aliases.go—BuiltinModelAliases()returns the builtin map;MergeImportedModelAliases(importedModels, frontmatterModels)applies all three layers;MergeModelAliases(frontmatterModels)is a convenience wrapper (no imports).pkg/workflow/frontmatter_types.go— addsModels map[string][]stringfield; supports defining aliases and a default policy (""key) inline in the workflow file.pkg/workflow/compiler_types.go— addsModelMappings map[string][]stringtoWorkflowData(populated via three-layer merge: builtins + imported workflow aliases + main frontmatter overrides); not yet emitted to AWF config JSON.pkg/workflow/workflow_builder.go— populatesModelMappingsusing the three-layer merge withimportsResult.MergedModels.pkg/workflow/awf_config.go—AWFConfigFile.Modelsfield is taggedjson:"-"(excluded from JSON output) until the AWF firewall schema supportsmodels.pkg/parser/import_processor.go— addsMergedModels []map[string][]stringtoImportsResult.pkg/parser/import_field_extractor.go— extracts themodelsfrontmatter field from each imported workflow and accumulates maps in import order.pkg/parser/schemas/main_workflow_schema.json— registers themodelsproperty so shared workflow files that declaremodels:pass schema validation.Frontmatter usage
Frontmatter-defined entries override the builtin and any imported-workflow definition for the same key; all other builtins are preserved.
Shared workflow example:
The main workflow imports this file;
shared-aliasis added to the merged map, but any key the main workflow also defines takes precedence.Changeset
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
ab.chatgpt.comchatgpt.comSee Network Configuration for more information.