@n8n/n8n-nodes-langchain 2.36.2 → 2.37.0

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.
Files changed (66) hide show
  1. package/dist/methods/defined.json +1 -0
  2. package/dist/methods/referenced.json +1 -0
  3. package/dist/node-definitions/.nodes-hash +1 -1
  4. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/index.ts +3 -1
  5. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v1.schema.js +2 -2
  6. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v1.ts +5 -1
  7. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v11.schema.js +2 -2
  8. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v11.ts +5 -1
  9. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v12.schema.js +2 -2
  10. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v12.ts +5 -1
  11. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v13.schema.js +2 -2
  12. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v13.ts +5 -1
  13. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v14.schema.js +2 -2
  14. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v14.ts +5 -1
  15. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v15.schema.js +2 -2
  16. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v15.ts +5 -1
  17. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v16.schema.js +25 -0
  18. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAnthropic/v16.ts +91 -0
  19. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.js +3 -1
  20. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.js.map +1 -1
  21. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js +4 -3
  22. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js.map +1 -1
  23. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.js +2 -2
  24. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.js.map +1 -1
  25. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.js +3 -1
  26. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.js.map +1 -1
  27. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/methods/listModels.js +7 -21
  28. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/methods/listModels.js.map +1 -1
  29. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +89 -7
  30. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  31. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +2 -1
  32. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
  33. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.d.ts +2 -1
  34. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +5 -35
  35. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -1
  36. package/dist/nodes/llms/LmChatAwsBedrock/methods/listModels.d.ts +1 -0
  37. package/dist/nodes/llms/LmChatAwsBedrock/methods/listModels.js +12 -19
  38. package/dist/nodes/llms/LmChatAwsBedrock/methods/listModels.js.map +1 -1
  39. package/dist/nodes/mcp/McpTrigger/McpServer.js +12 -20
  40. package/dist/nodes/mcp/McpTrigger/McpServer.js.map +1 -1
  41. package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js +1 -1
  42. package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js.map +1 -1
  43. package/dist/nodes/mcp/McpTrigger/__tests__/helpers/mock-langchain.d.ts +2 -0
  44. package/dist/nodes/mcp/McpTrigger/__tests__/helpers/mock-langchain.js +2 -2
  45. package/dist/nodes/mcp/McpTrigger/__tests__/helpers/mock-langchain.js.map +1 -1
  46. package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js +19 -16
  47. package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js.map +1 -1
  48. package/dist/nodes/vendors/GoogleGemini/actions/descriptions.js +1 -1
  49. package/dist/nodes/vendors/GoogleGemini/actions/descriptions.js.map +1 -1
  50. package/dist/nodes/vendors/OpenAi/methods/listSearch.js +3 -3
  51. package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -1
  52. package/dist/typecheck.tsbuildinfo +1 -1
  53. package/dist/types/nodes.json +3 -3
  54. package/dist/utils/aws/listBedrockInferenceProfiles.d.ts +13 -0
  55. package/dist/utils/aws/listBedrockInferenceProfiles.js +41 -0
  56. package/dist/utils/aws/listBedrockInferenceProfiles.js.map +1 -0
  57. package/dist/utils/aws/resolveBedrockApi.d.ts +6 -0
  58. package/dist/utils/aws/resolveBedrockApi.js +12 -0
  59. package/dist/utils/aws/resolveBedrockApi.js.map +1 -0
  60. package/dist/utils/output_parsers/langchainParserError.d.ts +4 -1
  61. package/dist/utils/output_parsers/langchainParserError.js +63 -12
  62. package/dist/utils/output_parsers/langchainParserError.js.map +1 -1
  63. package/package.json +12 -12
  64. package/dist/nodes/vendors/OpenAi/helpers/modelFiltering.d.ts +0 -1
  65. package/dist/nodes/vendors/OpenAi/helpers/modelFiltering.js +0 -21
  66. package/dist/nodes/vendors/OpenAi/helpers/modelFiltering.js.map +0 -1
