-
Notifications
You must be signed in to change notification settings - Fork 251
Closed
Labels
Description
Problem
PR #16386 (fixing #16294) added model, custom-agent, and custom-instructions parameters to assign-to-agent. However, the model parameter fails at runtime because the GraphQL API requires the coding_agent_model_selection feature flag in the GraphQL-Features header to expose the model field on AgentAssignmentInput.
gh-aw currently sends:
GraphQL-Features: issues_copilot_assignment_api_support
It needs to send:
GraphQL-Features: issues_copilot_assignment_api_support,coding_agent_model_selection
Proof
With coding_agent_model_selection — model field is visible:
// gh api graphql -f query='{ __type(name: "AgentAssignmentInput") { inputFields { name } } }' \
// -H 'GraphQL-Features: issues_copilot_assignment_api_support,coding_agent_model_selection'
{
"inputFields": [
{ "name": "targetRepositoryId" },
{ "name": "baseRef" },
{ "name": "customInstructions" },
{ "name": "customAgent" },
{ "name": "model" }
]
}Without coding_agent_model_selection — model field is hidden:
// gh api graphql -f query='{ __type(name: "AgentAssignmentInput") { inputFields { name } } }' \
// -H 'GraphQL-Features: issues_copilot_assignment_api_support'
{
"inputFields": [
{ "name": "targetRepositoryId" },
{ "name": "baseRef" },
{ "name": "customInstructions" },
{ "name": "customAgent" }
]
}Fix
Add coding_agent_model_selection to the GraphQL-Features header in assign_agent_helpers.cjs (or wherever the GraphQL request headers are constructed) when the model parameter is provided — or unconditionally, since the flag is harmless when model is not used.
Notes
customInstructionsandcustomAgentdo not require the extra flag — they work with justissues_copilot_assignment_api_support- Only
modelis gated behindcoding_agent_model_selection - The Scout report on Feature request: Add
modelparameter toassign-to-agentsafe output #16294 mentioned this header requirement but it wasn't incorporated into the PR implementation
Related
- Feature request: Add
modelparameter toassign-to-agentsafe output #16294 — Original feature request (closed by PR Add model, custom_agent, and custom_instructions parameters to assign-to-agent (frontmatter configuration) #16386) - PR Add model, custom_agent, and custom_instructions parameters to assign-to-agent (frontmatter configuration) #16386 — Implementation missing the header
Reactions are currently unavailable