Calling custom agent via prompt ignores configured model in agent.md
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
### Describe the bug
When defining a custom agent and setting the `model` property in it's `agent.md` file, the agent is called with a completely different model than defined or selected via the `/model` command in the CLI. It looks like the model that is passed down to the agent when called interactively via a instructive prompt is `gpt-4.1` and sometime `gpt-4o-mini`.
If you call the agent directly from the command prompt via the command `copilot --agent=TestAgent --prompt="Hi Agent!"` it works fine and it uses the model that is defined in the markdown file as seen below.
### Affected version
GitHub Copilot CLI 1.0.35.
### Steps to reproduce the behavior
1. Create an custom agent with the `model` property set to a model (e.g. `gpt-5.3-codex`) and instructions to expose it's model that is used.
2. Save the `xxx.agent.md` in your system-wide `.copilot\agents` folder
3. Run `copilot` in the terminal
4. Type `/model` and select a different model than the one defined in the agents markdown
5. Use a prompt to call the which you created in step 1
6. Check it's output in the CLI
### Expected behavior
The agent that is called interactively via a prompt, should use and run with the model defined in the agent markdown.
### Additional context
- OS: Windows 11 Enterprise
- PowerShell 7.6.1
- Visual Studio Code 1.117.0
Hướng dẫn đóng góp
Hướng nghiên cứu
Reproduce the difference between calling a custom agent through an interactive prompt after using `/model` and calling it with `copilot --agent=TestAgent --prompt="Hi Agent!"`. Start by tracing model selection for the prompt and agent invocation paths, using the `model` property in `xxx.agent.md` as the expected source. Done means both paths use the model configured in the agent file.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- powershell, shell
- Lĩnh vực
- cli, tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100