Skip to content

Complete infer to disable-model-invocation migration in GitHub org custom agents#3466

Open
Copilot wants to merge 5 commits intomainfrom
copilot/sub-pr-3464
Open

Complete infer to disable-model-invocation migration in GitHub org custom agents#3466
Copilot wants to merge 5 commits intomainfrom
copilot/sub-pr-3464

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

The migration from infer to disable-model-invocation was incomplete—generateAgentMarkdown() still generated the deprecated infer attribute in frontmatter for custom agents fetched from GitHub organizations.

Changes

Mapping logic in githubOrgCustomAgentProvider.ts:

  • Map infer: falsedisable-model-invocation: true
  • Map infer: true|undefined → omit attribute (default behavior)
  • Remove deprecated infer output

Interface documentation in githubService.ts:

  • Mark infer field as @deprecated with mapping semantics
  • Retain field since backend API still sends it

Test coverage:

  • Verify infer: true produces no attribute output
  • Verify infer: false produces disable-model-invocation: true
  • Verify minimal agents omit both old and new attributes

Example

Backend response with infer: false:

const agentDetails: CustomAgentDetails = {
  name: 'reviewer',
  infer: false,  // Backend field
  // ...
}

Generated frontmatter:

---
name: Reviewer
disable-model-invocation: true  # New attribute
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 5, 2026 01:06
Co-authored-by: pwang347 <8560030+pwang347@users.noreply.github.com>
Co-authored-by: pwang347 <8560030+pwang347@users.noreply.github.com>
Co-authored-by: pwang347 <8560030+pwang347@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on agent migration and skills folder implementation Complete infer to disable-model-invocation migration in GitHub org custom agents Feb 5, 2026
Copilot AI requested a review from pwang347 February 5, 2026 01:09
Base automatically changed from digitarald/musical-porpoise to main February 5, 2026 01:28
@pwang347 pwang347 marked this pull request as ready for review February 5, 2026 01:54
Copilot AI review requested due to automatic review settings February 5, 2026 01:54
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 5, 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 completes the migration from the deprecated infer field to disable-model-invocation for GitHub organization custom agents. The backend API still sends the infer field, but the frontend now properly maps it to the new attribute when generating agent markdown files.

Changes:

  • Map backend's infer field to disable-model-invocation attribute in generated frontmatter (infer: falsedisable-model-invocation: true, while infer: true or undefined omits the attribute)
  • Update planAgentProvider.ts to use disableModelInvocation instead of the deprecated infer field
  • Add comprehensive test coverage for both infer: true and infer: false cases
  • Update agent customization documentation to reflect the new attributes (user-invokable and disable-model-invocation)
  • Add support for additional skill directory locations (.agents/skills/ and .claude/skills/)

Reviewed changes

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

Show a summary per file
File Description
src/platform/github/common/githubService.ts Add deprecation documentation for the infer field with mapping semantics
src/extension/agents/vscode-node/githubOrgCustomAgentProvider.ts Implement mapping logic from infer to disable-model-invocation in markdown generation
src/extension/agents/vscode-node/test/githubOrgCustomAgentProvider.spec.ts Add tests for infer: true (omit attribute) and infer: false (output disable-model-invocation: true)
src/extension/agents/vscode-node/planAgentProvider.ts Migrate from infer to disableModelInvocation in plan agent configuration
assets/prompts/skills/agent-customization/primitives/agents.md Update documentation to replace deprecated infer values with user-invokable and disable-model-invocation attributes
assets/prompts/skills/agent-customization/primitives/skills.md Add support for .agents/skills/ and .claude/skills/ directory locations
assets/prompts/skills/agent-customization/SKILL.md Update quick reference table to include new skill locations

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.

3 participants