Skip to content

Commit ec84012

Browse files
author
hclsys
committed
fix(github-copilot): include Copilot-Integration-Id in /v2/token exchange
Without Copilot-Integration-Id: vscode-chat in the token request, GitHub issued a restricted copilot-language-server token that rejected image tool model requests with HTTP 400. The header is already set on /models list calls and on chat/completions dynamic headers, but was missing from the token exchange that gates the scope of all subsequent requests. Fixes #79946.
1 parent 342076b commit ec84012

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Docs: https://docs.openclaw.ai
1111

1212
### Fixes
1313

14+
- GitHub Copilot: include `Copilot-Integration-Id: vscode-chat` in the `/v2/token` exchange request so the issued API token carries `vscode-chat` scope; without it GitHub issued a restricted `copilot-language-server` token that rejected image tool model requests with HTTP 400. Fixes #79946. Thanks @hclsys.
1415
- ACP sessions: map canonical runtime options to backend-advertised ACP config keys like Claude's `effort` while keeping persisted OpenClaw state canonical. (#79926) Thanks @InTheCloudDan.
1516
- Gateway/watch: rebuild or restage missing bundled-plugin dist and runtime-postbuild outputs before launching the Gateway from a source checkout, preventing incomplete watch-mode runtime trees. (#70805) Thanks @rubencu.
1617
- CLI/update: allow restart health probes from the previous gateway protocol during self-update, and make plugin dry-runs report exact npm target versions instead of `unknown` while preserving unchanged status.

‎src/plugin-sdk/provider-auth.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ export async function resolveCopilotApiToken(params: {
232232
headers: {
233233
Accept: "application/json",
234234
Authorization: `Bearer ${params.githubToken}`,
235+
"Copilot-Integration-Id": "vscode-chat",
235236
...buildCopilotIdeHeaders({ includeApiVersion: true }),
236237
},
237238
});

0 commit comments

Comments
 (0)