Override无缝替代 —— Copilot 后端,适配最新版copilot chat

TL;DR

Ripper/Copilot后端代理服务 可实现 Override同等功能,可适配最新版Copilot Chat。

前情提要

始皇撅了Copilot后, Override 搭配Copilot 成为了日常开发的重要助手。
【重磅】让我再撅Github Copilot一次 - 资源荟萃 - LINUX DO

但是自从 VS Code 更新到1.95以后,Copilot Chat 与 Override对接总是报错。
升级到最新版本的Visual Studio Code后无法使用。 · Issue #68 · linux-do/override

遂寻求Override的替代方案,找到了Ripper/Copilot后端代理服务 ,使用体验可无缝衔接,适配最新版Copilot Chat。

那么,怎么使用呢?

超级懒人版教程(免部署,Copilot 平替公车)

VS Code 设置

{
    "github.copilot.advanced": {
        "authProvider": "github-enterprise",
        "debug.overrideCAPIUrl": "https://api.mycopilot.noteo.cn",
        "debug.overrideProxyUrl": "https://copilot-proxy.mycopilot.noteo.cn",
        "debug.chatOverrideProxyUrl": "https://api.mycopilot.noteo.cn/chat/completions",
        "debug.overrideFastRewriteEngine": "v1/engines/copilot-centralus-h100",
        "debug.overrideFastRewriteUrl": "https://api.mycopilot.noteo.cn"
    },
    "github-enterprise.uri": "https://mycopilot.noteo.cn"
}

其他IDE参见 Copilot 配置指南

懒人版教程(自行部署服务,自定义API)

1. 部署Docker服务

下载 docker-compose.yml 文件下载到本地, 将里面的 API KEY 替换。

- CODEX_API_BASE=https://api.deepseek.com/beta/v1/completions # 代码补全API地址
- CODEX_API_KEY=sk-xxx # 代码补全API密钥, 支持多个轮询APIKEY,用英文逗号分隔
- CODEX_API_MODEL_NAME=deepseek-chat # 代码补全API模型名称

- CHAT_API_BASE=https://api.deepseek.com/v1/chat/completions # 聊天补全API地址
- CHAT_API_KEY=sk-xxx # 聊天补全API密钥
- CHAT_API_MODEL_NAME=deepseek-chat # 聊天补全API模型名称

Docker 启动!

# 启动服务
docker compose up -d

# 查看日志
docker logs copilot-app

# 停止服务
docker compose down

2. 修改本机host

127.0.0.1 mycopilot.com
127.0.0.1 api.mycopilot.com
127.0.0.1 copilot-proxy.mycopilot.com
127.0.0.1 copilot-telemetry-service.mycopilot.com

在服务器部署,请将127.0.0.1替换为你的服务器ip。
自有域名设置,请参照 此文档

3. 设置VS Code

修改 VS Code 的 settings.json 文件, 添加以下配置:

"github.copilot.advanced": {
    "authProvider": "github-enterprise",
    "debug.overrideCAPIUrl": "http://api.mycopilot.com:1188",
    "debug.overrideProxyUrl": "http://copilot-proxy.mycopilot.com:1188",
    "debug.chatOverrideProxyUrl": "http://api.mycopilot.com:1188/chat/completions",
    "debug.overrideFastRewriteEngine": "v1/engines/copilot-centralus-h100",
    "debug.overrideFastRewriteUrl": "http://api.mycopilot.com:1188"
},
"github-enterprise.uri": "http://mycopilot.com:1188"

4. Copilot 插件登录

安装Copilot插件,点击登录

vscode 弹出选项,继续点击

跳转到网页,点击登录

5. 愉快使用吧

418 个赞

先点赞,收藏试一试

8 个赞

太好了,今天试试新手段 :saluting_face:

7 个赞

超级懒人版部署成功,我就是超级懒人 :sunglasses:

7 个赞

感谢大佬的分享,目前感觉Cursor很好用了,暂时不想折腾Copilot

4 个赞

感谢感谢!待会试一下

4 个赞

昨天帖子里不是还再说 windsurf 的好吗,今天就变心了? :face_in_clouds:

5 个赞

昨天试用了一下Cursor,感觉用起来更顺畅嘛。

4 个赞

能白嫖就是好( :saluting_face:

6 个赞

佬,部署这个对服务器配置有要求吗,1c1g可以吗

5 个赞

之前也考虑过Cursor,但是由于一些原因还是选择了Copilot后端

  • Cursor是试用15天,感觉长期使用不稳定,封号风险
  • VS Code的远程开发很棒,习惯了 devcontainer 功能
  • Ripper/Copilot 后端还可以给VS 2022用
6 个赞

有道理,对于习惯试用Jetbrains全家桶的人来说,Copilot服务端也是一个不错的解决方案了。

7 个赞

马克备用
字数

6 个赞

超级懒人好用,谢谢大佬

4 个赞

我部署在Azure免费机上,再用watchtower定时检查更新,无感丝滑tieba_001

9 个赞

这本质上就是个转发服务,配置要求应该很低。

8 个赞

太强了,大佬!

8 个赞

已加入, 超级懒人版
超级懒人版底层是哪个api呢?

6 个赞

感觉目前copilot的困境还是没有一个比较适合补全的模型,ds没有专门调整过感觉还是差了些

6 个赞

话说这个后端支持idea新版插件么?

5 个赞