Skip to content

Commit af30fe4

Browse files
committed
Merge branch 'feat/support-azure-storage' of https://github.com/chiragjagga/Flowise into feat/support-azure-storage
2 parents a874ac9 + 8e3cf72 commit af30fe4

103 files changed

Lines changed: 1040 additions & 2729 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docker/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
PORT=3000
22

3+
# APIKEY_PATH=/your_apikey_path/.flowise # (will be deprecated by end of 2025)
4+
35
############################################################################################################
46
############################################## DATABASE ####################################################
57
############################################################################################################

docker/worker/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
WORKER_PORT=5566
22

3+
# APIKEY_PATH=/your_apikey_path/.flowise # (will be deprecated by end of 2025)
4+
35
############################################################################################################
46
############################################## DATABASE ####################################################
57
############################################################################################################
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
global:
2-
scrape_interval: 5s
2+
scrape_interval: 5s
33
scrape_configs:
4-
- job_name: 'FlowiseAI'
5-
static_configs:
6-
- targets: ['localhost:8080', 'localhost:3000']
4+
- job_name: "FlowiseAI"
5+
static_configs:
6+
- targets: ["localhost:8080","localhost:3000"]
77

8-
metrics_path: /api/v1/metrics/
9-
scheme: http
10-
11-
authorization:
12-
type: Bearer
13-
credentials_file: '/etc/prometheus/api_key.txt'
8+
metrics_path: /api/v1/metrics/
9+
scheme: http

