github / github/copilot-cli

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

Offen
#3,070 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
area:agents area:configuration area:models
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, den custom-agent-Markdown-Frontmatter-Parser und die Validierung seines model-Felds zu finden. Überprüfe, dass das Verhalten für Strings unverändert bleibt, Arrays den ersten Eintrag als Standardwert verwenden und fehlerhafte Werte weiterhin fehlschlagen; füge Parser-Tests hinzu oder aktualisiere sie, falls vorhanden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
markdown, shell
Bereich
cli, tooling
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.