Org-level custom agents ignore `model`; a model list drops the agent

Aberta
#5,585 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
67/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
python
Domínio
ai, cli

Direção de pesquisa

Start by tracing how the CLI reads custom agent frontmatter from org .github-private/agents/*.md and passes the API response into agent configuration; compare that path with repo .github/agents/. Check how model lists and model-policy are handled locally, including the behavior reported in #2133. Done means org agents use the configured model and policy, and a model list no longer causes the agent to disappear.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

area:agents area:models
Describe the bug

Org-level custom agents (agents/*.md in <org>/.github-private) ignore the model frontmatter field. The same file honours model when placed in .github/agents/ of the repo.

The API returns the model correctly, so it is dropped client-side:

GET https://api.githubcopilot.com/agents/swe/custom-agents/<org>/<repo>?exclude_invalid_config=true&include_sources=org,enterprise
→ { "name": "test-writer", ..., "model": "claude-haiku-5.5" }

Related: a model list (supported locally since v1.0.83, #2133) makes the server exclude the org agent as invalid, so it silently disappears (No such agent).

Reproduce
  1. Add to <org>/.github-private/agents/test-writer.md:
    ---
    name: test-writer
    description: Writes unit tests.
    model: claude-haiku-5.5
    model-policy: required
    ---
    
  2. In a clone of any repo in <org>, without a local copy of the agent:
    copilot -p "Reply: ready" --agent test-writer --output-format json
Agent source model used
.github/agents/ in the repo claude-haiku-5.5 ✅
org .github-private claude-sonnet-5.5 (session default) ❌
org, with model: [claude-haiku-5.5, gpt-6-luna] agent not loaded ❌

model-policy: required makes no difference for org agents.

Expected

Org agents honour model and model-policy like repo-level agents, and accept a model list.

Environment

Copilot CLI 1.0.116, Linux (Docker, node:24-slim), github.com

Linguagem predominante
Python
Estrelas
11.5k
Forks
2k
Merge médio
6h 34min
PRs com merge (30d)
3

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de github/copilot-cli

Todas as issues de github/copilot-cli

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.