Skip to content

Commit f8c0a48

Browse files
author
Ian Sherr
committed
fix: update GitHub Copilot CLI headers to v0.35.0 for compatibility
- Update User-Agent from v0.31.2 to v0.35.0 - Update Editor-Version from vscode/1.104.1 to vscode/1.99.3 - Update Editor-Plugin-Version from copilot-chat/0.31.2 to copilot-chat/0.35.0 These updates ensure compatibility with the latest GitHub Copilot CLI (v0.0.351+) and resolve 'model not supported' errors when using GitHub Copilot models in OpenCode.
1 parent 1c8425d commit f8c0a48

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

index.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export async function CopilotAuthPlugin({ client }) {
88
const COPILOT_API_KEY_URL =
99
"https://api.github.com/copilot_internal/v2/token";
1010
const HEADERS = {
11-
"User-Agent": "GitHubCopilotChat/0.31.2",
12-
"Editor-Version": "vscode/1.104.1",
13-
"Editor-Plugin-Version": "copilot-chat/0.31.2",
11+
"User-Agent": "GitHubCopilotChat/0.35.0",
12+
"Editor-Version": "vscode/1.99.3",
13+
"Editor-Plugin-Version": "copilot-chat/0.35.0",
1414
"Copilot-Integration-Id": "vscode-chat",
1515
};
1616

@@ -107,7 +107,7 @@ export async function CopilotAuthPlugin({ client }) {
107107
headers: {
108108
Accept: "application/json",
109109
"Content-Type": "application/json",
110-
"User-Agent": "GitHubCopilotChat/0.31.2",
110+
"User-Agent": "GitHubCopilotChat/0.35.0",
111111
},
112112
body: JSON.stringify({
113113
client_id: CLIENT_ID,
@@ -126,7 +126,7 @@ export async function CopilotAuthPlugin({ client }) {
126126
headers: {
127127
Accept: "application/json",
128128
"Content-Type": "application/json",
129-
"User-Agent": "GitHubCopilotChat/0.31.2",
129+
"User-Agent": "GitHubCopilotChat/0.35.0",
130130
},
131131
body: JSON.stringify({
132132
client_id: CLIENT_ID,

0 commit comments

Comments
 (0)