Skip to content

Automate browser based workflows with AI

make ai fallback true by default (#3380)

Jonathan Dobson21b3f6d36aa9
diff --git a/skyvern-frontend/src/routes/workflows/Workflows.tsx b/skyvern-frontend/src/routes/workflows/Workflows.tsx
index 3534f574a..9a585690b 100644
--- a/skyvern-frontend/src/routes/workflows/Workflows.tsx
+++ b/skyvern-frontend/src/routes/workflows/Workflows.tsx
@@ -49,7 +49,11 @@ import { WorkflowTemplates } from "../discover/WorkflowTemplates";
const emptyWorkflowRequest: WorkflowCreateYAMLRequest = {
title: "New Workflow",
description: "",
- workflow_definition: { blocks: [], parameters: [] },
+ ai_fallback: true,
+ workflow_definition: {
+ blocks: [],
+ parameters: [],
+ },
};
function Workflows() {
diff --git a/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx b/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx
index 754df29fc..d7e7a1aa3 100644
--- a/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx
+++ b/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx
@@ -63,7 +63,7 @@ function Debugger() {
: null,
useScriptCache: workflow.generate_script,
scriptCacheKey: workflow.cache_key,
- aiFallback: workflow.ai_fallback,
+ aiFallback: workflow.ai_fallback ?? true,
};
const elements = getElements(
diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx
index 2e60d1987..87678e1a2 100644
--- a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx
@@ -64,7 +64,7 @@ function WorkflowEditor() {
: null,
useScriptCache: workflow.generate_script,
scriptCacheKey: workflow.cache_key,
- aiFallback: workflow.ai_fallback,
+ aiFallback: workflow.ai_fallback ?? true,
};
const elements = getElements(
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx
index 3d9ac490e..ff61bc42c 100644
--- a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx
@@ -82,7 +82,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
extraHttpHeaders: data.withWorkflowSettings ? data.extraHttpHeaders : null,
useScriptCache: data.withWorkflowSettings ? data.useScriptCache : false,
scriptCacheKey: data.withWorkflowSettings ? data.scriptCacheKey : null,
- aiFallback: data.withWorkflowSettings ? data.aiFallback : false,
+ aiFallback: data.withWorkflowSettings ? data.aiFallback : true,
});
const [facing, setFacing] = useState<"front" | "back">("front");
diff --git a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts
index 56c2bb2cf..c1bbf8669 100644
--- a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts
+++ b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts
@@ -705,7 +705,7 @@ function getElements(
editable,
useScriptCache: settings.useScriptCache,
scriptCacheKey: settings.scriptCacheKey,
- aiFallback: settings.aiFallback ?? false,
+ aiFallback: settings.aiFallback ?? true,
label: "__start_block__",
showCode: false,
}),
@@ -1417,7 +1417,7 @@ function getWorkflowSettings(nodes: Array<AppNode>): WorkflowSettings {
extraHttpHeaders: null,
useScriptCache: false,
scriptCacheKey: null,
- aiFallback: false,
+ aiFallback: true,
};
const startNodes = nodes.filter(isStartNode);
const startNodeWithWorkflowSettings = startNodes.find(
diff --git a/skyvern-frontend/src/store/WorkflowHasChangesStore.ts b/skyvern-frontend/src/store/WorkflowHasChangesStore.ts
index 0353bfb94..991a5af23 100644
--- a/skyvern-frontend/src/store/WorkflowHasChangesStore.ts
+++ b/skyvern-frontend/src/store/WorkflowHasChangesStore.ts
@@ -116,7 +116,7 @@ const useWorkflowSave = () => {
extra_http_headers: extraHttpHeaders,
generate_script: saveData.settings.useScriptCache,
cache_key: normalizedKey,
- ai_fallback: saveData.settings.aiFallback ?? undefined,
+ ai_fallback: saveData.settings.aiFallback ?? true,
workflow_definition: {
parameters: saveData.parameters,
blocks: saveData.blocks,