-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Plugin agents ignore model: frontmatter #2492
Description
Describe the bug
Agents loaded via copilot plugin install ignore the model: field in YAML frontmatter. The CLI logs definitionModel="(none)" and falls back to the session's default model.
Repo-level agents (.github/agents/) read the same field correctly.
Affected version
GitHub Copilot CLI 1.0.14 (and GitHub Copilot CLI 1.0.11)
Steps to reproduce the behavior
1. Create a minimal plugin
my-plugin/
├── plugin.json
└── agents/
├── orchestrator.agent.md
└── fast-helper.agent.md
plugin.json
{
"name": "my-plugin",
"version": "1.0.0",
"agents": "agents/"
}agents/orchestrator.agent.md
---
name: orchestrator
description: Delegates to sub-agents.
model: claude-sonnet-4.5
tools: ["agent"]
agents: ["fast-helper"]
---
Delegate all tasks to `fast-helper` via the task tool. Report back what it said.agents/fast-helper.agent.md
---
name: fast-helper
description: Fast helper on Haiku.
model: claude-haiku-4.5
tools: []
user-invocable: false
---
State which model you are running on, then answer the question.2. Install and run
copilot plugin install /path/to/my-plugin
copilot --log-level=all --model gpt-5.4 \
--agent my-plugin/orchestrator \
-p "Delegate to fast-helper: what is 2+2?"3. Check the log
In ~/.copilot/logs/process-*.log:
Using model: gpt-5.4 # parent: ignores model: claude-sonnet-4.5
Agent "my-plugin:fast-helper":
definitionModel="(none)" # bug: model: claude-haiku-4.5 not read
sessionModel="gpt-5.4"
Using model: gpt-5.4 # sub-agent: falls back to session default
The usage summary confirms only one model ran:
Breakdown by AI model:
gpt-5.4 21.9k in, 338 out
Expected behavior
The plugin agent's model: claude-haiku-4.5 should appear as definitionModel="claude-haiku-4.5" and the CLI should use that model, the same way repo-level agents work.
Control: repo-level agents work
Place identical agent files in .github/agents/ instead of the plugin. Same command, same CLI version. The log now reads:
Using model "claude-sonnet-4.5" from custom agent "orchestrator"
Agent "fast-helper":
definitionModel="claude-haiku-4.5"
sessionModel="claude-sonnet-4.5"
Using model: claude-haiku-4.5
Breakdown by AI model:
claude-sonnet-4.5 23.1k in, 402 out
claude-haiku-4.5 3.7k in, 154 out
Both agents use their declared models.
Additional context
| Field | Value |
|---|---|
| Logs (redacted) | process-redacted.log |
| OS | SUSE Linux Enterprise Server 15 SP4 |
| CPU | x86_64 |
| Shell | bash 4.4.23 |
| Terminal | bash & tmux (TERM=xterm-color) |