github / github/copilot-cli

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

Aperta
#3,070 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
area:agents area:configuration area:models
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando il parser del frontmatter Markdown di custom-agent e la validazione del suo campo model. Verifica che il comportamento delle stringhe rimanga invariato, che gli array usino il primo elemento come valore predefinito e che i valori malformati continuino a non superare la validazione; aggiungi o aggiorna i test del parser, se presenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
markdown, shell
Ambito
cli, tooling
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.