Org-level custom agents ignore `model`; a model list drops the agent
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- Add to
<org>/.github-private/agents/test-writer.md:--- name: test-writer description: Writes unit tests. model: claude-haiku-5.5 model-policy: required --- - 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
- 主要语言
- Python
- 星标
- 11.5k
- 派生
- 2k
- 平均合并
- 6 小时 34 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-cli 的其他 Issue
-
area:plugins
难度 2/5 1-3 小时 新手友好度 75/100
github/copilot-cli#5567 ·
-
难度 1/5 1-3 小时 新手友好度 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncation未关闭area:tools
难度 2/5 1-3 小时 新手友好度 72/100
github/copilot-cli#5476 ·
-
triage
难度 1/5 1 小时以内 新手友好度 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
难度 1/5 1 小时以内 新手友好度 74/100
github/copilot-cli#5340 ·
查看 github/copilot-cli 的全部 Issue
相似的 Issue
-
marketing
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
Status: Triage Suggestion
难度 2/5 1-3 小时 新手友好度 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
collabnix/awesome-mcp-lists#515 ·
维护者通常 1 天内回复
-
Look-ahead bias via resample('1min').interpolate(method='time') in CCIStrategy and ReinforcedQuickie未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation good first issue
难度 1/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复