Skip to content

Model from agent.md isn't recognized #980

Closed

Description

@Arkoprabho

Describe the bug

Consider a sample agent.md file under .github/agents/testing.md with content:

---
name: tester
description: Agent to represent copilot cli bug
model: Claude Haiku 4.5
---

On starting copilot cli and using this agent, the model doesn't change.
The same file on VSCode works as expected

Affected version

0.0.382 Commit: 18bf0ae

Steps to reproduce the behavior

Have an agents.md file

cat <<EOF > .github/agents/tester.md
---
name: tester
description: Agent to represent copilot cli bug
model: Claude Haiku 4.5
---
Other general instructions
EOF  
  • Open copilot.
  • Select this agent using /agent

Expected behavior

On selecting the agent, the model used by the agent should switch as per instructions in the md file

Additional context

No response

Activity

  1. added theissue type on Jan 15, 2026
  2. Arkoprabho commented on Jan 15, 2026

    @Arkoprabho
    Author

    Missed that.
    Though even with the file name corrected it isn't switching models on changing agents

  3. MattVevang commented on Jan 15, 2026

    @MattVevang

    Missed that. Though even with the file name corrected it isn't switching models on changing agents

    +1. I placed the different agent spec files in my user profile folder (C:\Users\alias\.copilot\agents) and while the CLI sees them and takes on the defined persona it fails to use the defined model and I have tried numerous ones and formats for the text.

  4. devdnn commented on Jan 21, 2026

    @devdnn

    Same with me, Model from agents file are only respected in VSCode Copilot Chat.

    Copilot CLI uses what ever model is selected in the cli or the default CLI.

  5. SteveOfficerSeccl commented on Jan 23, 2026

    @SteveOfficerSeccl

    I have also run into this issue.

    Exact same experience, VS Code respects the model choice but the CLI does not.
    I have to explicitly provide the model via the command line args in order for it to be used

    copilot --version
    0.0.393
    Commit: ea52078
    
  6. Ogekuri commented on Feb 1, 2026

    @Ogekuri

    Confirmed on 0.0.400: /.github/agents/req.fix.agent.md: agent uses unsupported fields: model

  7. bagleytravis68 commented on Mar 2, 2026

    @bagleytravis68

    This is kind of a major problem right? I know Copilot CLI is still catching up, but without the ability to switch models an agentic workflow may cost orders of magnitude more than it needs to.

  8. added
    area:models
    on Apr 6, 2026
  9. added
    area:agents
    on Apr 6, 2026
  10. examon commented on Apr 7, 2026

    @examon

    This was taken care of in v0.0.415. Custom agents now support the model field in frontmatter to specify which model to use, and unknown frontmatter fields no longer block agent loading — they now warn instead of error. If you believe this isn’t resolved, please feel free to reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsarea:models

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions