n8n-nodes-github-copilot 3.38.1 → 3.38.3

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.
@@ -105,6 +105,7 @@ class GitHubCopilotOpenAI {
105
105
  const messagesParam = this.getNodeParameter("messages", i, {
106
106
  message: [],
107
107
  });
108
+ console.log('📥 Manual mode - messagesParam:', JSON.stringify(messagesParam, null, 2));
108
109
  if (messagesParam.message && Array.isArray(messagesParam.message)) {
109
110
  for (const msg of messagesParam.message) {
110
111
  messages.push({
@@ -113,6 +114,7 @@ class GitHubCopilotOpenAI {
113
114
  });
114
115
  }
115
116
  }
117
+ console.log('📥 Manual mode - parsed messages:', JSON.stringify(messages, null, 2));
116
118
  }
117
119
  if (messages.length === 0) {
118
120
  messages.push({
@@ -120,6 +122,7 @@ class GitHubCopilotOpenAI {
120
122
  content: "Hello! How can you help me?",
121
123
  });
122
124
  }
125
+ console.log('📤 Final messages being sent to API:', JSON.stringify(messages, null, 2));
123
126
  let parsedTools = [];
124
127
  if (tools) {
125
128
  try {
@@ -136,7 +139,11 @@ class GitHubCopilotOpenAI {
136
139
  throw new Error(`Failed to parse tools JSON: ${error instanceof Error ? error.message : "Unknown error"}`);
137
140
  }
138
141
  }
139
- const max_tokens = this.getNodeParameter("max_tokens", i, 4096);
142
+ let max_tokens = this.getNodeParameter("max_tokens", i, 4096);
143
+ if (!max_tokens || max_tokens <= 0 || isNaN(max_tokens)) {
144
+ max_tokens = 4096;
145
+ console.log('⚠️ Invalid max_tokens value, using default: 4096');
146
+ }
140
147
  const seed = this.getNodeParameter("seed", i, 0);
141
148
  const response_format_ui = this.getNodeParameter("response_format", i, "text");
142
149
  const advancedOptions = this.getNodeParameter("advancedOptions", i, {});
@@ -193,6 +200,10 @@ class GitHubCopilotOpenAI {
193
200
  if (seed > 0) {
194
201
  requestBody.seed = seed;
195
202
  }
203
+ console.log('🚀 Sending request to GitHub Copilot API:');
204
+ console.log(' Model:', copilotModel);
205
+ console.log(' Messages count:', messages.length);
206
+ console.log(' Request body:', JSON.stringify(requestBody, null, 2));
196
207
  const response = await (0, utils_1.makeApiRequest)(this, GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.ENDPOINTS.CHAT_COMPLETIONS, requestBody, false);
197
208
  const retriesUsed = ((_a = response._retryMetadata) === null || _a === void 0 ? void 0 : _a.retries) || 0;
198
209
  if (retriesUsed > 0) {
@@ -282,11 +282,12 @@ exports.nodeProperties = [
282
282
  type: "number",
283
283
  typeOptions: {
284
284
  minValue: 1,
285
- maxValue: 4096,
285
+ maxValue: 16384,
286
286
  },
287
- default: "",
288
- placeholder: "1000",
289
- description: "Maximum number of tokens to generate",
287
+ default: 4096,
288
+ placeholder: "4096",
289
+ description: "Maximum number of tokens to generate in the response",
290
+ hint: "Default: 4096 tokens. Increase for longer responses, decrease for shorter ones.",
290
291
  },
291
292
  {
292
293
  displayName: "Top P",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.38.1",
3
+ "version": "3.38.3",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.38.1",
3
+ "version": "3.38.3",
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",