Add reasoning effort support to assign-to-agent - #60346
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Dynamic special-character values can break handler configuration parsing, while explicit empty values bypass the required warning.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds optional model-specific reasoning effort to assign-to-agent, spanning configuration, runtime validation, previews, tests, fixtures, and documentation.
Changes:
- Propagates
reasoning_effortinto compatible assignment requests. - Adds capability-aware validation with warning-based fallback.
- Updates coverage, examples, schema, and release notes.
File summaries
| File | Description |
|---|---|
scratchpad/safe-outputs-specification.md |
Documents payload behavior. |
pkg/workflow/safe_outputs_handler_registry_assignments.go |
Propagates the configuration. |
pkg/workflow/assign_to_agent.go |
Defines the new field. |
pkg/workflow/assign_to_agent_test.go |
Tests parsing and types. |
pkg/parser/schemas/main_workflow_schema.json |
Adds schema support. |
pkg/cli/workflows/test-copilot-assign-to-agent.md |
Adds a supported literal fixture. |
pkg/cli/workflows/test-assign-to-agent-with-model.md |
Adds an unsupported-model fixture. |
pkg/cli/workflows/test-assign-to-agent-with-dynamic-reasoning-effort.md |
Adds an expression fixture. |
docs/src/content/docs/reference/safe-outputs.md |
Documents safe-output usage. |
docs/src/content/docs/reference/frontmatter-full.md |
Updates generated reference content. |
docs/src/content/docs/reference/copilot-cloud-agent.mdx |
Documents Copilot configuration. |
actions/setup/js/assign_to_agent.test.cjs |
Tests previews and issue/PR propagation. |
actions/setup/js/assign_to_agent.cjs |
Passes configuration into assignments. |
actions/setup/js/assign_agent_helpers.test.cjs |
Tests capability validation. |
actions/setup/js/assign_agent_helpers.cjs |
Validates and builds the API payload. |
.changeset/patch-assign-to-agent-reasoning-effort.md |
Records the feature change. |
Review details
- Files reviewed: 16/16 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| AddTemplatableInt("max", c.Max). | ||
| AddIfNotEmpty("name", c.DefaultAgent). | ||
| AddIfNotEmpty("model", c.DefaultModel). | ||
| AddIfNotEmpty("reasoning_effort", c.ReasoningEffort). |
| AddTemplatableInt("max", c.Max). | ||
| AddIfNotEmpty("name", c.DefaultAgent). | ||
| AddIfNotEmpty("model", c.DefaultModel). | ||
| AddIfNotEmpty("reasoning_effort", c.ReasoningEffort). |
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
|
No ADR enforcement needed: PR does not have the 'implementation' label and has <=100 new lines of code in business logic directories.
|
|
🧠 Matt Pocock Skills Reviewer failed during the skills-based review. Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
|
✅ Ponytail Reviewer completed successfully! Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "ab.chatgpt.com"See Network Configuration for more information.
|
|
Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
| */ | ||
| const AGENT_NAME_BY_LOGIN = Object.fromEntries(Object.entries(AGENT_LOGIN_NAMES).flatMap(([agentName, logins]) => logins.map(login => [normalizeLogin(login), agentName]))); | ||
|
|
||
| const REASONING_EFFORT_CAPABILITIES = { |
There was a problem hiding this comment.
@copilot this is a lost cause, there will be more models in the future with different reasoning model. Do not try to enforce besides the enum values.
There was a problem hiding this comment.
Implemented in f8fda4e. reasoning_effort is now validated only against the enum (none, minimal, low, medium, high, xhigh) and forwarded without agent/model capability checks; tests cover an unknown future model.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| name: "copilot" # default agent (default: "copilot") | ||
| model: "claude-sonnet-5" # default AI model (default: "auto") | ||
| model: "o3" # default AI model (default: "auto") | ||
| reasoning_effort: "high" # optional enum value or expression |
There was a problem hiding this comment.
@copilot use - instead of _ like other fields in the safe outputs from matter.
There was a problem hiding this comment.
Implemented in c07e8f4. The safe-output frontmatter and handler configuration now use reasoning-effort consistently; only the required REST API payload remains agent_assignment.reasoning_effort.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
assign-to-agentcan now forward optional, model-specific reasoning effort through the existing agent assignment API. Unsupported agents, models, or values emit a warning and continue without the field.Configuration
reasoning_effortstring support.Runtime
agent_assignment.reasoning_effort.Coverage
Dynamic values are also supported: