n8n-nodes-github-copilot 3.37.0 → 3.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ async function executeEmbeddingsWithRetry(oauthToken, requestBody, enableRetry,
11
11
  try {
12
12
  const response = await fetch(`${GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.BASE_URL}${GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.ENDPOINTS.EMBEDDINGS}`, {
13
13
  method: "POST",
14
- headers: GitHubCopilotEndpoints_1.GitHubCopilotEndpoints.getAuthHeaders(oauthToken),
14
+ headers: GitHubCopilotEndpoints_1.GitHubCopilotEndpoints.getEmbeddingsHeaders(oauthToken),
15
15
  body: JSON.stringify(requestBody),
16
16
  });
17
17
  if (!response.ok) {
@@ -455,7 +455,7 @@ async function testEmbeddingModels(token, enableRetry = true, maxRetries = 3) {
455
455
  };
456
456
  const response = await fetch(GitHubCopilotEndpoints_1.GitHubCopilotEndpoints.getEmbeddingsUrl(), {
457
457
  method: "POST",
458
- headers: GitHubCopilotEndpoints_1.GitHubCopilotEndpoints.getAuthHeaders(token),
458
+ headers: GitHubCopilotEndpoints_1.GitHubCopilotEndpoints.getEmbeddingsHeaders(token),
459
459
  body: JSON.stringify(requestBody),
460
460
  });
461
461
  const testDuration = Date.now() - testStart;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.37.0",
3
+ "version": "3.37.1",
4
4
  "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
@@ -64,6 +64,8 @@ export declare class GitHubCopilotEndpoints {
64
64
  static getOrgSeatsUrl(org: string): string;
65
65
  static getUserCopilotUrl(): string;
66
66
  static getAuthHeaders(token: string, includeVSCodeHeaders?: boolean): Record<string, string>;
67
+ static getEmbeddingsHeaders(token: string): Record<string, string>;
68
+ private static generateUUID;
67
69
  static getRetryDelay(attempt: number): number;
68
70
  static isTpmQuotaError(statusCode: number): boolean;
69
71
  static validateToken(token: string): boolean;
@@ -85,6 +85,26 @@ class GitHubCopilotEndpoints {
85
85
  }
86
86
  return headers;
87
87
  }
88
+ static getEmbeddingsHeaders(token) {
89
+ const sessionId = `${this.generateUUID()}-${Date.now()}`;
90
+ return {
91
+ "Authorization": `Bearer ${token}`,
92
+ "Content-Type": "application/json",
93
+ "Accept": "application/json",
94
+ "Editor-Version": "vscode/1.95.0",
95
+ "Editor-Plugin-Version": "copilot/1.0.0",
96
+ "User-Agent": "GitHub-Copilot/1.0 (n8n-node)",
97
+ "Vscode-Sessionid": sessionId,
98
+ "X-GitHub-Api-Version": "2025-08-20",
99
+ };
100
+ }
101
+ static generateUUID() {
102
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
103
+ const r = (Math.random() * 16) | 0;
104
+ const v = c === "x" ? r : (r & 0x3) | 0x8;
105
+ return v.toString(16);
106
+ });
107
+ }
88
108
  static getRetryDelay(attempt) {
89
109
  const delay = exports.GITHUB_COPILOT_API.RATE_LIMITS.TPM_RETRY_DELAY_BASE *
90
110
  Math.pow(exports.GITHUB_COPILOT_API.RATE_LIMITS.EXPONENTIAL_BACKOFF_FACTOR, attempt - 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.37.0",
3
+ "version": "3.37.1",
4
4
  "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",