n8n-nodes-github-copilot 3.38.10 → 3.38.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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.nodeProperties = void 0;
4
- const GitHubCopilotModels_1 = require("../../shared/models/GitHubCopilotModels");
4
+ const ModelProperties_1 = require("../../shared/properties/ModelProperties");
5
5
  exports.nodeProperties = [
6
6
  {
7
7
  displayName: "Operation",
@@ -17,69 +17,7 @@ exports.nodeProperties = [
17
17
  ],
18
18
  default: "chat",
19
19
  },
20
- {
21
- displayName: "Model Source",
22
- name: "modelSource",
23
- type: "options",
24
- options: [
25
- {
26
- name: "From List (Auto-Discovered)",
27
- value: "fromList",
28
- description: "Select from available models based on your subscription",
29
- },
30
- {
31
- name: "Custom (Manual Entry)",
32
- value: "custom",
33
- description: "Enter model name manually (use at your own risk)",
34
- },
35
- ],
36
- default: "fromList",
37
- description: "Choose how to specify the model",
38
- },
39
- {
40
- displayName: "Model",
41
- name: "model",
42
- type: "options",
43
- typeOptions: {
44
- loadOptionsMethod: "getAvailableModels",
45
- },
46
- default: GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL,
47
- description: "Select the GitHub Copilot model to use (loaded dynamically based on your subscription)",
48
- displayOptions: {
49
- show: {
50
- modelSource: ["fromList"],
51
- },
52
- },
53
- },
54
- {
55
- displayName: "Custom Model Name",
56
- name: "customModel",
57
- type: "string",
58
- default: "",
59
- placeholder: "gpt-4o, claude-3.5-sonnet, grok-code-fast-1, etc.",
60
- description: "Enter the model name manually. Use at your own risk if the model is not available in your subscription.",
61
- hint: "Examples: gpt-4o, gpt-4o-mini, claude-3.5-sonnet, gemini-2.0-flash-exp, grok-code-fast-1",
62
- displayOptions: {
63
- show: {
64
- modelSource: ["custom"],
65
- },
66
- },
67
- },
68
- {
69
- displayName: "Custom Model Name",
70
- name: "customModel",
71
- type: "string",
72
- default: "",
73
- placeholder: "gpt-4o, claude-3.5-sonnet, grok-code-fast-1, etc.",
74
- description: "Enter the model name manually. This is useful for new/beta models not yet in the list.",
75
- hint: "Examples: gpt-4o, gpt-4o-mini, claude-3.5-sonnet, gemini-2.0-flash-exp, grok-code-fast-1",
76
- displayOptions: {
77
- show: {
78
- modelSource: ["fromList"],
79
- model: ["__manual__"],
80
- },
81
- },
82
- },
20
+ ...ModelProperties_1.CHAT_MODEL_PROPERTIES,
83
21
  {
84
22
  displayName: "Message",
85
23
  name: "message",
@@ -5,6 +5,7 @@ const openai_1 = require("@langchain/openai");
5
5
  const GitHubCopilotModels_1 = require("../../shared/models/GitHubCopilotModels");
6
6
  const GitHubCopilotEndpoints_1 = require("../../shared/utils/GitHubCopilotEndpoints");
7
7
  const DynamicModelLoader_1 = require("../../shared/models/DynamicModelLoader");
8
+ const ModelProperties_1 = require("../../shared/properties/ModelProperties");
8
9
  class GitHubCopilotChatModel {
9
10
  constructor() {
10
11
  this.description = {
@@ -41,16 +42,7 @@ class GitHubCopilotChatModel {
41
42
  },
42
43
  ],
43
44
  properties: [
44
- {
45
- displayName: "Model",
46
- name: "model",
47
- type: "options",
48
- typeOptions: {
49
- loadOptionsMethod: "getAvailableModels",
50
- },
51
- default: GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL,
52
- description: "Select the GitHub Copilot model to use (loaded dynamically based on your subscription)",
53
- },
45
+ ...ModelProperties_1.CHAT_MODEL_PROPERTIES,
54
46
  {
55
47
  displayName: "Options",
56
48
  name: "options",
@@ -134,7 +126,18 @@ class GitHubCopilotChatModel {
134
126
  };
135
127
  }
136
128
  async supplyData(itemIndex) {
137
- const model = this.getNodeParameter("model", itemIndex);
129
+ let model = this.getNodeParameter("model", itemIndex);
130
+ if (model === "__manual__") {
131
+ const customModel = this.getNodeParameter("customModel", itemIndex);
132
+ if (!customModel || customModel.trim() === "") {
133
+ throw new Error("Custom model name is required when selecting '✏️ Enter Custom Model Name'");
134
+ }
135
+ model = customModel;
136
+ console.log(`✏️ Using manually entered model: ${model}`);
137
+ }
138
+ else {
139
+ console.log(`✅ Using model from list: ${model}`);
140
+ }
138
141
  const options = this.getNodeParameter("options", itemIndex, {});
139
142
  const modelInfo = GitHubCopilotModels_1.GitHubCopilotModelsManager.getModelByValue(model);
140
143
  const credentials = (await this.getCredentials("githubCopilotApi"));
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.nodeProperties = void 0;
4
- const GitHubCopilotModels_1 = require("../../shared/models/GitHubCopilotModels");
4
+ const ModelProperties_1 = require("../../shared/properties/ModelProperties");
5
5
  exports.nodeProperties = [
6
6
  {
7
7
  displayName: "Operation",
@@ -17,69 +17,7 @@ exports.nodeProperties = [
17
17
  ],
18
18
  default: "chat",
19
19
  },
20
- {
21
- displayName: "Model Source",
22
- name: "modelSource",
23
- type: "options",
24
- options: [
25
- {
26
- name: "From List (Auto-Discovered)",
27
- value: "fromList",
28
- description: "Select from available models based on your subscription",
29
- },
30
- {
31
- name: "Custom (Manual Entry)",
32
- value: "custom",
33
- description: "Enter model name manually (use at your own risk)",
34
- },
35
- ],
36
- default: "fromList",
37
- description: "Choose how to specify the model",
38
- },
39
- {
40
- displayName: "Model",
41
- name: "model",
42
- type: "options",
43
- typeOptions: {
44
- loadOptionsMethod: "getAvailableModels",
45
- },
46
- default: GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL,
47
- description: "Select the GitHub Copilot model to use (loaded dynamically based on your subscription)",
48
- displayOptions: {
49
- show: {
50
- modelSource: ["fromList"],
51
- },
52
- },
53
- },
54
- {
55
- displayName: "Custom Model Name",
56
- name: "customModel",
57
- type: "string",
58
- default: "",
59
- placeholder: "gpt-4o, claude-3.5-sonnet, grok-code-fast-1, etc.",
60
- description: "Enter the model name manually. Use at your own risk if the model is not available in your subscription.",
61
- hint: "Examples: gpt-4o, gpt-4o-mini, claude-3.5-sonnet, gemini-2.0-flash-exp, grok-code-fast-1",
62
- displayOptions: {
63
- show: {
64
- modelSource: ["custom"],
65
- },
66
- },
67
- },
68
- {
69
- displayName: "Custom Model Name",
70
- name: "customModel",
71
- type: "string",
72
- default: "",
73
- placeholder: "gpt-4o, claude-3.5-sonnet, grok-code-fast-1, etc.",
74
- description: "Enter the model name manually. This is useful for new/beta models not yet in the list.",
75
- hint: "Examples: gpt-4o, gpt-4o-mini, claude-3.5-sonnet, gemini-2.0-flash-exp, grok-code-fast-1",
76
- displayOptions: {
77
- show: {
78
- modelSource: ["fromList"],
79
- model: ["__manual__"],
80
- },
81
- },
82
- },
20
+ ...ModelProperties_1.CHAT_MODEL_PROPERTIES,
83
21
  {
84
22
  displayName: "Messages Input Mode",
85
23
  name: "messagesInputMode",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.38.10",
3
+ "version": "3.38.12",
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",
@@ -0,0 +1,4 @@
1
+ import { INodeProperties } from "n8n-workflow";
2
+ export declare const CHAT_MODEL_PROPERTY: INodeProperties;
3
+ export declare const MANUAL_MODEL_PROPERTY: INodeProperties;
4
+ export declare const CHAT_MODEL_PROPERTIES: INodeProperties[];
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CHAT_MODEL_PROPERTIES = exports.MANUAL_MODEL_PROPERTY = exports.CHAT_MODEL_PROPERTY = void 0;
4
+ const GitHubCopilotModels_1 = require("../models/GitHubCopilotModels");
5
+ exports.CHAT_MODEL_PROPERTY = {
6
+ displayName: "Model",
7
+ name: "model",
8
+ type: "options",
9
+ typeOptions: {
10
+ loadOptionsMethod: "getAvailableModels",
11
+ },
12
+ default: GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL,
13
+ description: "Select the GitHub Copilot model to use (loaded dynamically based on your subscription)",
14
+ };
15
+ exports.MANUAL_MODEL_PROPERTY = {
16
+ displayName: "Custom Model Name",
17
+ name: "customModel",
18
+ type: "string",
19
+ default: "",
20
+ placeholder: "gpt-4o, claude-3.5-sonnet, grok-code-fast-1, etc.",
21
+ description: "Enter the model name manually. This is useful for new/beta models not yet in the list.",
22
+ hint: "Examples: gpt-4o, gpt-4o-mini, claude-3.5-sonnet, gemini-2.0-flash-exp, grok-code-fast-1",
23
+ displayOptions: {
24
+ show: {
25
+ model: ["__manual__"],
26
+ },
27
+ },
28
+ };
29
+ exports.CHAT_MODEL_PROPERTIES = [
30
+ exports.CHAT_MODEL_PROPERTY,
31
+ exports.MANUAL_MODEL_PROPERTY,
32
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.38.10",
3
+ "version": "3.38.12",
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",