github / github/copilot-cli

Support temperature/sampling parameters in plugin SKILL.md metadata

Đang mở
#3,056 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
area:configuration area:models area:plugins
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng việc truy vết cách metadata frontmatter của SKILL.md, plugin.json và agency.json được phân tích, sau đó so sánh luồng đó với model parameter hiện có của task tool. Xem xét session events schema cho các MCP sampling events được đề cập và xác định nơi sampling parameters có thể đi tới inference API. Hoàn tất có nghĩa là đã xác định một metadata path được hỗ trợ và temperature, top_p cùng max_tokens được truyền qua một cách nhất quán.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github, shell
Lĩnh vực
ai, api, cli, tooling
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.