n8n-nodes-github-copilot 4.4.11 → 4.4.12

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.
@@ -128,17 +128,12 @@ class GitHubCopilotOpenAI {
128
128
  mimeType = detected;
129
129
  }
130
130
  else {
131
- if (mimeType === 'application/pdf') {
132
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `❌ Unsupported File Type: PDF files are not supported by the GitHub Copilot Vision API. Please convert the PDF to an image (JPEG, PNG, WEBP) or extract the text content before sending.`, { itemIndex: i });
131
+ console.warn(`⚠️ Could not detect image type for '${keyToUse}', defaulting to 'image/jpeg' or keeping original '${mimeType}'`);
132
+ if (mimeType === 'application/octet-stream') {
133
+ mimeType = 'image/jpeg';
133
134
  }
134
- mimeType = 'image/jpeg';
135
- console.warn(`⚠️ Could not detect image type for '${keyToUse}', defaulting to image/jpeg`);
136
135
  }
137
136
  }
138
- const allowedMimeTypes = ['image/png', 'image/jpeg', 'image/gif', 'image/webp'];
139
- if (!allowedMimeTypes.includes(mimeType)) {
140
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `❌ Unsupported Image Format: '${mimeType}'. The API only supports: ${allowedMimeTypes.map(t => t.replace('image/', '')).join(', ')}.`, { itemIndex: i });
141
- }
142
137
  const base64 = buffer.toString('base64');
143
138
  const dataUrl = `data:${mimeType};base64,${base64}`;
144
139
  const contentArray = [];
@@ -168,6 +163,9 @@ class GitHubCopilotOpenAI {
168
163
  console.log(`📎 Attached binary file '${keyToUse}' (${mimeType}) as image_url`);
169
164
  }
170
165
  catch (err) {
166
+ if (err instanceof n8n_workflow_1.NodeOperationError) {
167
+ throw err;
168
+ }
171
169
  console.error(`❌ Failed to read binary data for '${keyToUse}':`, err);
172
170
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to read binary file '${keyToUse}'. Ensure the binary data exists.`, { itemIndex: i });
173
171
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "4.4.11",
3
+ "version": "4.4.12",
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.11",
3
+ "version": "4.4.12",
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",