Repository navigation
Fix model routing to read the agent-job task prompt - #66290
Merged
Merged
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix routing-conversation step in model-routing
Fix model routing to read the agent-job task prompt
Oct 6, 2026
lpcox
marked this pull request as ready for review
October 6, 2026 22:16
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
ARC/DinD routing reads runner-temp prompts before they are staged, so clean-runner workflows still fail before agent startup.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Updates Copilot model routing to use the agent job’s task-only prompt, addressing #66221.
Changes:
- Adds shared task-prompt paths and topology-based selection.
- Falls back to the full prompt when task text is missing or blank.
- Adds compiled-path and generated-step regression tests.
| File | Description |
|---|---|
pkg/workflow/model_routing.go |
Selects routing prompt paths and adds fallback handling. |
pkg/workflow/model_routing_test.go |
Tests topology paths, fallback behavior, and conversation output. |
pkg/constants/constants.go |
Adds shared user.txt path constants. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+288
to
+289
| promptFilePath = constants.AwPromptsUserFileExpr | ||
| fallbackFilePath = constants.AwPromptsFileExpr |
Collaborator
|
@copilot address review feedback |
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Contributor
Author
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.

Routed Copilot workflows fail before agent startup because the routing step reads an activation-only prompt path. Routing also consumes the full prompt rather than the workflow’s task text.
user.txtunder/tmp/gh-aw/aw-promptson hosted runners and the runner-temp equivalent on ARC/DinD, using shared path constants.prompt.txtfrom the same directory whenuser.txtis missing or blank. Preserve the existing empty-prompt error and single-user-message conversation format.