Conversation
…-to-agent - Add DefaultModel, DefaultCustomAgent, DefaultCustomInstructions to AssignToAgentConfig - Update compiler to pass new config values as environment variables - Update JSON schema to include new parameters in assign_to_agent tool - Update JavaScript implementation to read defaults and pass to GraphQL mutation - Build agentAssignment object dynamically with only provided fields - Update staged mode preview to show new parameters Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Update main_workflow_schema.json to add new properties to assign-to-agent config - Fix TypeScript error in assign_agent_helpers.cjs by using spread operator - Add test workflow demonstrating model parameter usage - Verify compiled workflow includes GH_AW_AGENT_DEFAULT_MODEL env var Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ions parameters - Update safe-outputs.md with detailed model selection documentation - Add examples for using model parameter in assign_to_agent calls - Update frontmatter-full.md with all new configuration options - Document available AI models (auto, claude-sonnet-4.5, claude-opus-4.5, claude-opus-4.6, gpt-5.1-codex-max, gpt-5.2-codex) - Explain custom-agent and custom-instructions parameters Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot recompile, fix https://github.com/github/gh-aw/actions/runs/22107500010/job/63894314583?pr=16386, do a code review |
There was a problem hiding this comment.
Pull request overview
This PR adds support for specifying AI model selection and custom agent configuration when using the assign-to-agent safe output to programmatically assign the GitHub Copilot coding agent to issues or pull requests. Previously, all assignments defaulted to "Auto" model selection (Claude Sonnet 4.5) with no ability to customize the agent's behavior.
Changes:
- Added
model,custom-agent, andcustom-instructionsparameters toassign-to-agentconfiguration and runtime API - Extended schema validation and documentation to support the new parameters
- Implemented dynamic GraphQL mutation construction to include agent-specific parameters only when provided
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/assign_to_agent.go |
Added DefaultModel, DefaultCustomAgent, and DefaultCustomInstructions fields to AssignToAgentConfig struct |
pkg/workflow/compiler_safe_outputs_specialized.go |
Added environment variable generation for new default values (GH_AW_AGENT_DEFAULT_MODEL, etc.) |
pkg/parser/schemas/main_workflow_schema.json |
Extended frontmatter schema with model, custom-agent, and custom-instructions properties |
pkg/workflow/js/safe_outputs_tools.json |
Updated MCP tool schema to define new parameters with model examples and descriptions |
actions/setup/js/assign_to_agent.cjs |
Added runtime logic to read default values from environment and pass per-item overrides to GraphQL mutation |
actions/setup/js/assign_agent_helpers.cjs |
Implemented dynamic GraphQL mutation construction with conditional agentAssignment object |
docs/src/content/docs/reference/safe-outputs.md |
Documented model selection options and custom agent configuration with usage examples |
docs/src/content/docs/reference/frontmatter-full.md |
Added comprehensive documentation for new configuration fields in frontmatter reference |
pkg/cli/workflows/test-assign-to-agent-with-model.md |
Created test workflow demonstrating model parameter usage with both default and per-item overrides |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Update .github/agents/agentic-workflows.agent.md to use blob/main instead of blob/v0.45.4-19-gd2bbd6247 - Recompile all workflows after merge from main - Fixes validate-yaml CI check failure Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed CI failure and recompiled workflows in commit d8cd8c8. The issue was versioned URLs in 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
Per feedback, model, custom_agent, and custom_instructions are only configurable via frontmatter defaults, not as per-item parameters in assign_to_agent tool calls. Changes: - Remove model, custom_agent, custom_instructions from safe_outputs_tools.json schema - Update assign_to_agent.cjs to only use defaults (no per-item overrides) - Update staged preview to show frontmatter defaults - Update documentation to clarify workflow-level configuration only - Update test workflow to remove per-item override examples Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
…s parameters Added test cases for assignAgentToIssue to verify: - GraphQL mutation includes model when provided - GraphQL mutation includes customAgent when provided - GraphQL mutation includes customInstructions when provided - Multiple agentAssignment parameters work together - agentAssignment omitted when no parameters provided - Only provided fields are included in variables object All 32 tests pass successfully. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot the model, customAgent and customInstructions are only configurable from the frontmatter, not through input values to the tool. |
This was already implemented in commit 02469af. The current implementation:
The parameters are only configurable via frontmatter configuration as requested. |
|
Hey @pelikhan perfect timing on releasing this feature! I was able to assign to custom cloud coding in another run, but when I specify a model in the I get a GraphQL error: |
This PR adds support for specifying AI model selection, custom agent IDs, and custom instructions when using the
assign-to-agentsafe output to programmatically assign the GitHub Copilot coding agent to issues or pull requests. Previously, all assignments defaulted to "Auto" model selection (Claude Sonnet 4.5) with no ability to customize the agent's behavior.Changes
Configuration Layer
DefaultModel,DefaultCustomAgent,DefaultCustomInstructionsfields toAssignToAgentConfig(Go)model,custom-agent,custom-instructionsin workflow YAMLGH_AW_AGENT_DEFAULT_MODEL, etc.)Runtime Layer
agentAssignmentobject with only provided fieldsTesting
assign_agent_helpers.test.cjsDocumentation
auto,claude-sonnet-4.5,claude-opus-4.5,claude-opus-4.6,gpt-5.1-codex-max,gpt-5.2-codexDesign Decision
model,custom-agent, andcustom-instructionsare only configurable via frontmatter (workflow-level configuration)assign_to_agenttool callsUsage
Frontmatter configuration (applies to all assignments in workflow):
Tool usage (no per-item model override):
The implementation is backward compatible—existing workflows continue with auto model selection.
Original prompt
modelparameter toassign-to-agentsafe output #16294💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.