n8n-nodes-github-copilot 3.38.19 → 3.38.20
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.
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.38.
|
|
3
|
+
"version": "3.38.20",
|
|
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",
|
|
@@ -12,11 +12,13 @@ exports.truncateToTokenLimit = truncateToTokenLimit;
|
|
|
12
12
|
const GitHubCopilotEndpoints_1 = require("./GitHubCopilotEndpoints");
|
|
13
13
|
const OAuthTokenManager_1 = require("./OAuthTokenManager");
|
|
14
14
|
const DynamicModelsManager_1 = require("./DynamicModelsManager");
|
|
15
|
+
const ModelVersionRequirements_1 = require("../models/ModelVersionRequirements");
|
|
15
16
|
async function makeGitHubCopilotRequest(context, endpoint, body, hasMedia = false, retryConfig) {
|
|
16
17
|
var _a, _b, _c;
|
|
17
18
|
const MAX_RETRIES = (_a = retryConfig === null || retryConfig === void 0 ? void 0 : retryConfig.maxRetries) !== null && _a !== void 0 ? _a : 3;
|
|
18
19
|
const BASE_DELAY = (_b = retryConfig === null || retryConfig === void 0 ? void 0 : retryConfig.baseDelay) !== null && _b !== void 0 ? _b : 500;
|
|
19
20
|
const RETRY_ON_403 = (_c = retryConfig === null || retryConfig === void 0 ? void 0 : retryConfig.retryOn403) !== null && _c !== void 0 ? _c : true;
|
|
21
|
+
const model = body.model;
|
|
20
22
|
let credentialType = "githubCopilotApi";
|
|
21
23
|
try {
|
|
22
24
|
credentialType = context.getNodeParameter("credentialType", 0, "githubCopilotApi");
|
|
@@ -60,11 +62,17 @@ async function makeGitHubCopilotRequest(context, endpoint, body, hasMedia = fals
|
|
|
60
62
|
if (!token.startsWith("gho_") && !token.startsWith("ghu_") && !token.startsWith("github_pat_")) {
|
|
61
63
|
console.warn(`⚠️ Unexpected token format: ${tokenPrefix}...${tokenSuffix}. Trying API call anyway.`);
|
|
62
64
|
}
|
|
65
|
+
const minVSCodeVersion = model ? (0, ModelVersionRequirements_1.getMinVSCodeVersion)(model) : "1.95.0";
|
|
66
|
+
const additionalHeaders = model ? (0, ModelVersionRequirements_1.getAdditionalHeaders)(model) : {};
|
|
67
|
+
if (model) {
|
|
68
|
+
console.log(`🔧 Model: ${model} requires VS Code version: ${minVSCodeVersion}`);
|
|
69
|
+
}
|
|
63
70
|
const headers = {
|
|
64
71
|
...GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.HEADERS.WITH_AUTH(token),
|
|
65
72
|
"User-Agent": "GitHub-Copilot/1.0 (n8n-node)",
|
|
66
|
-
"Editor-Version":
|
|
73
|
+
"Editor-Version": `vscode/${minVSCodeVersion}`,
|
|
67
74
|
"Editor-Plugin-Version": "copilot/1.0.0",
|
|
75
|
+
...additionalHeaders,
|
|
68
76
|
};
|
|
69
77
|
if (hasMedia) {
|
|
70
78
|
headers["Copilot-Vision-Request"] = "true";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.38.
|
|
3
|
+
"version": "3.38.20",
|
|
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",
|