新人一个,四月底才开始折腾AI写代码。选来选去用了DeepSeek V4,照着官方文档,装了个叫Vizards.deepseek-v4-for-copilot的扩展,成功在VS Code的GitHub Copilot里用上了DeepSeek V4 Pro,还开了思考模式。
我让它帮我改一个Node.js写的小画廊网站(这网站之前是各种在线AI拼凑出来的,就一个.js文件,HTML、CSS、JS全堆一块儿)。
结果没几个小时就出大事了。查了资料才搞懂,用Pro模型在长对话之后,输入(没命中缓存)会暴增,就算你后面问的问题贼简单:
当时一看控制台直接人麻了,“刚充的50块这么快就没了?”。问了群友,有人提到是缓存命中率异常。我马上跑去翻这个扩展的GitHub仓库,果然看到了这个Issue:
github.com/Vizards/deepseek-v4-for-copilot
Long-context prompt cache diagnostics and high miss-token cases 长对话 Prompt Cache 命中率异常日志收集
已打开 05:45AM - 03 May 26 UTC
tracking
[!NOTE]
**2026-05-08 Update**: Root cause analysis published.
Read the f…ull write-up, solution brainstorming, join the discussion in **#56**.This issue (#25) remains open for **reporting new cache miss patterns** and **sharing diagnostic logs**.
Background / 背景
Some users have reported unusually high cost in long Copilot Chat Agent conversations with DeepSeek V4 Pro. The common symptom is that prompt\_cache\_miss\_tokens grows unexpectedly, even when the follow-up prompt is very simple.
一些用户反馈在 Copilot Chat Agent 长会话中,即使后续只是问很简单的问题,DeepSeek V4 的 prompt\_cache\_miss\_tokens 也会异常增长,导致费用明显上升。
Symptoms / 典型现象
Please comment here if you observe one or more of the following:
如果你遇到以下任意一种情况,欢迎在本 issue 下补充日志:
- A long Copilot Chat conversation becomes much more expensive over time.
Copilot Chat 长会话随着轮次增加,费用明显变高。 - A simple follow-up prompt still costs noticeably more than expected.
只是问一个简单的后续问题,也比预期贵很多。 - DeepSeek dashboard shows rapidly increasing
prompt\_cache\_miss\_tokens.
DeepSeek 控制台显示prompt\_cache\_miss\_tokens快速增长。 - Creating a new Copilot Chat conversation significantly reduces cost.
新建 Copilot Chat 对话后,费用明显下降。 - Only a few prompts in an otherwise normal session become unusually expensive.
整体会话大部分轮次正常,但其中少数几轮 prompt 费用异常高。
How to collect logs / 如何收集日志
Starting from v0.4.0, the normal extension build includes cache diagnostics. No special VSIX needed.
从 v0.4.0 开始,正式版插件已内置缓存诊断,不需要安装特殊版本。
- Install or update to the latest public version (
v0.4.0or newer). 安装或更新到最新正式版。 - Enable debug logging in VS Code settings: 在设置中开启 Debug:
{ "deepseek-copilot.debug": true }
- Reload Window or restart VS Code. Reload Window 或重启 VS Code。
- Reproduce the issue in the original long conversation if possible. 尽量在原本出现费用异常的长会话里复现。
Recommended reproduction steps / 推荐复现方式
Ask 1-3 lightweight follow-up questions in the original conversation. For example:
在原本的会话中问 1-3 个轻量问题,例如:
Please briefly summarize the latest conclusion based on the current conversation context. Do not read files and do not modify files.
中文:
请基于当前对话上下文,简单总结你刚才的结论。不要读取文件,不要修改文件。
To reduce noise, please try to keep these unchanged during the test:
为了减少干扰,请尽量保持:
- Do not switch model / 不切换模型
- Do not switch Thinking Effort / 不切换 Thinking Effort
- Do not switch between Chat, Ask, and Agent modes / 不切换 Chat、Ask、Agent 模式
- Do not attach new images or files / 不附加新图片或新文件
- Do not ask the Agent to scan the whole project / 不让 Agent 扫描整个项目
- Do not ask the Agent to modify files / 不让 Agent 修改文件
Uploading logs / 上传日志
Run DeepSeek: Show Logs from the Command Palette, then save and upload the full log as a file (preferred over pasting long text).
运行 Command Palette 中的 DeepSeek: Show Logs,将完整日志保存为文件上传。
If possible, please also mention: 如果方便,也请说明:
- Model & mode used / 使用的模型和模式(Agent / Ask / Chat)
- Whether the conversation included images or file attachments / 是否包含图片或文件附件
- Whether VS Code was restarted or reloaded before the expensive turn / 费用异常前是否重启或 Reload
Privacy / 隐私说明
The diagnostic logs only include counts, lengths, hashes, model identifiers, cache statistics, and structural markers. Please still review the logs before posting and remove anything you consider sensitive.
诊断日志只包含计数、长度、hash、模型标识、缓存统计和结构化 marker。提交前仍建议自行检查,并删除任何你认为敏感的内容。
原来我不是一个人。
而且这扩展前几天还因为未知原因从商店下架了,现在还没回来。
我比较喜欢图形界面操作,所以挺爱用GitHub Copilot这种深度集成在VS Code里的方式,它能自动调用各种工具,默认就用Playwright MCP来测网页啥的。
所以想问问大伙儿:有没有其他类似的扩展,可以自己配置GitHub Copilot的API地址、API Key、模型列表这些?
相关链接:
接入 GitHub Copilot | DeepSeek API Docs
DeepSeek V4 for Copilot Chat 是一个 VS Code 插件,将 DeepSeek V4 Pro 和 Flash 直接添加到 GitHub Copilot 的模型选择器中。你仍可使用 Copilot 的 Agent 模式、工具调用、Skills 和 MCP — 全部由 DeepSeek 驱动。
GitHub - Vizards/deepseek-v4-for-copilot: Pick DeepSeek V4 from the Copilot Chat model…
Pick DeepSeek V4 from the Copilot Chat model picker — and keep everything else Copilot already gives you.