github / github/copilot-cli

Custom agent frontmatter: accept array for `model:` field

Ouverte
#3,070 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
area:agents area:configuration area:models
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

### Feature request

Allow custom agent markdown frontmatter to accept an **array** of strings for the `model:` field, in addition to a single string.

### Motivation

VS Code chat modes already support `model:` as a list — it's used to present a model picker for the chat mode. This means the same agent definition file can't currently be shared cleanly between VS Code and Copilot CLI: the CLI rejects the file with:

`custom agent markdown frontmatter is malformed: model: Expected string, received array`

This forces plugin authors to either:

- Maintain two copies of every agent file (one for VS Code, one for CLI), or
- Pick one tool and accept that the agent won't load in the other.

### Proposed behavior

When `model:` is an array, the CLI uses the **first** entry as the default model for that agent (and ideally treats the rest as acceptable alternates the user can switch to with `/model` while invoking the agent). When `model:` is a string, behavior is unchanged.

### Alternatives considered

- Authors flatten `model:` to a single string — works in both, but loses the picker UX in VS Code.
- A local post-install patch script — fragile, breaks after every `plugin update`.

Accepting an array in the CLI parser is the only change that lets the same plugin work unmodified in both surfaces.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par localiser l’analyseur de frontmatter Markdown de custom-agent et la validation de son champ model. Vérifiez que le comportement des chaînes reste inchangé, que les tableaux utilisent la première entrée comme valeur par défaut et que les valeurs malformées échouent toujours ; ajoutez ou mettez à jour les tests de l’analyseur s’ils existent.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
markdown, shell
Domaine
cli, tooling
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
68/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.