接入说明
OAI Compatible Provider 插件的核心作用是将 Copilot 发出的标准 OpenAI 格式请求,转发到指定的兼容服务端(如 ModelScope 推理网关或自建服务)。
⚠️ 注意 登录账号建议使用个人 Pro 会员或免费账号,组织账号可能无法管理模型权限。
插件安装
在 VS Code 扩展市场搜索并启用以下组件:
- GitHub Copilot
- GitHub Copilot Chat
- OAI Compatible Provider for Copilot (ID: johnny-zhao.oai-compatible-copilot)
安装完成后,执行 Developer: Reload Window 重载窗口以确保插件生效。
提示:确保 VS Code 中已正确登录 GitHub 且 Copilot 基础功能可用,避免排查时混淆问题来源。
配置文件编写
建议将配置写入项目根目录下的 .vscode/settings.json 文件中。
基础配置结构
{
"oaicopilot.baseUrl": "https://<你的 API 地址>/v1",
"oaicopilot.delay": 0,
"oaicopilot.readFileLines": 0,
"oaicopilot.retry": {
"enabled": true,
"max_attempts": 3,
"interval_ms": 1000,
"status_codes": []
},
"oaicopilot.commitLanguage":


