github / github/copilot-cli

Calling custom agent via prompt ignores configured model in agent.md

Abierto
#2,950 1 comentario 3 reacciones 0 asignados Ver en GitHub
area:agents area:models
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

### 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`.

Image



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.

Image

### 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.