From c7cc3f781cdb39de6de575fdccca4c3192316b58 Mon Sep 17 00:00:00 2001 From: johnd0e <1838643+johnd0e@users.noreply.github.com> Date: Sat, 12 Jul 2025 22:20:03 +0200 Subject: [PATCH] Remove cocopilot support --- src/worker.mjs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/worker.mjs b/src/worker.mjs index 9771acf..289b616 100644 --- a/src/worker.mjs +++ b/src/worker.mjs @@ -61,6 +61,7 @@ const handleOPTIONS = async () => { const chatVersion = "0.29.0"; const vscodeVersion = "1.102.0"; const apiVersion = "2025-04-01"; +const githubapihost = "api.github.com"; const getToken = async (authKey) => { if (authKey.startsWith("sk-")) { // dumb attempt to hide real auth key from malicious web services const decoded = atob(authKey.substring(3)); @@ -68,10 +69,6 @@ const getToken = async (authKey) => { authKey = decoded; } } - let githubapihost = "api.github.com"; - if (authKey.startsWith("ccu_") || authKey.endsWith("CoCopilot")) { - githubapihost = "api.cocopilot.org"; - } let response = await fetch(`https://${githubapihost}/copilot_internal/v2/token`, { method: "GET", headers: {