From 579dd29fabc2ec75731a4d218bb62b9fe9c3a432 Mon Sep 17 00:00:00 2001 From: johnd0e <1838643+johnd0e@users.noreply.github.com> Date: Thu, 17 Apr 2025 16:32:11 +0200 Subject: [PATCH] Update docs --- README.md | 12 +++++++----- src/worker.mjs | 6 ++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 41a251a..854ad5f 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ Even if you don't meet the eligibility criteria, the paid subscription ([_Individual_](https://docs.github.com/en/copilot/copilot-individual/about-github-copilot-individual)) is more affordable than [OpenAI's offering](https://chat.openai.com/#pricing). -It costs only $10 and still provides access to [GPT-4](https://openai.com/gpt-4). +It costs only $10 and still provides access to the latest generative models from +[OpenAI](https://openai.com/news/), [Anthropic](https://www.anthropic.com/) and [Google](https://ai.google/get-started/our-models/). > [!NOTE] > If the above options are not suitable for you - consider trying completely @@ -122,11 +123,11 @@ Alternatively, it could be in some config file (check the relevant documentation For some command-line tools, you may need to set an environment variable, _e.g._: ```sh -set OPENAI_BASE_URL=https://copilot.YOURSUBDOMAIN.workers.dev/v1 +OPENAI_BASE_URL="https://copilot.YOURSUBDOMAIN.workers.dev/v1" ``` _..or_: ```sh -set OPENAI_API_BASE=https://copilot.YOURSUBDOMAIN.workers.dev/v1 +OPENAI_API_BASE="https://copilot.YOURSUBDOMAIN.workers.dev/v1" ``` ### API key @@ -142,15 +143,16 @@ Alternatively, it might be located in some config file For some command-line tools, you may need to set an environment variable, _e.g._: ```sh -set OPENAI_API_KEY=ghu_... +OPENAI_API_KEY=ghu_... ``` ### Models The list of available models can be accessed through the standard `/v1/models` endpoint and may vary depending on the provided API key. +Some models may need to be activated in the [settings](https://github.com/settings/copilot). -Examples: `gpt-3.5-turbo`, `gpt-4`, `gpt-4-0125-preview`, `gpt-4-o-preview`. +Examples: `gpt-4.1`, `o4-mini`, `claude-3.7-sonnet-thought`, `gemini-2.5-pro`. ## Tech notes diff --git a/src/worker.mjs b/src/worker.mjs index 10e9287..219e661 100644 --- a/src/worker.mjs +++ b/src/worker.mjs @@ -58,8 +58,8 @@ const handleOPTIONS = async () => { }); }; -const chatVersion = "0.17.1"; -const vscodeVersion = "1.91.1"; +const chatVersion = "0.26.5"; +const vscodeVersion = "1.99.3"; const apiVersion = "2023-07-07"; const getToken = async (authKey) => { if (authKey.startsWith("sk-")) { // dumb attempt to hide real auth key from malicious web services @@ -165,7 +165,6 @@ const clean = (str) => { console.error(e); return str; } - //json.model = "gpt-4"; // stub json.object = "chat.completion"; delete json.prompt_filter_results; for (const item of json.choices) { @@ -187,7 +186,6 @@ const cleanLine = (str) => { return str; } if (json.choices.length === 0) { return; } // json.prompt_filter_results - //json.model = "gpt-4"; // stub json.object = "chat.completion.chunk"; for (const item of json.choices) { delete item.content_filter_offsets;