VSCode IDE Development Environment, Microsoft, MS
VSCode 配置 LLM 提供商 #
tested: 2026-07-01, version 1.126.0.
点击 “Chat” 的 模型选择 》管理语言模型:
.
(在普通 Coding 模式或 Agents 模式都可以)
或:Ctrl + Shift + P 搜索 “manage language models” (中文版:“管理语言模型”???)

打开模型管理窗口后,点窗口右边 “添加模型” 》“自定义接入端口”:
.
给这个供应商起个昵称:
.
填写 apikey:
.
选择 api 格式(类型):
.
然后弹出 json 编辑器,有 5 行(红框部分)暂时(2026-07-01)还需要手动修改。
注意:URL 一定要写全(红圈部分);上下文窗口大小(context window max tokens)需要自己查清楚输入和输出窗口大小,实在查不到只能按能兼容的最小数值写。
提示:apikey 已经被自动放到其他地方,避免 json 备份泄露;如果你个人使用不在意,也有直接写到 json 文件的。
.
回到 Agents 界面,就可以搜索并选用新添加的模型了:
.
老界面的 “Chat” 功能也可以用:
.
.
提示:有些中转站兼容多种 API 类型/格式,如果遇到 GPT 选 responses 类型中转报错 “truncation”(因为中转站没有支持 vscode 使用的 responses 最新的 truncation 参数),可以在“模型管理窗口”,右键直接打开 json 改成 chat-completions(需要改 apiType 和 url 两个地方):
.
提示:单个供应商有多个模型的,花括号之间用逗号分隔:
.
Agents 窗口/界面/模式 #
从 普通 (代码查看) 模式 的右上角进入:
.
Remote Development Environment #
install vscode #
- Download and install Visual Studio Code.
- Install the following extensions (e.g. py):
setup remote connection to nix #
do use public-key auth #
interactive auth / passphrase will create problems ! (progress hangs) (“details” on the bottom-right does NOT provide enough useful information)
tip: we can choose any config file. tip: check ssh key file permission (windows OS permission!)
make sure we can ssh to the remote in ps without passwd, then open vsc: F1, C+S+P > “remote ssh” > connect to remote
tip: the 1st time of connection will ask for remote type: Linux vs Mac vs. Win (on the top of VSC).