@@ -0,0 +1,13 @@
1
+ import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
+ import type { BedrockApi } from './resolveBedrockApi';
3
+ export type BedrockInferenceProfileSummary = {
4
+ inferenceProfileId: string;
5
+ inferenceProfileName: string;
6
+ inferenceProfileArn: string;
7
+ description?: string;
8
+ models?: Array<{
9
+ modelArn?: string;
10
+ }>;
11
+ };
12
+ export declare function toProfileOption(profile: BedrockInferenceProfileSummary): INodePropertyOptions;
13
+ export declare function listBedrockInferenceProfiles(ctx: ILoadOptionsFunctions, { credentialsType, baseURL }: BedrockApi): Promise<BedrockInferenceProfileSummary[]>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toProfileOption = toProfileOption;
4
+ exports.listBedrockInferenceProfiles = listBedrockInferenceProfiles;
5
+ function toProfileOption(profile) {
6
+ return {
7
+ name: profile.inferenceProfileName,
8
+ value: profile.inferenceProfileId,
9
+ description: profile.description ?? profile.inferenceProfileArn,
10
+ };
11
+ }
12
+ async function listBedrockInferenceProfiles(ctx, { credentialsType, baseURL }) {
13
+ const request = async (url) => await ctx.helpers.httpRequestWithAuthentication.call(ctx, credentialsType, {
14
+ method: 'GET',
15
+ baseURL,
16
+ url,
17
+ json: true,
18
+ });
19
+ const [systemDefined, application] = await Promise.allSettled([
20
+ request('/inference-profiles?maxResults=1000'),
21
+ request('/inference-profiles?maxResults=1000&type=APPLICATION'),
22
+ ]);
23
+ const results = [
24
+ ['SYSTEM_DEFINED', systemDefined],
25
+ ['APPLICATION', application],
26
+ ];
27
+ const profiles = results.flatMap(([profileType, result]) => {
28
+ if (result.status === 'fulfilled')
29
+ return result.value.inferenceProfileSummaries ?? [];
30
+ ctx.logger.warn('Bedrock model listing: inference-profiles request failed', {
31
+ error: result.reason,
32
+ profileType,
33
+ });
34
+ return [];
35
+ });
36
+ if (systemDefined.status === 'rejected' && application.status === 'rejected') {
37
+ throw systemDefined.reason;
38
+ }
39
+ return [...new Map(profiles.map((profile) => [profile.inferenceProfileArn, profile])).values()];
40
+ }
41
+ //# sourceMappingURL=listBedrockInferenceProfiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listBedrockInferenceProfiles.js","sourceRoot":"","sources":["../../../utils/aws/listB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AAM,KAAK,UAAU,EAAE,CAAC;QAC9E,MAAM,aAAa,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AACjG,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ILoadOptionsFunctions } from 'n8n-workflow';
2
+ export type BedrockApi = {
3
+ credentialsType: 'aws' | 'awsAssumeRole';
4
+ baseURL: string;
5
+ };
6
+ export declare function resolveBedrockApi(ctx: ILoadOptionsFunctions): Promise<BedrockApi>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveBedrockApi = resolveBedrockApi;
4
+ const aws_credentials_1 = require("n8n-nodes-base/aws-credentials");
5
+ async function resolveBedrockApi(ctx) {
6
+ const authentication = ctx.getNodeParameter('authentication', 'iam');
7
+ const credentialsType = authentication === 'assumeRole' ? 'awsAssumeRole' : 'aws';
8
+ const { region } = await ctx.getCredentials(credentialsType);
9
+ (0, aws_credentials_1.assertSupportedAwsRegion)(region);
10
+ return { credentialsType, baseURL: `https://bedrock.${region}.${(0, aws_credentials_1.getAwsDomain)(region)}` };
11
+ }
12
+ //# sourceMappingURL=resolveBedrockApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveBedrockApi.js","sourceRoot":"","sources":["../../../utils/aws/resolveBedrockApi.ts"],"names":[],"mappings":";;;AAAA,oEAAwF;AAajF,KAAK,4BAA4B,GAA0B;IACjE,MAAM,cAAc,GAAG,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,KAAK,CAAyB,CAAC;IAC7F,MAAM,eAAe,GAAG,cAAc,KAAK,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC;IAClF,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IAE7D,IAAA,0CAAwB,EAAC,MAAM,CAAC,CAAC;IAIjC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,mBAAmB,MAAM,IAAI,IAAA,8BAAY,EAAC,MAAM,CAAC,EAAE,EAAE,CAAC;AAC1F,CAAC"}
@@ -2,4 +2,7 @@ import type { INode } from 'n8n-workflow';
2
2
  export declare const MODEL_OUTPUT_PARSER_ERROR_MESSAGE = "Model output doesn't fit required format";
