n8n-nodes-github-copilot 4.4.14 → 4.4.16

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.
@@ -416,7 +416,15 @@ class GitHubCopilotOpenAI {
416
416
  console.log(' Messages count:', messages.length);
417
417
  console.log(' Has Vision Content:', hasVisionContent);
418
418
  console.log(' Request body:', JSON.stringify(requestBody, null, 2));
419
- const response = await (0, utils_1.makeApiRequest)(this, GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.ENDPOINTS.CHAT_COMPLETIONS, requestBody, hasVisionContent);
419
+ let response;
420
+ try {
421
+ response = await (0, utils_1.makeApiRequest)(this, GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.ENDPOINTS.CHAT_COMPLETIONS, requestBody, hasVisionContent);
422
+ }
423
+ catch (error) {
424
+ const errorMsg = error instanceof Error ? error.message : String(error);
425
+ const enhancedError = new n8n_workflow_1.NodeOperationError(this.getNode(), `${errorMsg}\n\nšŸ¤– Model used: ${copilotModel}`);
426
+ throw enhancedError;
427
+ }
420
428
  const retriesUsed = ((_h = response._retryMetadata) === null || _h === void 0 ? void 0 : _h.retries) || 0;
421
429
  if (retriesUsed > 0) {
422
430
  console.log(`ā„¹ļø Request completed with ${retriesUsed} retry(ies)`);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "4.4.14",
3
+ "version": "4.4.16",
4
4
  "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows with full tools and function calling support - 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",
@@ -16,8 +16,8 @@
16
16
  "build": "tsc && gulp build:icons",
17
17
  "dev": "tsc --watch",
18
18
  "format": "prettier nodes credentials --write",
19
- "lint": "eslint nodes credentials shared --ext .ts",
20
- "lintfix": "eslint nodes credentials shared --ext .ts --fix",
19
+ "lint": "eslint nodes credentials shared",
20
+ "lintfix": "eslint nodes credentials shared --fix",
21
21
  "prepublishOnly": "npm run build"
22
22
  },
23
23
  "files": [
@@ -117,11 +117,6 @@ class DynamicModelsManager {
117
117
  return '1x';
118
118
  }
119
119
  static modelsToN8nOptions(models) {
120
- const nameCount = new Map();
121
- models.forEach((model) => {
122
- const displayName = model.display_name || model.name || model.id;
123
- nameCount.set(displayName, (nameCount.get(displayName) || 0) + 1);
124
- });
125
120
  return models.map((model) => {
126
121
  const badges = [];
127
122
  if (model.capabilities) {
@@ -142,7 +137,6 @@ class DynamicModelsManager {
142
137
  const displayName = model.display_name || model.name || model.id;
143
138
  const costMultiplier = this.getCostMultiplier(model);
144
139
  const badgesText = badges.length > 0 ? ` [${badges.join(" • ")}]` : "";
145
- const hasDuplicates = (nameCount.get(displayName) || 0) > 1;
146
140
  const category = model.model_picker_category || "";
147
141
  const categoryLabel = category ? ` - ${category.charAt(0).toUpperCase() + category.slice(1)}` : "";
148
142
  const multiplierDisplay = ` • ${costMultiplier}${categoryLabel}`;
@@ -150,9 +144,7 @@ class DynamicModelsManager {
150
144
  if (model.capabilities) {
151
145
  const limits = model.capabilities.limits || {};
152
146
  const parts = [];
153
- if (hasDuplicates) {
154
- parts.push(`ID: ${model.id}`);
155
- }
147
+ parts.push(`ID: ${model.id}`);
156
148
  if (limits.max_context_window_tokens) {
157
149
  parts.push(`Context: ${(limits.max_context_window_tokens / 1000).toFixed(0)}k`);
158
150
  }
@@ -165,9 +157,7 @@ class DynamicModelsManager {
165
157
  description = parts.join(" • ");
166
158
  }
167
159
  else {
168
- if (hasDuplicates) {
169
- description = `ID: ${model.id}`;
170
- }
160
+ description = `ID: ${model.id}`;
171
161
  }
172
162
  return {
173
163
  name: `${displayName}${multiplierDisplay}${badgesText}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "4.4.14",
3
+ "version": "4.4.16",
4
4
  "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows with full tools and function calling support - 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",
@@ -16,8 +16,8 @@
16
16
  "build": "tsc && gulp build:icons",
17
17
  "dev": "tsc --watch",
18
18
  "format": "prettier nodes credentials --write",
19
- "lint": "eslint nodes credentials shared --ext .ts",
20
- "lintfix": "eslint nodes credentials shared --ext .ts --fix",
19
+ "lint": "eslint nodes credentials shared",
20
+ "lintfix": "eslint nodes credentials shared --fix",
21
21
  "prepublishOnly": "npm run build"
22
22
  },
23
23
  "files": [