n8n-nodes-github-copilot 3.38.20 → 3.38.21
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.
|
@@ -15,7 +15,7 @@ class GitHubCopilotChatModel {
|
|
|
15
15
|
icon: "file:../../shared/icons/copilot.svg",
|
|
16
16
|
group: ["transform"],
|
|
17
17
|
version: 1,
|
|
18
|
-
description: "GitHub Copilot chat model for AI workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
|
|
18
|
+
description: "GitHub Copilot chat model for AI workflows with full support for tools and function calling - access GPT-5, Claude, Gemini and more using your Copilot subscription",
|
|
19
19
|
defaults: {
|
|
20
20
|
name: "GitHub Copilot Chat Model",
|
|
21
21
|
},
|
|
@@ -114,6 +114,46 @@ class GitHubCopilotChatModel {
|
|
|
114
114
|
},
|
|
115
115
|
},
|
|
116
116
|
},
|
|
117
|
+
{
|
|
118
|
+
displayName: "Tools (Function Calling)",
|
|
119
|
+
name: "tools",
|
|
120
|
+
type: "string",
|
|
121
|
+
default: "",
|
|
122
|
+
description: "Optional: Array of tools/functions available to the model (OpenAI format). Leave empty if not using function calling.",
|
|
123
|
+
hint: "JSON array of tool definitions in OpenAI format. Leave this field empty if you don't need function calling.",
|
|
124
|
+
typeOptions: {
|
|
125
|
+
rows: 6,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
displayName: "Tool Choice",
|
|
130
|
+
name: "tool_choice",
|
|
131
|
+
type: "options",
|
|
132
|
+
options: [
|
|
133
|
+
{
|
|
134
|
+
name: "Auto",
|
|
135
|
+
value: "auto",
|
|
136
|
+
description: "Let the model decide when to use tools",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "Required",
|
|
140
|
+
value: "required",
|
|
141
|
+
description: "Force the model to use at least one tool",
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "None",
|
|
145
|
+
value: "none",
|
|
146
|
+
description: "Disable tool usage",
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
default: "auto",
|
|
150
|
+
description: "Control how the model uses tools",
|
|
151
|
+
displayOptions: {
|
|
152
|
+
show: {
|
|
153
|
+
tools: ["/.+/"],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
117
157
|
],
|
|
118
158
|
},
|
|
119
159
|
],
|
|
@@ -161,12 +201,32 @@ class GitHubCopilotChatModel {
|
|
|
161
201
|
const minVSCodeVersion = (0, ModelVersionRequirements_1.getMinVSCodeVersion)(safeModel);
|
|
162
202
|
const additionalHeaders = (0, ModelVersionRequirements_1.getAdditionalHeaders)(safeModel);
|
|
163
203
|
console.log(`🔧 Model: ${safeModel} requires VS Code version: ${minVSCodeVersion}`);
|
|
204
|
+
let parsedTools = [];
|
|
205
|
+
if (options.tools && options.tools.trim()) {
|
|
206
|
+
try {
|
|
207
|
+
const parsed = JSON.parse(options.tools);
|
|
208
|
+
if (Array.isArray(parsed) && parsed.length > 0) {
|
|
209
|
+
parsedTools = parsed;
|
|
210
|
+
console.log(`🔧 Parsed ${parsedTools.length} tools for function calling`);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
console.log(`⚠️ Tools field parsed but not a valid array`);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
console.log(`⚠️ Failed to parse tools JSON: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
164
220
|
const modelConfig = {
|
|
165
221
|
model: safeModel,
|
|
166
222
|
temperature: options.temperature || 0.7,
|
|
167
223
|
maxTokens: Math.min(options.maxTokens || 1000, (safeModelInfo === null || safeModelInfo === void 0 ? void 0 : safeModelInfo.capabilities.maxOutputTokens) || 4096),
|
|
168
224
|
topP: options.topP || 1,
|
|
169
225
|
maxRetries: options.enableRetry !== false ? options.maxRetries || 3 : 0,
|
|
226
|
+
...(parsedTools.length > 0 && {
|
|
227
|
+
tools: parsedTools,
|
|
228
|
+
tool_choice: options.tool_choice || "auto",
|
|
229
|
+
}),
|
|
170
230
|
configuration: {
|
|
171
231
|
baseURL: GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.BASE_URL,
|
|
172
232
|
apiKey: token,
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.38.
|
|
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",
|
|
3
|
+
"version": "3.38.21",
|
|
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",
|
|
7
7
|
"author": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.38.
|
|
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",
|
|
3
|
+
"version": "3.38.21",
|
|
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",
|
|
7
7
|
"author": {
|