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

Offen
#5,585 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
67/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
ai, cli

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Python
Sterne
11.5k
Forks
2k
Ø Merge
6 Std. 34 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/copilot-cli

Alle Issues in github/copilot-cli

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

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