3
3
  export declare const MODEL_OUTPUT_PARSER_ERROR_DESCRIPTION = "To continue the execution when this happens, change the 'On Error' parameter in the root node's settings";
4
4
  export declare function isLangChainParserError(error: unknown): boolean;
5
- export declare function wrapLangChainParserError(error: unknown, node: INode, itemIndex?: number): Error;
5
+ export declare function getFailureType(error: unknown): string;
6
+ export declare function wrapLangChainParserError(error: unknown, node: INode, itemIndex?: number, options?: {
7
+ enrichNonParserErrors?: boolean;
8
+ }): Error;
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MODEL_OUTPUT_PARSER_ERROR_DESCRIPTION = exports.MODEL_OUTPUT_PARSER_ERROR_MESSAGE = void 0;
4
4
  exports.isLangChainParserError = isLangChainParserError;
5
+ exports.getFailureType = getFailureType;
5
6
  exports.wrapLangChainParserError = wrapLangChainParserError;
6
7
  const output_parsers_1 = require("@langchain/core/output_parsers");
7
8
  const n8n_workflow_1 = require("n8n-workflow");
8
9
  exports.MODEL_OUTPUT_PARSER_ERROR_MESSAGE = "Model output doesn't fit required format";
9
10
  exports.MODEL_OUTPUT_PARSER_ERROR_DESCRIPTION = "To continue the execution when this happens, change the 'On Error' parameter in the root node's settings";
10
11
  const LANGCHAIN_PARSER_ERROR_MESSAGES = ['Failed to parse. Text:', 'Unable to parse JSON response'];
