n8n-nodes-github-copilot 3.24.0 → 3.26.0

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.
@@ -83,7 +83,7 @@ async function listAvailableModels(token, enableRetry = true, maxRetries = 3) {
83
83
  },
84
84
  };
85
85
  }
86
- async function consolidatedModelTest(token, enableRetry = true, maxRetries = 3) {
86
+ async function consolidatedModelTest(token, enableRetry = true, maxRetries = 3, testsPerModel = 5) {
87
87
  const testStartTime = Date.now();
88
88
  const testResults = {};
89
89
  let totalTests = 0;
@@ -102,7 +102,6 @@ async function consolidatedModelTest(token, enableRetry = true, maxRetries = 3)
102
102
  }
103
103
  const availableModels = modelsResponse.data;
104
104
  const testMessage = "Hello! Please respond with just 'OK' to confirm you're working.";
105
- const testsPerModel = 5;
106
105
  console.log(`📊 Testing ${availableModels.length} models, ${testsPerModel} times each...`);
107
106
  for (const modelItem of availableModels) {
108
107
  const model = modelItem;
@@ -343,30 +342,56 @@ class GitHubCopilotTest {
343
342
  {
344
343
  name: 'Consolidated Model Test',
345
344
  value: 'consolidatedTest',
346
- description: 'Test all available models 5 times each and generate comprehensive report',
345
+ description: 'Test all available models 5 times each and generate comprehensive report ⚠️ This test may take up to 2 minutes to complete',
347
346
  },
348
347
  ],
349
348
  default: 'listModels',
350
349
  description: 'Select the test function to execute',
351
350
  },
352
351
  {
353
- displayName: 'Auto Retry on 403 Error',
354
- name: 'enableRetry',
355
- type: 'boolean',
356
- default: true,
357
- description: 'Automatically retry requests when hitting TPM (Transactions Per Minute) quota limits (HTTP 403)',
358
- },
359
- {
360
- displayName: 'Max Retry Attempts',
361
- name: 'maxRetries',
352
+ displayName: 'Tests Per Model',
353
+ name: 'testsPerModel',
362
354
  type: 'number',
363
- default: 3,
364
- description: 'Maximum number of retry attempts for 403 errors',
355
+ default: 5,
356
+ description: 'Number of times to test each model (affects accuracy of results)',
365
357
  displayOptions: {
366
358
  show: {
367
- enableRetry: [true],
359
+ testFunction: ['consolidatedTest'],
368
360
  },
369
361
  },
362
+ typeOptions: {
363
+ minValue: 1,
364
+ maxValue: 20,
365
+ },
366
+ },
367
+ {
368
+ displayName: 'Advanced Options',
369
+ name: 'advancedOptions',
370
+ type: 'collection',
371
+ placeholder: 'Add Option',
372
+ default: {},
373
+ description: 'Additional options for the test execution',
374
+ options: [
375
+ {
376
+ displayName: 'Auto Retry on 403 Error',
377
+ name: 'enableRetry',
378
+ type: 'boolean',
379
+ default: true,
380
+ description: 'Automatically retry requests when hitting TPM (Transactions Per Minute) quota limits (HTTP 403)',
381
+ },
382
+ {
383
+ displayName: 'Max Retry Attempts',
384
+ name: 'maxRetries',
385
+ type: 'number',
386
+ default: 3,
387
+ description: 'Maximum number of retry attempts for 403 errors',
388
+ displayOptions: {
389
+ show: {
390
+ enableRetry: [true],
391
+ },
392
+ },
393
+ },
394
+ ],
370
395
  },
371
396
  ],
372
397
  };
@@ -377,8 +402,12 @@ class GitHubCopilotTest {
377
402
  for (let i = 0; i < items.length; i++) {
378
403
  try {
379
404
  const testFunction = this.getNodeParameter('testFunction', i);
380
- const enableRetry = this.getNodeParameter('enableRetry', i);
381
- const maxRetries = this.getNodeParameter('maxRetries', i);
405
+ const advancedOptions = this.getNodeParameter('advancedOptions', i, {});
406
+ const enableRetry = advancedOptions.enableRetry !== false;
407
+ const maxRetries = advancedOptions.maxRetries || 3;
408
+ const testsPerModel = testFunction === 'consolidatedTest'
409
+ ? this.getNodeParameter('testsPerModel', i)
410
+ : 5;
382
411
  const credentials = await this.getCredentials('githubCopilotApi', i);
383
412
  if (!(credentials === null || credentials === void 0 ? void 0 : credentials.token)) {
384
413
  throw new Error(GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.ERRORS.CREDENTIALS_REQUIRED);
@@ -393,7 +422,7 @@ class GitHubCopilotTest {
393
422
  result = await listAvailableModels(token, enableRetry, maxRetries);
394
423
  break;
395
424
  case 'consolidatedTest':
396
- result = await consolidatedModelTest(token, enableRetry, maxRetries);
425
+ result = await consolidatedModelTest(token, enableRetry, maxRetries, testsPerModel);
397
426
  break;
398
427
  default:
399
428
  throw new Error(`Unknown test function: ${testFunction}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.24.0",
3
+ "version": "3.26.0",
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",