fix(copilot): add missing Copilot-Integration-Id header
The GitHub Copilot API now requires a Copilot-Integration-Id header on all requests. Without it, every API call fails with HTTP 400: "missing required Copilot-Integration-Id header". Uses vscode-chat as the integration ID, matching opencode which shares the same OAuth client ID (Ov23li8tweQw6odWQebz). Fixes: Copilot provider fails with "missing required Copilot-Integration-Id header" (HTTP 400) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -285,6 +285,7 @@ def copilot_request_headers(
|
||||
headers: dict[str, str] = {
|
||||
"Editor-Version": "vscode/1.104.1",
|
||||
"User-Agent": "HermesAgent/1.0",
|
||||
"Copilot-Integration-Id": "vscode-chat",
|
||||
"Openai-Intent": "conversation-edits",
|
||||
"x-initiator": "agent" if is_agent_turn else "user",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user