Skip to content

Fix assign-to-agent model parameter — add coding_agent_model_selection feature flag#16630

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-agent-model-parameter
Feb 18, 2026
Merged

Fix assign-to-agent model parameter — add coding_agent_model_selection feature flag#16630
pelikhan merged 2 commits intomainfrom
copilot/fix-agent-model-parameter

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

The model parameter in assign-to-agent fails at runtime because the GraphQL API requires the coding_agent_model_selection feature flag to expose the model field on AgentAssignmentInput. Without this flag, the field is hidden and requests fail.

Changes

assign_agent_helpers.cjs

  • Conditionally include coding_agent_model_selection in GraphQL-Features header when model parameter is provided
  • Header with model: "issues_copilot_assignment_api_support,coding_agent_model_selection"
  • Header without model: "issues_copilot_assignment_api_support" (unchanged)

assign_agent_helpers.test.cjs

  • Verify header includes coding_agent_model_selection when model is provided
  • Verify header excludes it when model is not provided

Verification

The GraphQL API behavior with/without the flag:

// With coding_agent_model_selection — model field visible
// GraphQL-Features: issues_copilot_assignment_api_support,coding_agent_model_selection
{
  "inputFields": [
    { "name": "targetRepositoryId" },
    { "name": "baseRef" },
    { "name": "customInstructions" },
    { "name": "customAgent" },
    { "name": "model" }  // ✓ visible
  ]
}

// Without coding_agent_model_selection — model field hidden
// GraphQL-Features: issues_copilot_assignment_api_support
{
  "inputFields": [
    { "name": "targetRepositoryId" },
    { "name": "baseRef" },
    { "name": "customInstructions" },
    { "name": "customAgent" }
    // model field missing
  ]
}

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:

  • https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>assign-to-agent model parameter fails — missing coding_agent_model_selection GraphQL feature flag</issue_title>
<issue_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_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

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

… provided

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review February 18, 2026 19:46
Copilot AI review requested due to automatic review settings February 18, 2026 19:46
Copilot AI changed the title [WIP] Fix model parameter failure in assign-to-agent Fix assign-to-agent model parameter — add coding_agent_model_selection feature flag Feb 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a runtime failure in the assign-to-agent feature where the model parameter fails because the GraphQL API requires the coding_agent_model_selection feature flag to expose the model field on AgentAssignmentInput.

Changes:

  • Updated the GraphQL-Features header to conditionally include coding_agent_model_selection when the model parameter is provided
  • Added tests to verify the header is correctly set in both scenarios (with and without model)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
actions/setup/js/assign_agent_helpers.cjs Modified GraphQL request to conditionally include coding_agent_model_selection feature flag when model parameter is provided
actions/setup/js/assign_agent_helpers.test.cjs Added test assertions to verify the GraphQL-Features header is correctly set based on whether model is provided

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan pelikhan merged commit 71419f7 into main Feb 18, 2026
161 of 162 checks passed
@pelikhan pelikhan deleted the copilot/fix-agent-model-parameter branch February 18, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants