Skip to content

assign-to-agent model parameter fails — missing coding_agent_model_selection GraphQL feature flag #16627

@ppusateri

Description

@ppusateri

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_selectionmodel 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_selectionmodel 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

Related

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions