@cascadeflow/n8n-nodes-cascadeflow 0.4.8 → 0.4.10-alpha.1

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.
@@ -0,0 +1,6 @@
1
+ import type { INodeType, INodeTypeDescription, ISupplyDataFunctions, SupplyData } from 'n8n-workflow';
2
+ export declare class LmChatCascadeFlow implements INodeType {
3
+ description: INodeTypeDescription;
4
+ supplyData(this: ISupplyDataFunctions): Promise<SupplyData>;
5
+ }
6
+ //# sourceMappingURL=LmChatCascadeFlow.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LmChatCascadeFlow.node.d.ts","sourceRoot":"","sources":["../../../nodes/LmChatCascadeFlow/LmChatCascadeFlow.node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACX,MAAM,cAAc,CAAC;AA4EtB,qBAAa,iBAAkB,YAAW,SAAS;IACjD,WAAW,EAAE,oBAAoB,CA6H/B;IAEI,UAAU,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAyElE"}
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LmChatCascadeFlow = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const chat_models_1 = require("@langchain/core/language_models/chat_models");
6
+ const openai_1 = require("@langchain/openai");
7
+ const anthropic_1 = require("@langchain/anthropic");
8
+ /**
9
+ * Custom CascadeChatModel that wraps two models (drafter and verifier)
10
+ * and implements cascading logic
11
+ */
12
+ class CascadeChatModel extends chat_models_1.BaseChatModel {
13
+ constructor(drafterModel, verifierModel, qualityThreshold = 0.7) {
14
+ super({});
15
+ this.drafterModel = drafterModel;
16
+ this.verifierModel = verifierModel;
17
+ this.qualityThreshold = qualityThreshold;
18
+ }
19
+ _llmType() {
20
+ return 'cascade';
21
+ }
22
+ async _generate(messages, options, runManager) {
23
+ try {
24
+ // Step 1: Try the drafter model
25
+ console.log('🎯 CascadeFlow: Trying drafter model...');
26
+ const drafterStartTime = Date.now();
27
+ const drafterResult = await this.drafterModel._generate(messages, options, runManager);
28
+ const drafterLatency = Date.now() - drafterStartTime;
29
+ const drafterMessage = drafterResult.generations[0].message;
30
+ // Step 2: Simple quality check (can be enhanced)
31
+ // For now, we'll just check if the response is substantive
32
+ const responseText = drafterMessage.content.toString();
33
+ const qualityScore = Math.min(responseText.length / 100, 1.0); // Simple heuristic
34
+ // Step 3: If quality is sufficient, return drafter response
35
+ if (qualityScore >= this.qualityThreshold) {
36
+ console.log(`✅ CascadeFlow: Drafter accepted (quality: ${qualityScore.toFixed(2)}, latency: ${drafterLatency}ms)`);
37
+ return drafterResult;
38
+ }
39
+ // Step 4: Otherwise, escalate to verifier
40
+ console.log(`⚠️ CascadeFlow: Escalating to verifier (quality: ${qualityScore.toFixed(2)} < threshold: ${this.qualityThreshold})`);
41
+ const verifierStartTime = Date.now();
42
+ const verifierResult = await this.verifierModel._generate(messages, options, runManager);
43
+ const verifierLatency = Date.now() - verifierStartTime;
44
+ console.log(`✅ CascadeFlow: Verifier completed (latency: ${verifierLatency}ms, total: ${drafterLatency + verifierLatency}ms)`);
45
+ return verifierResult;
46
+ }
47
+ catch (error) {
48
+ // Fallback to verifier on error
49
+ console.log(`❌ CascadeFlow: Drafter failed, falling back to verifier. Error: ${error instanceof Error ? error.message : String(error)}`);
50
+ const verifierResult = await this.verifierModel._generate(messages, options, runManager);
51
+ console.log('✅ CascadeFlow: Verifier fallback completed');
52
+ return verifierResult;
53
+ }
54
+ }
55
+ }
56
+ class LmChatCascadeFlow {
57
+ constructor() {
58
+ this.description = {
59
+ displayName: 'CascadeFlow',
60
+ name: 'lmChatCascadeFlow',
61
+ icon: 'file:cascadeflow.svg',
62
+ group: ['transform'],
63
+ version: 1,
64
+ description: 'Smart AI model cascading with 40-85% cost savings. Configure two models (drafter and verifier) and intelligently cascade between them.',
65
+ defaults: {
66
+ name: 'CascadeFlow',
67
+ },
68
+ codex: {
69
+ categories: ['AI'],
70
+ subcategories: {
71
+ AI: ['Language Models', 'Chat Models'],
72
+ },
73
+ resources: {
74
+ primaryDocumentation: [
75
+ {
76
+ url: 'https://github.com/lemony-ai/cascadeflow',
77
+ },
78
+ ],
79
+ },
80
+ },
81
+ // Sub-node: no inputs
82
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
83
+ inputs: [],
84
+ // Outputs an AI model that can be connected to Agent
85
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
86
+ outputs: ['ai_languageModel'],
87
+ outputNames: ['Model'],
88
+ credentials: [
89
+ {
90
+ name: 'cascadeFlowApi',
91
+ required: true,
92
+ },
93
+ ],
94
+ properties: [
95
+ // Drafter Model Configuration
96
+ {
97
+ displayName: 'Drafter Model',
98
+ name: 'drafterModel',
99
+ type: 'string',
100
+ default: 'gpt-4o-mini',
101
+ required: true,
102
+ description: 'The cheaper model to try first (e.g., gpt-4o-mini, claude-3-5-haiku-20241022)',
103
+ placeholder: 'gpt-4o-mini',
104
+ },
105
+ {
106
+ displayName: 'Drafter Provider',
107
+ name: 'drafterProvider',
108
+ type: 'options',
109
+ default: 'openai',
110
+ required: true,
111
+ options: [
112
+ {
113
+ name: 'OpenAI',
114
+ value: 'openai',
115
+ },
116
+ {
117
+ name: 'Anthropic',
118
+ value: 'anthropic',
119
+ },
120
+ {
121
+ name: 'Groq',
122
+ value: 'groq',
123
+ },
124
+ {
125
+ name: 'Together AI',
126
+ value: 'together',
127
+ },
128
+ ],
129
+ description: 'Provider for the drafter model',
130
+ },
131
+ // Verifier Model Configuration
132
+ {
133
+ displayName: 'Verifier Model',
134
+ name: 'verifierModel',
135
+ type: 'string',
136
+ default: 'gpt-4o',
137
+ required: true,
138
+ description: 'The quality model to escalate to if needed (e.g., gpt-4o, claude-3-5-sonnet-20241022)',
139
+ placeholder: 'gpt-4o',
140
+ },
141
+ {
142
+ displayName: 'Verifier Provider',
143
+ name: 'verifierProvider',
144
+ type: 'options',
145
+ default: 'openai',
146
+ required: true,
147
+ options: [
148
+ {
149
+ name: 'OpenAI',
150
+ value: 'openai',
151
+ },
152
+ {
153
+ name: 'Anthropic',
154
+ value: 'anthropic',
155
+ },
156
+ {
157
+ name: 'Groq',
158
+ value: 'groq',
159
+ },
160
+ {
161
+ name: 'Together AI',
162
+ value: 'together',
163
+ },
164
+ ],
165
+ description: 'Provider for the verifier model',
166
+ },
167
+ // Quality Threshold
168
+ {
169
+ displayName: 'Quality Threshold',
170
+ name: 'qualityThreshold',
171
+ type: 'number',
172
+ default: 0.7,
173
+ typeOptions: {
174
+ minValue: 0,
175
+ maxValue: 1,
176
+ numberPrecision: 2,
177
+ },
178
+ description: 'Minimum quality score (0-1) to accept drafter response. Lower = more cost savings, higher = better quality.',
179
+ },
180
+ ],
181
+ };
182
+ }
183
+ async supplyData() {
184
+ // Get credentials
185
+ const credentials = await this.getCredentials('cascadeFlowApi');
186
+ // Get parameters
187
+ const drafterModelName = this.getNodeParameter('drafterModel', 0);
188
+ const drafterProvider = this.getNodeParameter('drafterProvider', 0);
189
+ const verifierModelName = this.getNodeParameter('verifierModel', 0);
190
+ const verifierProvider = this.getNodeParameter('verifierProvider', 0);
191
+ const qualityThreshold = this.getNodeParameter('qualityThreshold', 0, 0.7);
192
+ // Helper to create model based on provider
193
+ const createModel = (provider, modelName) => {
194
+ const keyMap = {
195
+ openai: 'openaiApiKey',
196
+ anthropic: 'anthropicApiKey',
197
+ groq: 'groqApiKey',
198
+ together: 'togetherApiKey',
199
+ };
200
+ const keyName = keyMap[provider];
201
+ const apiKey = credentials[keyName];
202
+ if (!apiKey) {
203
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `API key for ${provider} not found in credentials. Please configure the CascadeFlow API credentials.`);
204
+ }
205
+ switch (provider) {
206
+ case 'openai':
207
+ case 'groq':
208
+ case 'together':
209
+ return new openai_1.ChatOpenAI({
210
+ modelName,
211
+ apiKey,
212
+ configuration: provider === 'groq' ? {
213
+ baseURL: 'https://api.groq.com/openai/v1',
214
+ } : provider === 'together' ? {
215
+ baseURL: 'https://api.together.xyz/v1',
216
+ } : undefined,
217
+ });
218
+ case 'anthropic':
219
+ return new anthropic_1.ChatAnthropic({
220
+ modelName,
221
+ apiKey,
222
+ });
223
+ default:
224
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported provider: ${provider}`);
225
+ }
226
+ };
227
+ // Create drafter and verifier models
228
+ const drafterModel = createModel(drafterProvider, drafterModelName);
229
+ const verifierModel = createModel(verifierProvider, verifierModelName);
230
+ // Create and return the cascade model
231
+ const cascadeModel = new CascadeChatModel(drafterModel, verifierModel, qualityThreshold);
232
+ return {
233
+ response: cascadeModel,
234
+ };
235
+ }
236
+ }
237
+ exports.LmChatCascadeFlow = LmChatCascadeFlow;
238
+ //# sourceMappingURL=LmChatCascadeFlow.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LmChatCascadeFlow.node.js","sourceRoot":"","sources":["../../../nodes/LmChatCascadeFlow/LmChatCascadeFlow.node.ts"],"names":[],"mappings":";;;AAOA,+CAAsE;AAEtE,6EAA4E;AAI5E,8CAA+C;AAC/C,oDAAqD;AAErD;;;GAGG;AACH,MAAM,gBAAiB,SAAQ,2BAAa;IAK1C,YACE,YAA2B,EAC3B,aAA4B,EAC5B,mBAA2B,GAAG;QAE9B,KAAK,CAAC,EAAE,CAAC,CAAC;QACV,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;IAED,QAAQ;QACN,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,SAAS,CACb,QAAuB,EACvB,OAAkC,EAClC,UAAqC;QAErC,IAAI,CAAC;YACH,gCAAgC;YAChC,OAAO,CAA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defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: #667eea;
7
+ }
8
+ </style>
9
+ </defs>
10
+ <path class="cls-1" d="M38.19,54.36c-4.15-4.15-4.15-10.87,0-15.02,4.15-4.15,10.87-4.15,15.02,0,4.15,4.15,4.15,10.87,0,15.02s-10.87,4.15-15.02,0Z"/>
11
+ <path class="cls-1" d="M63.4,91.76H28.7c-7.93,0-14.35-6.42-14.35-14.35h49.05v14.35Z"/>
12
+ <path class="cls-1" d="M14.35,77.41c-7.93,0-14.35-6.42-14.35-14.35V29.8h14.35v47.61Z"/>
13
+ <path class="cls-1" d="M28.36,0h34.7c7.93,0,14.35,6.42,14.35,14.35H28.36V0Z"/>
14
+ <path class="cls-1" d="M77.41,14.35c7.93,0,14.35,6.42,14.35,14.35v33.26h-14.35V14.35Z"/>
15
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cascadeflow/n8n-nodes-cascadeflow",
3
- "version": "0.4.8",
3
+ "version": "0.4.10-alpha.1",
4
4
  "description": "n8n node for cascadeflow - Smart AI model cascading with 40-85% cost savings",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -30,7 +30,8 @@
30
30
  "dist/credentials/CascadeFlowApi.credentials.js"
31
31
  ],
32
32
  "nodes": [
33
- "dist/nodes/CascadeFlow/CascadeFlow.node.js"
33
+ "dist/nodes/CascadeFlow/CascadeFlow.node.js",
34
+ "dist/nodes/LmChatCascadeFlow/LmChatCascadeFlow.node.js"
34
35
  ]
35
36
  },
36
37
  "devDependencies": {
@@ -50,7 +51,10 @@
50
51
  "@cascadeflow/core": "^0.4.0",
51
52
  "openai": "^4.73.1",
52
53
  "@anthropic-ai/sdk": "^0.30.0",
53
- "groq-sdk": "^0.5.0"
54
+ "groq-sdk": "^0.5.0",
55
+ "@langchain/core": "^0.3.0",
56
+ "@langchain/openai": "^0.3.0",
57
+ "@langchain/anthropic": "^0.3.0"
54
58
  },
55
59
  "scripts": {
56
60
  "build": "tsc && gulp build:icons",