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

Abierto
#5,585 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
67/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
ai, cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
11.5k
Forks
2k
Merge medio
6 h 34 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/copilot-cli

Todos los issues de github/copilot-cli

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.