github / github/copilot-cli

Support temperature/sampling parameters in plugin SKILL.md metadata

未關閉
#3,056 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
area:configuration area:models area:plugins
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the feature or problem you'd like to solve

Entire teams writing official tech docs but can't change the temperature or top-p

### Proposed solution

Plugin authors building documentation-authoring skills need low-temperature inference to minimize fabrication and hallucination. Currently, there is **no way** for a plugin or skill to specify `temperature`, `top_p`, or other sampling parameters -- not in `plugin.json`, `agency.json`, or SKILL.md frontmatter metadata.

The only workaround is embedding prompt-level instructions like "behave as if temperature is 0.0-0.2," which is unreliable because the model may not honor behavioral temperature constraints the same way it honors API-level parameters.

Allow SKILL.md frontmatter `metadata` to include sampling parameters that Copilot CLI passes through to the inference API:

```yaml
---
name: write-concept
description: Author a concept article with verification
metadata:
temperature: 0.1
top_p: 0.9
max_tokens: 8192
---
```

Or alternatively, support this at the plugin level in `plugin.json`:

```json
{
"name": "author-pro",
"modelParameters": {
"temperature": 0.1,
"top_p": 0.9
}
}
```

Either approach would let plugin authors tune inference behavior for their use case -- low temperature for factual documentation, higher temperature for creative brainstorming, etc.

1. **Prompt-level behavioral constraints** -- "Respond as if temperature is set to 0.1." Works partially but is not equivalent to API-level control. Models still exhibit higher variance than a true low-temperature API call.

2. **MCP server with sampling** -- Build an MCP server that uses the `sampling/createMessage` protocol method with temperature parameters. This is architecturally heavier and adds latency, but could work if sampling parameters are passed through to the inference backend.

3. **Direct API calls via MCP** -- Build an MCP server that calls Azure OpenAI directly with explicit temperature. This works but requires separate API credentials, deployment management, and cost -- defeating the purpose of an integrated plugin system.

### Example prompts or workflows

- This affects any plugin where output accuracy matters more than creativity (documentation, compliance, security review, technical writing).
- The `task` tool already supports a `model` parameter for sub-agents. Extending this pattern to include `temperature` would be consistent.
- MCP sampling events (`sampling.requested` / `sampling.completed`) already exist in the session events schema, suggesting the infrastructure may partially exist.

### Additional context

貢獻指南

開啟貢獻指南

研究方向

首先追蹤 SKILL.md 的 frontmatter metadata、plugin.json 和 agency.json 如何被解析,接著將該路徑與 task tool 現有的 model parameter 進行比較。檢視 session events schema 中提到的 MCP sampling events,並確定 sampling parameters 可以在哪裡傳遞至 inference API。完成的標準是定義一條受支援的 metadata path,並一致地傳遞 temperature、top_p 和 max_tokens。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
github, shell
領域
ai, api, cli, tooling
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。