Repository navigation
Model routing: an omitted allowed-models means any model when merging imports - #68883
Conversation
…imports Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
allowed-models means any model when merging imports
There was a problem hiding this comment.
🟢 Approval recommended
The localized fix has focused regression coverage, and the remaining documentation clarification is nonblocking.
1 open finding
What changed in this PR
Fixes gh-aw’s routing import merge so an omitted allowed-models list remains unrestricted instead of inheriting another workflow’s shortlist.
Changes:
- Preserve unrestricted routing while retaining explicit-list unions.
- Add regression cases for omissions, inheritance, and import order.
- Update routing documentation and add a patch changeset.
| File | Description |
|---|---|
pkg/workflow/model_routing_subagents_test.go |
Tests merged lists and emitted routing candidates. |
pkg/workflow/compiler_orchestrator_engine.go |
Preserves omitted lists during routing merges. |
pkg/parser/schemas/main_workflow_schema.json |
Documents routing merge semantics. |
docs/src/content/docs/reference/model-routing.md |
Updates shared-routing guidance. |
docs/src/content/docs/reference/frontmatter-full.md |
Refreshes generated field descriptions. |
.changeset/model-routing-omitted-allowed-models-import-merge.md |
Records the patch release fix. |
🧠 Review effort: Max
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
✂️ Ponytail Reviewer has started processing this pull request |
|
🔬 Test Quality Sentinel is analyzing test quality on this pull request... |
|
🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request... |
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 6474740
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Pushed 4a294ab with the wording clarification and regenerated schema docs. |
|
🎉 This pull request is included in a new release. Release: |
- Document the new multi-repository checkout allowlist (`multi`, `allowed-repos`, `allow-private-repos`, `max-repos`) added in #68593/#68816, extracted into a dedicated syntax-checkout.md to keep syntax-agentic.md under its line budget and add it to the syntax.md index. - Fix engine.model-routing docs: allowed-models is optional (not required), and document the omitted-value and import-merge semantics from #68495/#68883. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…current schema (#68999) * Sync checkout and model-routing instruction docs with current schema - Document the new multi-repository checkout allowlist (`multi`, `allowed-repos`, `allow-private-repos`, `max-repos`) added in #68593/#68816, extracted into a dedicated syntax-checkout.md to keep syntax-agentic.md under its line budget and add it to the syntax.md index. - Fix engine.model-routing docs: allowed-models is optional (not required), and document the omitted-value and import-merge semantics from #68495/#68883. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Refresh dispatcher instruction file index Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Sync dispatcher instruction file list Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

When imported workflows also set routing for the same engine, the compiler combines their
allowed-modelslists. An omitted list means "no shortlist" (any model allowed bymodels.allowed/models.blocked), but the merge treated it as empty. So one workflow's list silently narrowed another's "any model". For example, a main workflow withoutallowed-modelsthat importsallowed-models: [claude-sonnet-5]was compiled tocandidateModels: ["github-copilot/claude-sonnet-5"].Changes
Merge rule (
mergeImportedModelRoutingConfigsinpkg/workflow/compiler_orchestrator_engine.go): when an import's routing settings are merged into existing ones and either side'sAllowedModelsis nil, the result is nil. It stays nil for later imports. When every side has a list, the deduplicated union is unchanged. Two things are untouched:goalandmodestill win.Tests (
TestImportedWorkflowModelRoutingOmittedAllowedModelsMeansAnyModel): a table-driven test, run throughParseWorkflowFileandBuildAWFConfigJSON. For each case it checksAllowedModelsand whetherapiProxy.routing.candidateModelsis present.allowed-models[claude-sonnet-5][gpt-6-sol][claude-sonnet-5][claude-sonnet-5], then omitted[claude-sonnet-5][claude-sonnet-5][gpt-6-sol][claude-sonnet-5, gpt-6-sol][gpt-6-sol, claude-sonnet-5]The test workflows don't pin
sandbox.agent.version. With a pinned version, compiling routing that has no list fails with "missing model-routing candidates".Docs:
model-routing.md, "Shared routing settings": the old "chooses from only the imported entries" sentence is replaced with the new rule.main_workflow_schema.json: one sentence added to theallowed-modelsdescription;frontmatter-full.mdis regenerated.Out of scope
These are tracked separately:
goal/modeare dropped without a warning when they differ from the main workflow's.engine: copilotcan't import routing settings.