n8n-nodes-github-copilot 4.4.2 → 4.4.5

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.
@@ -43,7 +43,7 @@ class GitHubCopilotOpenAI {
43
43
  };
44
44
  }
45
45
  async execute() {
46
- var _a, _b, _c, _d, _e, _f;
46
+ var _a, _b, _c, _d, _e, _f, _g, _h;
47
47
  const items = this.getInputData();
48
48
  const returnData = [];
49
49
  for (let i = 0; i < items.length; i++) {
@@ -162,7 +162,6 @@ class GitHubCopilotOpenAI {
162
162
  msg.content = JSON.stringify(msg.content, null, 2);
163
163
  console.log(`🔄 Auto-converted message[${msgIndex}].content from object to JSON string`);
164
164
  console.log(' Original type:', typeof originalContent);
165
- console.log(' Converted to:', msg.content.substring(0, 100) + '...');
166
165
  }
167
166
  }
168
167
  const advancedOptions = this.getNodeParameter('advancedOptions', i, {});
@@ -256,7 +255,10 @@ class GitHubCopilotOpenAI {
256
255
  break;
257
256
  }
258
257
  if (typeof content === 'string') {
259
- if (content.includes('data:image/') || content.match(/\[.*image.*\]/i) || content.startsWith('copilot-file://')) {
258
+ const trimmed = content.trim();
259
+ const isActualDataUrl = /^data:image\/[a-z]+;base64,[A-Za-z0-9+\/=]{100,}/i.test(trimmed);
260
+ const isCopilotFileUrl = trimmed.startsWith('copilot-file://');
261
+ if (isActualDataUrl || isCopilotFileUrl) {
260
262
  hasVisionContent = true;
261
263
  break;
262
264
  }
@@ -274,12 +276,15 @@ class GitHubCopilotOpenAI {
274
276
  }
275
277
  if (hasVisionContent) {
276
278
  const credentials = await this.getCredentials('githubCopilotApi');
277
- const oauthToken = (credentials.oauthToken || credentials.token);
278
- let supportsVision = oauthToken
279
- ? DynamicModelsManager_1.DynamicModelsManager.modelSupportsVision(oauthToken, copilotModel)
280
- : null;
279
+ const oauthToken = credentials.oauthToken;
280
+ let supportsVision = DynamicModelsManager_1.DynamicModelsManager.modelSupportsVision(oauthToken, copilotModel);
281
281
  if (supportsVision === null) {
282
282
  const modelInfo = GitHubCopilotModels_1.GitHubCopilotModelsManager.getModelByValue(copilotModel);
283
+ supportsVision = !!(((_f = modelInfo === null || modelInfo === void 0 ? void 0 : modelInfo.capabilities) === null || _f === void 0 ? void 0 : _f.vision) || ((_g = modelInfo === null || modelInfo === void 0 ? void 0 : modelInfo.capabilities) === null || _g === void 0 ? void 0 : _g.multimodal));
284
+ console.log(`đŸ‘ī¸ Vision check for model ${copilotModel}: using static list, supportsVision=${supportsVision}`);
285
+ }
286
+ else {
287
+ console.log(`đŸ‘ī¸ Vision check for model ${copilotModel}: using API cache, supportsVision=${supportsVision}`);
283
288
  }
284
289
  if (!supportsVision) {
285
290
  const enableVisionFallback = advancedOptions.enableVisionFallback || false;
@@ -345,7 +350,7 @@ class GitHubCopilotOpenAI {
345
350
  console.log(' Has Vision Content:', hasVisionContent);
346
351
  console.log(' Request body:', JSON.stringify(requestBody, null, 2));
347
352
  const response = await (0, utils_1.makeApiRequest)(this, GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.ENDPOINTS.CHAT_COMPLETIONS, requestBody, hasVisionContent);
348
- const retriesUsed = ((_f = response._retryMetadata) === null || _f === void 0 ? void 0 : _f.retries) || 0;
353
+ const retriesUsed = ((_h = response._retryMetadata) === null || _h === void 0 ? void 0 : _h.retries) || 0;
349
354
  if (retriesUsed > 0) {
350
355
  console.log(`â„šī¸ Request completed with ${retriesUsed} retry(ies)`);
351
356
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "4.4.2",
3
+ "version": "4.4.5",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "4.4.2",
3
+ "version": "4.4.5",
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",