packages/components/credentials/AzureRerankerApi.credential.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/components/credentials/CerebrasApi.credential.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ class CerebrasAPIAuth implements INodeCredential {
1010
constructor() {
1111
this.label = 'Cerebras API Key'
1212
this.name = 'cerebrasAIApi'
13-
this.version = 2.0
14-
this.description = 'Get your free API key from Cerebras Cloud'
13+
this.version = 1.0
1514
this.inputs = [
1615
{
1716
label: 'Cerebras API Key',
1817
name: 'cerebrasApiKey',
1918
type: 'password',
20-
description: 'Get your API key from https://cloud.cerebras.ai/ (starts with csk-)'
19+
description: 'API Key (cloud.cerebras.ai)'
2120
}
2221
]
2322
}

packages/components/credentials/CloudflareApi.credential.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

packages/components/credentials/Ollama.credential.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

packages/components/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
preset: 'ts-jest',
33
testEnvironment: 'node',
4-
roots: ['<rootDir>/nodes', '<rootDir>/src'],
4+
roots: ['<rootDir>/nodes'],
55
transform: {
66
'^.+\\.tsx?$': 'ts-jest'
77
},

packages/components/models.json

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -322,30 +322,6 @@
322322
{
323323
"name": "azureChatOpenAI",
324324
"models": [
325-
{
326-
"label": "gpt-5.2",
327-
"name": "gpt-5.2",
328-
"input_cost": 0.00000175,
329-
"output_cost": 0.000014
330-
},
331-
{
332-
"label": "gpt-5.2-pro",
333-
"name": "gpt-5.2-pro",
334-
"input_cost": 0.000021,
335-
"output_cost": 0.000168
336-
},
337-
{
338-
"label": "gpt-5.2-chat-latest",
339-
"name": "gpt-5.2-chat-latest",
340-
"input_cost": 0.00000175,
341-
"output_cost": 0.000014
342-
},
343-
{
344-
"label": "gpt-5.2-codex",
345-
"name": "gpt-5.2-codex",
346-
"input_cost": 0.00000175,
347-
"output_cost": 0.000014
348-
},
349325
{
350326
"label": "gpt-5.1",
351327
"name": "gpt-5.1",
@@ -671,12 +647,6 @@
671647
"input_cost": 0.00002,
672648
"output_cost": 0.00012
673649
},
674-
{
675-
"label": "gemini-3-flash-preview",
676-
"name": "gemini-3-flash-preview",
677-
"input_cost": 0.0000005,
678-
"output_cost": 0.000003
679-
},
680650
{
681651
"label": "gemini-3-pro-image-preview",
682652
"name": "gemini-3-pro-image-preview",
@@ -759,12 +729,6 @@
759729
"input_cost": 0.00002,
760730
"output_cost": 0.00012
761731
},
762-
{
763-
"label": "gemini-3-flash-preview",
764-
"name": "gemini-3-flash-preview",
765-
"input_cost": 0.0000005,
766-
"output_cost": 0.000003
767-
},
768732
{
769733
"label": "gemini-2.5-pro",
770734
"name": "gemini-2.5-pro",
@@ -917,7 +881,6 @@
917881
}
918882
],
919883
"regions": [
920-
{ "label": "global", "name": "global" },
921884
{ "label": "us-east1", "name": "us-east1" },
922885
{ "label": "us-east4", "name": "us-east4" },
923886
{ "label": "us-central1", "name": "us-central1" },
@@ -1064,36 +1027,6 @@
10641027
}
10651028
]
10661029
},
1067-
{
1068-
"name": "chatCerebras",
1069-
"models": [
1070-
{
1071-
"label": "llama-3.3-70b",
1072-
"name": "llama-3.3-70b",
1073-
"description": "Best for complex reasoning and long-form content"
1074-
},
1075-
{
1076-
"label": "qwen-3-32b",
1077-
"name": "qwen-3-32b",
1078-
"description": "Balanced performance for general-purpose tasks"
1079-
},
1080-
{
1081-
"label": "llama3.1-8b",
1082-
"name": "llama3.1-8b",
1083-
"description": "Fastest model, ideal for simple tasks and high throughput"
1084-
},
1085-
{
1086-
"label": "gpt-oss-120b",
1087-
"name": "gpt-oss-120b",
1088-
"description": "Largest model for demanding tasks"
1089-
},
1090-
{
1091-
"label": "zai-glm-4.6",
1092-
"name": "zai-glm-4.6",
1093-
"description": "Advanced reasoning and complex problem-solving"
1094-
}
1095-
]
1096-
},
10971030
{
10981031
"name": "deepseek",
10991032
"models": [
@@ -1114,30 +1047,6 @@
11141047
{
11151048
"name": "chatOpenAI",
11161049
"models": [
1117-
{
1118-
"label": "gpt-5.2",
1119-
"name": "gpt-5.2",
1120-
"input_cost": 0.00000175,
1121-
"output_cost": 0.000014
1122-
},
1123-
{
1124-
"label": "gpt-5.2-pro",
1125-
"name": "gpt-5.2-pro",
1126-
"input_cost": 0.000021,
1127-
"output_cost": 0.000168
1128-
},
1129-
{
1130-
"label": "gpt-5.2-chat-latest",
1131-
"name": "gpt-5.2-chat-latest",
1132-
"input_cost": 0.00000175,
1133-
"output_cost": 0.000014
1134-
},
1135-
{
1136-
"label": "gpt-5.2-codex",
1137-
"name": "gpt-5.2-codex",
1138-
"input_cost": 0.00000175,
1139-
"output_cost": 0.000014
1140-
},
11411050
{
11421051
"label": "gpt-5.1",
11431052
"name": "gpt-5.1",

packages/components/nodes/agentflow/Agent/Agent.ts

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { flatten } from 'lodash'
2121
import zodToJsonSchema from 'zod-to-json-schema'
2222
import { getErrorMessage } from '../../../src/error'
2323
import { DataSource } from 'typeorm'
24-
import { randomBytes } from 'crypto'
2524
import {
2625
addImageArtifactsToMessages,
2726
extractArtifactsFromResponse,
@@ -66,27 +65,6 @@ interface ISimpliefiedTool {
6665
}
6766
}
6867

69-
/**
70-
* Sanitizes a string to be used as a tool name.
71-
* Restricts to ASCII characters [a-z0-9_-] for LLM API compatibility (OpenAI, Anthropic, Gemini).
72-
* Non-ASCII titles (Korean, Chinese, Japanese, etc.) will use auto-generated fallback names.
73-
* This prevents 'Invalid tools[0].function.name: empty string' errors.
74-
*/
75-
const sanitizeToolName = (name: string): string => {
76-
const sanitized = name
77-
.toLowerCase()
78-
.replace(/ /g, '_')
79-
.replace(/[^a-z0-9_-]/g, '') // ASCII only for LLM API compatibility
80-
81-
// If the result is empty (e.g., non-ASCII only input), generate a unique fallback name
82-
if (!sanitized) {
83-
return `tool_${Date.now()}_${randomBytes(4).toString('hex').slice(0, 5)}`
84-
}
85-
86-
// Enforce 64 character limit common for tool names
87-
return sanitized.slice(0, 64)
88-
}
89-
9068
class Agent_Agentflow implements INode {
9169
label: string
9270
name: string
@@ -779,7 +757,10 @@ class Agent_Agentflow implements INode {
779757
...nodeData,
780758
inputs: {
781759
...nodeData.inputs,
782-
name: sanitizeToolName(storeName),
760+
name: storeName
761+
.toLowerCase()
762+
.replace(/ /g, '_')
763+
.replace(/[^a-z0-9_-]/g, ''),
783764
description: knowledgeBase.docStoreDescription,
784765
retriever: docStoreVectorInstance,
785766
returnSourceDocuments: knowledgeBase.returnSourceDocuments
@@ -796,7 +777,10 @@ class Agent_Agentflow implements INode {
796777
const componentNode = options.componentNodes['retrieverTool']
797778

798779
availableTools.push({
799-
name: sanitizeToolName(storeName),
780+
name: storeName
781+
.toLowerCase()
782+
.replace(/ /g, '_')
783+
.replace(/[^a-z0-9_-]/g, ''),
800784
description: knowledgeBase.docStoreDescription,
801785
schema: jsonSchema,
802786
toolNode: {
@@ -854,7 +838,10 @@ class Agent_Agentflow implements INode {
854838
...nodeData,
855839
inputs: {
856840
...nodeData.inputs,
857-
name: sanitizeToolName(knowledgeName),
841+
name: knowledgeName
842+
.toLowerCase()
843+
.replace(/ /g, '_')
844+
.replace(/[^a-z0-9_-]/g, ''),
858845
description: knowledgeBase.knowledgeDescription,
859846
retriever: vectorStoreInstance,
860847
returnSourceDocuments: knowledgeBase.returnSourceDocuments
@@ -871,7 +858,10 @@ class Agent_Agentflow implements INode {
871858
const componentNode = options.componentNodes['retrieverTool']
872859

873860
availableTools.push({
874-
name: sanitizeToolName(knowledgeName),
861+
name: knowledgeName
862+
.toLowerCase()
863+
.replace(/ /g, '_')
864+
.replace(/[^a-z0-9_-]/g, ''),
875865
description: knowledgeBase.knowledgeDescription,
876866
schema: jsonSchema,
877867
toolNode: {

0 commit comments

Comments
 (0)