Copilot 省钱的核心不是省 token,是省请求次数
Copilot 省钱的核心不是省 token,是省请求次数
很多人算 Copilot 成本时习惯盯 token 数,但 GitHub Copilot 的计费单位其实是 Premium Requests。
Pro 套餐每月 300 次。不同模型有倍率,比如 Claude Opus 4.6 大约是 3 倍——一次对话扣 3 次额度。所以优化方向不该是"每条消息尽量短",而是"尽量少发消息"。
顺便说一句,高校学生一般可以免费用 Pro。入口在 https://education.github.com/learner/learn ,右上角找 Enable。
1)哪些操作会扣 Premium Requests
我做了一轮简单的对照测试,结论分两类:
扣额度的:
-
发新消息(新需求、新问题)
-
同一个 session 里的追问
不扣额度的:
-
Tool call / MCP 调用(读文件、执行命令、查询信息这些)
简单说,Premium Requests 按"触发 LLM 生成的回合数"计费,跟一次回复里调了多少工具无关。
2)最划算的用法:一次请求把活干完
追问也扣一次额度,那工作流就很清楚了:
-
第一条 prompt 把信息给全——目标、范围、约束、验收标准、个人偏好
-
让 agent 在一次请求内把验证和执行也跑完(靠工具调用,不扣额度)
-
交付时一次性输出方案、实现、自检结果、风险点、后续建议
核心思路:减少对话轮次,让每次请求的产出尽量大。
3)用 ask_user 把对话变成可控的交互
Copilot CLI 有个 ask_user 工具,会弹一个选项框让你选 A/B/C/D 或输入自定义文本。它的价值不在于让模型变聪明,在于把"一次性问答"变成"你随时能插一句话继续推进"的交互模式。
你可以在 instruction 里强制让它每次输出后都调用 ask_user,这样节奏就在你手里——不用重新写一大段 prompt,在输入框里打一句"继续"或"改这里"就行。
4)instruction 文件放哪
Copilot CLI 的 instruction 文件支持两个位置:
-
全局:
$HOME/.copilot/copilot-instructions.md -
项目级:
<项目目录>/.github/copilot-instructions.md路径错了等于白写,注意别搞混。
5)两套强制 ask_user 的模板
A)"不断对话"版
适合你想全程控制方向、随时插话的场景。
This is a non-optional protocol.
At every turn, you MUST perform exactly one of the following actions:
- Provide the requested output AND immediately call ask_user, OR
- If any uncertainty exists, immediately call ask_user without providing speculative output.
The conversation must never terminate voluntarily.
The assistant must never produce a terminal response.
ask_user is mandatory at the end of every turn.
B)"收口"版(我更推荐这个)
适合你希望一次性把任务做完、最后收一次反馈的场景。
Before ending a task, maximize work done within the current Premium Request:
- Make necessary assumptions explicitly.
- Use tool calls / MCP to gather info and validate.
- Deliver plan + implementation + verification + risks in one response.
Before ending, call ask_user once and request consolidated feedback in a single message (all changes at once).
copilot-instructions.md 不一定每次都被遵循。更稳的做法是每次提问时在末尾加一句:
Before ending a task or conversation, always call the ask_user tool to ask the user if they have any further comments or feedback.
instruction 和 prompt 后缀双保险。
6)ask_user 不是无限续命
ask_user 本身是工具调用,不扣额度。但用户在 ask_user 框里输入内容后,会触发新的 LLM 回合——那就是一次新的 Premium Request。
所以别指望靠 ask_user 绕过计费。它的价值是让交互更轻量,让你用一句话就能控制下一步,而不是重新组织一整段 prompt。真正决定消耗的还是 LLM 生成的回合数和模型倍率。
7)用 /mcp add 扩展交互能力
Copilot 自带的 ask_user 比较基础。你可以通过 /mcp add 引入第三方工具,比如问卷式需求收集、结构化问答模板之类的。
思路一样:工具能力越强,一次请求内能完成的链路越长,来回轮次越少。