12
+ const AGENT_FAILURE_FALLBACK_MESSAGE = 'Agent execution failed';
11
13
  function getErrorProperty(error, property) {
12
14
  if (error instanceof Error)
13
15
  return error[property];
@@ -16,11 +18,13 @@ function getErrorProperty(error, property) {
16
18
  const value = error[property];
17
19
  return typeof value === 'string' ? value : undefined;
18
20
  }
19
- function getErrorName(error) {
20
- const errorName = getErrorProperty(error, 'name');
21
- if (errorName)
22
- return errorName;
23
- return error instanceof Error ? error.constructor.name : undefined;
21
+ function resolveErrorName(error) {
22
+ if (error instanceof Error) {
23
+ if (error.name && error.name !== 'Error')
24
+ return error.name;
25
+ return error.constructor.name || undefined;
26
+ }
27
+ return getErrorProperty(error, 'name');
24
28
  }
25
29
  function hasLangChainParserMessage(error) {
26
30
  const errorMessage = getErrorProperty(error, 'message');
@@ -30,20 +34,67 @@ function hasLangChainParserMessage(error) {
30
34
  }
31
35
  function isLangChainParserError(error) {
32
36
  return (error instanceof output_parsers_1.OutputParserException ||
33
- getErrorName(error) === 'OutputParserException' ||
37
+ resolveErrorName(error) === 'OutputParserException' ||
34
38
  hasLangChainParserMessage(error));
35
39
  }
36
- function wrapLangChainParserError(error, node, itemIndex) {
37
- if (!isLangChainParserError(error)) {
38
- return error instanceof Error
39
- ? error
40
- : new Error(getErrorProperty(error, 'message') ?? String(error));
40
+ function getFailureType(error) {
41
+ let current = error;
42
+ const seen = new Set();
43
+ while (current instanceof Error && current.cause instanceof Error) {
44
+ seen.add(current);
45
+ if (seen.has(current.cause))
46
+ break;
47
+ current = current.cause;
41
48
  }
49
+ return resolveErrorName(current) ?? (current instanceof Error ? 'Error' : typeof current);
50
+ }
51
+ function isUselessMessage(message, className) {
52
+ if (!message)
53
+ return true;
54
+ if (className && message === className)
55
+ return true;
56
+ return message === 'Error';
57
+ }
58
+ function wrapAsNodeOperationError(error, node, itemIndex) {
59
+ const className = resolveErrorName(error);
60
+ const messageProperty = getErrorProperty(error, 'message');
61
+ const candidateMessage = messageProperty ?? (typeof error === 'string' ? error : undefined);
62
+ const message = isUselessMessage(candidateMessage, className)
63
+ ? AGENT_FAILURE_FALLBACK_MESSAGE
64
+ : candidateMessage;
42
65
  const options = {
66
+ message,
67
+ description: className ? `Original error: ${className}` : undefined,
68
+ level: 'error',
69
+ ...(itemIndex !== undefined ? { itemIndex } : {}),
70
+ };
71
+ let cause;
72
+ if (error instanceof Error) {
73
+ cause = error;
74
+ }
75
+ else {
76
+ cause = new Error(message);
77
+ if (className)
78
+ cause.name = className;
79
+ }
80
+ return new n8n_workflow_1.NodeOperationError(node, cause, options);
81
+ }
82
+ function wrapLangChainParserError(error, node, itemIndex, options) {
83
+ if (!isLangChainParserError(error)) {
84
+ if (!options?.enrichNonParserErrors) {
85
+ return error instanceof Error
86
+ ? error
87
+ : new Error(getErrorProperty(error, 'message') ?? String(error));
88
+ }
89
+ if (error instanceof n8n_workflow_1.BaseError)
90
+ return error;
91
+ return wrapAsNodeOperationError(error, node, itemIndex);
92
+ }
93
+ const parserOptions = {
43
94
  description: exports.MODEL_OUTPUT_PARSER_ERROR_DESCRIPTION,
44
95
  ...(itemIndex !== undefined ? { itemIndex } : {}),
45
96
  };
46
- const nodeError = new n8n_workflow_1.NodeOperationError(node, exports.MODEL_OUTPUT_PARSER_ERROR_MESSAGE, options);
97
+ const nodeError = new n8n_workflow_1.NodeOperationError(node, exports.MODEL_OUTPUT_PARSER_ERROR_MESSAGE, parserOptions);
47
98
  nodeError.context.outputParserFailReason = 'Model output does not match the expected schema';
48
99
  return nodeError;
49
100
  }
@@ -1 +1 @@
1
- {"version":3,"file":"langchainParserError.js","sourceRoot":"","sources":["../../../utils/output_parsers/langchainParserError.ts"],"names":[],"mappings":";;;;;AAAA,mEAAuE;AAEvE,+CAAkD;AAErC,QAAA,iCAAiC,GAAG,0CAA0C,CAAC;AAC/E,QAAA,qCAAqC,GACjD,0GAA0G,CAAC;AAE5G,MAAM,+BAA+B,GAAG,CAAC,wBAAwB,EAAE,+BAA+B,CAAC,CAAC;AAEpG,SAAS,gBAAgB,CAAC,KAAc,EAAE,QAA4B;IACrE,IAAI,KAA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C;AAED,kCACC,KAAc,EACd,IAAW,EACX,SAAkB,EAClB,OAA6C;IAE7C,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,EAAE,CAAC;QAGpC,IAAI,CAAC,OAAO,EAAE,qBAAqB,EAAE,CAAC;YACrC,OAAO,KAAK,YAAY,KAAK;gBAC5B,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,CAAC;QAMD,IAAI,KAAK,YAAY,wBAAS;YAAE,OAAO,KAAK,CAAC;QAC7C,OAAO,wBAAwB,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,aAAa,GAAG;QACrB,WAAW,EAAE,QAAA,qCAAqC;QAClD,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjD,CAAC;IAEF,MAAM,SAAS,GAAG,IAAI,iCAAkB,CAAC,IAAI,EAAE,QAAA,iCAAiC,EAAE,aAAa,CAAC,CAAC;IACjG,SAAS,CAAC,OAAO,CAAC,sBAAsB,GAAG,iDAAiD,CAAC;IAE7F,OAAO,SAAS,CAAC;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n8n/n8n-nodes-langchain",
3
- "version": "2.36.2",
3
+ "version": "2.37.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -216,7 +216,7 @@
216
216
  "typescript": "npm:@typescript/typescript6@6.0.2",
217
217
  "vitest": "^4.1.9",
218
218
  "vitest-mock-extended": "^3.1.0",
219
- "@n8n/eslint-plugin-community-nodes": "0.29.0",
219
+ "@n8n/eslint-plugin-community-nodes": "0.30.0",
220
220
  "@n8n/vitest-config": "1.21.0"
221
221
  },
222
222
  "dependencies": {
@@ -231,12 +231,12 @@
231
231
  "@google/genai": "1.19.0",
232
232
  "@google/generative-ai": "0.24.0",
233
233
  "@huggingface/inference": "4.0.5",
234
- "@langchain/anthropic": "1.3.27",
234
+ "@langchain/anthropic": "1.5.6",
235
235
  "@langchain/aws": "1.0.3",
236
236
  "@langchain/classic": "1.0.27",
237
237
  "@langchain/cohere": "1.0.1",
238
238
  "@langchain/community": "1.1.27",
239
- "@langchain/core": "1.2.0",
239
+ "@langchain/core": "1.2.8",
240
240
  "@langchain/google-common": "2.1.24",
241
241
  "@langchain/google-genai": "2.1.24",
242
242
  "@langchain/google-vertexai": "2.1.24",
@@ -268,7 +268,7 @@
268
268
  "@qdrant/js-client-rest": "^1.16.2",
269
269
  "@smithy/node-http-handler": "4.5.0",
270
270
  "@smithy/types": "4.13.1",
271
- "@supabase/supabase-js": "2.50.0",
271
+ "@supabase/supabase-js": "2.112.3",
272
272
  "@xata.io/client": "0.28.4",
273
273
  "@zilliz/milvus2-sdk-node": "^2.5.7",
274
274
  "axios": "1.18.0",
@@ -304,17 +304,17 @@
304
304
  "weaviate-client": "3.9.0",
305
305
  "zod": "3.25.76",
306
306
  "zod-to-json-schema": "3.23.3",
307
- "@n8n/ai-utilities": "0.29.2",
308
- "@n8n/client-oauth2": "1.18.2",
309
- "@n8n/config": "2.34.0",
307
+ "@n8n/ai-utilities": "0.30.0",
308
+ "@n8n/client-oauth2": "1.19.0",
310
309
  "@n8n/di": "0.16.0",
311
310
  "@n8n/errors": "0.13.0",
311
+ "@n8n/config": "2.35.0",
312
312
  "@n8n/json-schema-to-zod": "1.15.0",
313
+ "@n8n/utils": "1.45.0",
314
+ "n8n-core": "2.37.0",
313
315
  "@n8n/typescript-config": "1.10.0",
314
- "@n8n/utils": "1.44.0",
315
- "n8n-core": "2.36.3",
316
- "n8n-nodes-base": "2.36.2",
317
- "n8n-workflow": "2.36.2"
316
+ "n8n-nodes-base": "2.37.0",
317
+ "n8n-workflow": "2.37.0"
318
318
  },
319
319
  "license": "SEE LICENSE IN LICENSE.md",
320
320
  "homepage": "https://n8n.io",
@@ -1 +0,0 @@
1
- export declare function shouldIncludeModel(modelId: string, isCustomAPI: boolean): boolean;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shouldIncludeModel = shouldIncludeModel;
4
- function shouldIncludeModel(modelId, isCustomAPI) {
5
- if (isCustomAPI) {
6
- return true;
7
- }
8
- return !(modelId.startsWith('babbage') ||
9
- modelId.startsWith('davinci') ||
10
- modelId.startsWith('computer-use') ||
11
- modelId.startsWith('dall-e') ||
12
- modelId.startsWith('text-embedding') ||
13
- modelId.startsWith('tts') ||
14
- modelId.includes('-tts') ||
15
- modelId.startsWith('whisper') ||
16
- modelId.startsWith('omni-moderation') ||
17
- modelId.startsWith('sora') ||
18
- modelId.includes('-realtime') ||
19
- (modelId.startsWith('gpt-') && modelId.includes('instruct')));
20
- }
21
- //# sourceMappingURL=modelFiltering.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modelFiltering.js","sourceRoot":"","sources":["../../../../../nodes/vendors/OpenAi/helpers/modelFiltering.ts"],"names":[],"mappings":";;;AAQA,4BAAmC,OAAe,EAAE,WAAoB;IAEvE,IAAI,WAAW,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACb,CAAC;IAGD,OAAO,CAAC,CACP,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAC7B,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAC7B,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;QAClC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC5B,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACpC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;QACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QACxB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAC7B,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;QACrC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC7B,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAC5D,CAAC;AACH,CAAC"}