n8n-nodes-github-copilot 4.4.9 → 4.4.10

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.
@@ -120,8 +120,18 @@ class GitHubCopilotOpenAI {
120
120
  if (binaryKeyData && binaryKeyData[keyToUse]) {
121
121
  try {
122
122
  const binaryData = binaryKeyData[keyToUse];
123
- const mimeType = binaryData.mimeType || 'application/octet-stream';
123
+ let mimeType = binaryData.mimeType || 'application/octet-stream';
124
124
  const buffer = await this.helpers.getBinaryDataBuffer(i, keyToUse);
125
+ if (!mimeType.startsWith('image/')) {
126
+ const detected = (0, utils_1.getImageMimeType)(buffer);
127
+ if (detected !== 'application/octet-stream') {
128
+ mimeType = detected;
129
+ }
130
+ else {
131
+ mimeType = 'image/jpeg';
132
+ console.warn(`⚠️ Could not detect image type for '${keyToUse}', defaulting to image/jpeg`);
133
+ }
134
+ }
125
135
  const base64 = buffer.toString('base64');
126
136
  const dataUrl = `data:${mimeType};base64,${base64}`;
127
137
  const contentArray = [];
@@ -142,9 +152,12 @@ class GitHubCopilotOpenAI {
142
152
  type: 'image_url',
143
153
  image_url: {
144
154
  url: dataUrl,
155
+ detail: 'auto',
145
156
  },
146
157
  });
158
+ message.role = 'user';
147
159
  message.content = contentArray;
160
+ delete message.type;
148
161
  console.log(`📎 Attached binary file '${keyToUse}' (${mimeType}) as image_url`);
149
162
  }
150
163
  catch (err) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "4.4.9",
3
+ "version": "4.4.10",
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.9",
3
+ "version": "4.4.10",
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",