vellum-ai 0.12.17__py3-none-any.whl → 0.13.1__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. vellum/__init__.py +10 -22
  2. vellum/client/__init__.py +8 -0
  3. vellum/client/core/client_wrapper.py +1 -1
  4. vellum/client/core/pydantic_utilities.py +5 -0
  5. vellum/client/resources/__init__.py +4 -0
  6. vellum/client/resources/organizations/__init__.py +2 -0
  7. vellum/client/resources/organizations/client.py +116 -0
  8. vellum/client/resources/workflows/client.py +8 -0
  9. vellum/client/resources/workspaces/__init__.py +2 -0
  10. vellum/client/resources/workspaces/client.py +114 -0
  11. vellum/client/types/__init__.py +6 -22
  12. vellum/client/types/logical_operator.py +2 -0
  13. vellum/client/types/new_member_join_behavior_enum.py +8 -0
  14. vellum/client/types/{function_call_variable_value.py → organization_read.py} +6 -4
  15. vellum/client/types/workflow_execution_workflow_result_event.py +0 -2
  16. vellum/client/types/workflow_result_event.py +0 -2
  17. vellum/client/types/workflow_result_event_output_data_array.py +4 -4
  18. vellum/client/types/{string_variable_value.py → workspace_read.py} +12 -5
  19. vellum/{types/json_variable_value.py → resources/organizations/__init__.py} +1 -1
  20. vellum/resources/organizations/client.py +3 -0
  21. vellum/{types/image_variable_value.py → resources/workspaces/__init__.py} +1 -1
  22. vellum/{types/array_variable_value.py → resources/workspaces/client.py} +1 -1
  23. vellum/types/{array_variable_value_item.py → new_member_join_behavior_enum.py} +1 -1
  24. vellum/types/{audio_variable_value.py → organization_read.py} +1 -1
  25. vellum/types/{error_variable_value.py → workspace_read.py} +1 -1
  26. vellum/workflows/descriptors/base.py +1 -1
  27. vellum/workflows/descriptors/tests/test_utils.py +3 -0
  28. vellum/workflows/expressions/accessor.py +8 -2
  29. vellum/workflows/nodes/core/map_node/node.py +49 -24
  30. vellum/workflows/nodes/core/map_node/tests/test_node.py +4 -4
  31. vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py +1 -1
  32. vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +5 -3
  33. vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py +3 -0
  34. vellum/workflows/nodes/displayable/bases/search_node.py +37 -2
  35. vellum/workflows/nodes/displayable/bases/tests/__init__.py +0 -0
  36. vellum/workflows/nodes/displayable/bases/tests/test_utils.py +61 -0
  37. vellum/workflows/nodes/displayable/bases/types.py +42 -0
  38. vellum/workflows/nodes/displayable/bases/utils.py +112 -0
  39. vellum/workflows/nodes/displayable/inline_prompt_node/tests/test_node.py +0 -1
  40. vellum/workflows/nodes/displayable/search_node/tests/__init__.py +0 -0
  41. vellum/workflows/nodes/displayable/search_node/tests/test_node.py +164 -0
  42. vellum/workflows/nodes/displayable/tests/test_inline_text_prompt_node.py +2 -3
  43. vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +0 -1
  44. vellum/workflows/runner/runner.py +37 -4
  45. vellum/workflows/types/tests/test_utils.py +5 -2
  46. vellum/workflows/types/utils.py +4 -0
  47. vellum/workflows/workflows/base.py +14 -32
  48. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.1.dist-info}/METADATA +1 -1
  49. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.1.dist-info}/RECORD +100 -97
  50. vellum_cli/__init__.py +10 -0
  51. vellum_cli/ping.py +28 -0
  52. vellum_cli/tests/test_ping.py +47 -0
  53. vellum_ee/workflows/display/nodes/base_node_display.py +17 -10
  54. vellum_ee/workflows/display/nodes/vellum/api_node.py +1 -0
  55. vellum_ee/workflows/display/nodes/vellum/base_node.py +110 -2
  56. vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -0
  57. vellum_ee/workflows/display/nodes/vellum/conditional_node.py +5 -62
  58. vellum_ee/workflows/display/nodes/vellum/error_node.py +1 -0
  59. vellum_ee/workflows/display/nodes/vellum/final_output_node.py +1 -0
  60. vellum_ee/workflows/display/nodes/vellum/guardrail_node.py +1 -0
  61. vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +4 -0
  62. vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +1 -0
  63. vellum_ee/workflows/display/nodes/vellum/map_node.py +2 -1
  64. vellum_ee/workflows/display/nodes/vellum/merge_node.py +1 -0
  65. vellum_ee/workflows/display/nodes/vellum/note_node.py +1 -0
  66. vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py +15 -10
  67. vellum_ee/workflows/display/nodes/vellum/search_node.py +1 -0
  68. vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py +1 -0
  69. vellum_ee/workflows/display/nodes/vellum/templating_node.py +1 -0
  70. vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py +2 -2
  71. vellum_ee/workflows/display/nodes/vellum/utils.py +71 -1
  72. vellum_ee/workflows/display/tests/test_vellum_workflow_display.py +2 -5
  73. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/conftest.py +18 -2
  74. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_adornments_serialization.py +67 -0
  75. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +66 -0
  76. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py +1015 -0
  77. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py +37 -22
  78. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py +12 -56
  79. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py +43 -93
  80. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py +31 -151
  81. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py +8 -26
  82. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_generic_node_serialization.py +4 -15
  83. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py +9 -44
  84. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py +19 -101
  85. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py +19 -73
  86. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_merge_node_serialization.py +9 -44
  87. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_prompt_deployment_serialization.py +9 -44
  88. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py +8 -6
  89. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_subworkflow_deployment_serialization.py +11 -58
  90. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_templating_node_serialization.py +8 -11
  91. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_terminal_node_serialization.py +7 -30
  92. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_serialization.py +2 -11
  93. vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py +9 -44
  94. vellum_ee/workflows/display/utils/vellum.py +4 -42
  95. vellum_ee/workflows/display/vellum.py +9 -43
  96. vellum_ee/workflows/display/workflows/vellum_workflow_display.py +7 -10
  97. vellum_ee/workflows/server/virtual_file_loader.py +3 -3
  98. vellum/client/types/array_variable_value.py +0 -27
  99. vellum/client/types/array_variable_value_item.py +0 -29
  100. vellum/client/types/audio_variable_value.py +0 -25
  101. vellum/client/types/chat_history_variable_value.py +0 -21
  102. vellum/client/types/error_variable_value.py +0 -21
  103. vellum/client/types/image_variable_value.py +0 -25
  104. vellum/client/types/json_variable_value.py +0 -20
  105. vellum/client/types/number_variable_value.py +0 -20
  106. vellum/client/types/search_results_variable_value.py +0 -21
  107. vellum/types/chat_history_variable_value.py +0 -3
  108. vellum/types/function_call_variable_value.py +0 -3
  109. vellum/types/number_variable_value.py +0 -3
  110. vellum/types/search_results_variable_value.py +0 -3
  111. vellum/types/string_variable_value.py +0 -3
  112. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.1.dist-info}/LICENSE +0 -0
  113. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.1.dist-info}/WHEEL +0 -0
  114. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.1.dist-info}/entry_points.txt +0 -0
@@ -14,22 +14,6 @@ class BasicGenericNode(BaseNode):
14
14
  output = Inputs.input
15
15
 
16
16
 
17
- class AwaitAnyGenericNode(BaseNode):
18
- class Outputs(BaseNode.Outputs):
19
- output = Inputs.input
20
-
21
- class Trigger(BaseNode.Trigger):
22
- merge_behavior = MergeBehavior.AWAIT_ANY
23
-
24
-
25
- class AwaitAllGenericNode(BaseNode):
26
- class Outputs(BaseNode.Outputs):
27
- output = Inputs.input
28
-
29
- class Trigger(BaseNode.Trigger):
30
- merge_behavior = MergeBehavior.AWAIT_ALL
31
-
32
-
33
17
  def test_serialize_node__basic(serialize_node):
34
18
  serialized_node = serialize_node(BasicGenericNode)
35
19
  assert not DeepDiff(
@@ -38,6 +22,7 @@ def test_serialize_node__basic(serialize_node):
38
22
  "label": "BasicGenericNode",
39
23
  "type": "GENERIC",
40
24
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
25
+ "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
41
26
  "definition": {
42
27
  "name": "BasicGenericNode",
43
28
  "module": [
@@ -49,10 +34,14 @@ def test_serialize_node__basic(serialize_node):
49
34
  "generic_nodes",
50
35
  "test_trigger_serialization",
51
36
  ],
52
- "bases": [{"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]}],
53
37
  },
54
38
  "trigger": {"id": "9d3a1b3d-4a38-4f2e-bbf1-dd8be152bce8", "merge_behavior": "AWAIT_ANY"},
55
- "ports": [],
39
+ "ports": [
40
+ {
41
+ "id": "4fbf0fff-a42e-4410-852a-238b5059198e",
42
+ "type": "DEFAULT",
43
+ }
44
+ ],
56
45
  "adornments": None,
57
46
  "attributes": [],
58
47
  },
@@ -61,6 +50,14 @@ def test_serialize_node__basic(serialize_node):
61
50
  )
62
51
 
63
52
 
53
+ class AwaitAnyGenericNode(BaseNode):
54
+ class Outputs(BaseNode.Outputs):
55
+ output = Inputs.input
56
+
57
+ class Trigger(BaseNode.Trigger):
58
+ merge_behavior = MergeBehavior.AWAIT_ANY
59
+
60
+
64
61
  def test_serialize_node__await_any(serialize_node):
65
62
  serialized_node = serialize_node(AwaitAnyGenericNode)
66
63
  assert not DeepDiff(
@@ -69,6 +66,7 @@ def test_serialize_node__await_any(serialize_node):
69
66
  "label": "AwaitAnyGenericNode",
70
67
  "type": "GENERIC",
71
68
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
69
+ "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
72
70
  "definition": {
73
71
  "name": "AwaitAnyGenericNode",
74
72
  "module": [
@@ -80,10 +78,14 @@ def test_serialize_node__await_any(serialize_node):
80
78
  "generic_nodes",
81
79
  "test_trigger_serialization",
82
80
  ],
83
- "bases": [{"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]}],
84
81
  },
85
82
  "trigger": {"id": "ffa72187-9a18-453f-ae55-b77aad332630", "merge_behavior": "AWAIT_ANY"},
86
- "ports": [],
83
+ "ports": [
84
+ {
85
+ "id": "3e219c0a-e5f8-443a-ac78-1a458b189009",
86
+ "type": "DEFAULT",
87
+ }
88
+ ],
87
89
  "adornments": None,
88
90
  "attributes": [],
89
91
  },
@@ -92,6 +94,14 @@ def test_serialize_node__await_any(serialize_node):
92
94
  )
93
95
 
94
96
 
97
+ class AwaitAllGenericNode(BaseNode):
98
+ class Outputs(BaseNode.Outputs):
99
+ output = Inputs.input
100
+
101
+ class Trigger(BaseNode.Trigger):
102
+ merge_behavior = MergeBehavior.AWAIT_ALL
103
+
104
+
95
105
  def test_serialize_node__await_all(serialize_node):
96
106
  serialized_node = serialize_node(AwaitAllGenericNode)
97
107
  assert not DeepDiff(
@@ -100,6 +110,7 @@ def test_serialize_node__await_all(serialize_node):
100
110
  "label": "AwaitAllGenericNode",
101
111
  "type": "GENERIC",
102
112
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
113
+ "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
103
114
  "definition": {
104
115
  "name": "AwaitAllGenericNode",
105
116
  "module": [
@@ -111,10 +122,14 @@ def test_serialize_node__await_all(serialize_node):
111
122
  "generic_nodes",
112
123
  "test_trigger_serialization",
113
124
  ],
114
- "bases": [{"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]}],
115
125
  },
116
126
  "trigger": {"id": "62074276-c817-476d-b59d-da523ae3f218", "merge_behavior": "AWAIT_ALL"},
117
- "ports": [],
127
+ "ports": [
128
+ {
129
+ "id": "9797e93f-9fe6-48b2-a48e-476abbd20e32",
130
+ "type": "DEFAULT",
131
+ }
132
+ ],
118
133
  "adornments": None,
119
134
  "attributes": [],
120
135
  },
@@ -66,17 +66,8 @@ def test_serialize_workflow(vellum_client):
66
66
  "inputs": [],
67
67
  "data": {"label": "Entrypoint Node", "source_handle_id": "8eaa7f02-25ff-4a00-9b0a-5185718d89b3"},
68
68
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
69
- "definition": {
70
- "name": "BaseNode",
71
- "module": [
72
- "vellum",
73
- "workflows",
74
- "nodes",
75
- "bases",
76
- "base",
77
- ],
78
- "bases": [],
79
- },
69
+ "base": None,
70
+ "definition": None,
80
71
  }
81
72
 
82
73
  api_node = workflow_raw_data["nodes"][1]
@@ -195,12 +186,13 @@ def test_serialize_workflow(vellum_client):
195
186
  "status_code_output_id": "fecc16c3-400e-4fd3-8223-08366070e3b1",
196
187
  },
197
188
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
189
+ "base": {
190
+ "name": "APINode",
191
+ "module": ["vellum", "workflows", "nodes", "displayable", "api_node", "node"],
192
+ },
198
193
  "definition": {
199
194
  "name": "SimpleAPINode",
200
195
  "module": ["tests", "workflows", "basic_vellum_api_node", "workflow"],
201
- "bases": [
202
- {"name": "APINode", "module": ["vellum", "workflows", "nodes", "displayable", "api_node", "node"]}
203
- ],
204
196
  },
205
197
  },
206
198
  api_node,
@@ -239,7 +231,7 @@ def test_serialize_workflow(vellum_client):
239
231
  }
240
232
  ],
241
233
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
242
- "definition": {
234
+ "base": {
243
235
  "name": "FinalOutputNode",
244
236
  "module": [
245
237
  "vellum",
@@ -249,20 +241,8 @@ def test_serialize_workflow(vellum_client):
249
241
  "final_output_node",
250
242
  "node",
251
243
  ],
252
- "bases": [
253
- {
254
- "name": "BaseNode",
255
- "module": [
256
- "vellum",
257
- "workflows",
258
- "nodes",
259
- "bases",
260
- "base",
261
- ],
262
- "bases": [],
263
- }
264
- ],
265
244
  },
245
+ "definition": None,
266
246
  },
267
247
  {
268
248
  "id": "736f9bd0-f487-42af-bdb3-780b4941c61c",
@@ -294,7 +274,7 @@ def test_serialize_workflow(vellum_client):
294
274
  }
295
275
  ],
296
276
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
297
- "definition": {
277
+ "base": {
298
278
  "name": "FinalOutputNode",
299
279
  "module": [
300
280
  "vellum",
@@ -304,20 +284,8 @@ def test_serialize_workflow(vellum_client):
304
284
  "final_output_node",
305
285
  "node",
306
286
  ],
307
- "bases": [
308
- {
309
- "name": "BaseNode",
310
- "module": [
311
- "vellum",
312
- "workflows",
313
- "nodes",
314
- "bases",
315
- "base",
316
- ],
317
- "bases": [],
318
- }
319
- ],
320
287
  },
288
+ "definition": None,
321
289
  },
322
290
  {
323
291
  "id": "3f3ffc50-b156-48ac-b5f3-f68cb05c2b90",
@@ -349,7 +317,7 @@ def test_serialize_workflow(vellum_client):
349
317
  }
350
318
  ],
351
319
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
352
- "definition": {
320
+ "base": {
353
321
  "name": "FinalOutputNode",
354
322
  "module": [
355
323
  "vellum",
@@ -359,20 +327,8 @@ def test_serialize_workflow(vellum_client):
359
327
  "final_output_node",
360
328
  "node",
361
329
  ],
362
- "bases": [
363
- {
364
- "name": "BaseNode",
365
- "module": [
366
- "vellum",
367
- "workflows",
368
- "nodes",
369
- "bases",
370
- "base",
371
- ],
372
- "bases": [],
373
- }
374
- ],
375
330
  },
331
+ "definition": None,
376
332
  },
377
333
  ],
378
334
  final_output_nodes,
@@ -54,7 +54,8 @@ def test_serialize_workflow_with_filepath():
54
54
  "inputs": [],
55
55
  "data": {"label": "Entrypoint Node", "source_handle_id": "118e4298-aa79-467c-b8b4-2df540905e86"},
56
56
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
57
- "definition": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []},
57
+ "base": None,
58
+ "definition": None,
58
59
  }
59
60
 
60
61
  code_execution_node = workflow_raw_data["nodes"][1]
@@ -97,26 +98,19 @@ def test_serialize_workflow_with_filepath():
97
98
  "log_output_id": "7cac05e3-b7c3-475e-8df8-422b496c3398",
98
99
  },
99
100
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
100
- "definition": {
101
- "bases": [
102
- {
103
- "module": [
104
- "vellum",
105
- "workflows",
106
- "nodes",
107
- "displayable",
108
- "code_execution_node",
109
- "node",
110
- ],
111
- "name": "CodeExecutionNode",
112
- }
113
- ],
101
+ "base": {
114
102
  "module": [
115
- "tests",
103
+ "vellum",
116
104
  "workflows",
117
- "basic_code_execution_node",
118
- "workflow",
105
+ "nodes",
106
+ "displayable",
107
+ "code_execution_node",
108
+ "node",
119
109
  ],
110
+ "name": "CodeExecutionNode",
111
+ },
112
+ "definition": {
113
+ "module": ["tests", "workflows", "basic_code_execution_node", "workflow"],
120
114
  "name": "SimpleCodeExecutionNode",
121
115
  },
122
116
  }
@@ -152,13 +146,11 @@ def test_serialize_workflow_with_filepath():
152
146
  }
153
147
  ],
154
148
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
155
- "definition": {
149
+ "base": {
156
150
  "name": "FinalOutputNode",
157
151
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
158
- "bases": [
159
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
160
- ],
161
152
  },
153
+ "definition": None,
162
154
  },
163
155
  {
164
156
  "id": "c6e3aced-1fc9-48d2-ae55-d2a880e359cb",
@@ -190,13 +182,11 @@ def test_serialize_workflow_with_filepath():
190
182
  }
191
183
  ],
192
184
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
193
- "definition": {
185
+ "base": {
194
186
  "name": "FinalOutputNode",
195
187
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
196
- "bases": [
197
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
198
- ],
199
188
  },
189
+ "definition": None,
200
190
  },
201
191
  ],
202
192
  workflow_raw_data["nodes"][2:],
@@ -304,7 +294,8 @@ def test_serialize_workflow_with_code():
304
294
  "inputs": [],
305
295
  "data": {"label": "Entrypoint Node", "source_handle_id": "e82390bb-c68c-48c1-9f87-7fbfff494c45"},
306
296
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
307
- "definition": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []},
297
+ "base": None,
298
+ "definition": None,
308
299
  }
309
300
 
310
301
  code_execution_node = workflow_raw_data["nodes"][1]
@@ -347,15 +338,13 @@ def test_serialize_workflow_with_code():
347
338
  "log_output_id": "7cac05e3-b7c3-475e-8df8-422b496c3398",
348
339
  },
349
340
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
341
+ "base": {
342
+ "name": "CodeExecutionNode",
343
+ "module": ["vellum", "workflows", "nodes", "displayable", "code_execution_node", "node"],
344
+ },
350
345
  "definition": {
351
346
  "name": "SimpleCodeExecutionNode",
352
347
  "module": ["tests", "workflows", "basic_code_execution_node", "workflow_with_code"],
353
- "bases": [
354
- {
355
- "name": "CodeExecutionNode",
356
- "module": ["vellum", "workflows", "nodes", "displayable", "code_execution_node", "node"],
357
- }
358
- ],
359
348
  },
360
349
  }
361
350
  assert not DeepDiff(
@@ -390,13 +379,11 @@ def test_serialize_workflow_with_code():
390
379
  }
391
380
  ],
392
381
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
393
- "definition": {
382
+ "base": {
394
383
  "name": "FinalOutputNode",
395
384
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
396
- "bases": [
397
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
398
- ],
399
385
  },
386
+ "definition": None,
400
387
  },
401
388
  {
402
389
  "id": "eccf97c7-e766-471f-9703-4d2595800e66",
@@ -428,13 +415,11 @@ def test_serialize_workflow_with_code():
428
415
  }
429
416
  ],
430
417
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
431
- "definition": {
418
+ "base": {
432
419
  "name": "FinalOutputNode",
433
420
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
434
- "bases": [
435
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
436
- ],
437
421
  },
422
+ "definition": None,
438
423
  },
439
424
  ],
440
425
  workflow_raw_data["nodes"][2:],
@@ -539,17 +524,8 @@ def test_serialize_workflow__try_wrapped():
539
524
  "label": "Entrypoint Node",
540
525
  "source_handle_id": "8cd1e612-39aa-4471-88cf-f7999b713fa6",
541
526
  },
542
- "definition": {
543
- "bases": [],
544
- "module": [
545
- "vellum",
546
- "workflows",
547
- "nodes",
548
- "bases",
549
- "base",
550
- ],
551
- "name": "BaseNode",
552
- },
527
+ "base": None,
528
+ "definition": None,
553
529
  "display_data": {
554
530
  "position": {"x": 0.0, "y": 0.0},
555
531
  },
@@ -595,20 +571,18 @@ def test_serialize_workflow__try_wrapped():
595
571
  "log_output_id": "7cac05e3-b7c3-475e-8df8-422b496c3398",
596
572
  },
597
573
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
598
- "definition": {
599
- "bases": [
600
- {
601
- "module": [
602
- "vellum",
603
- "workflows",
604
- "nodes",
605
- "displayable",
606
- "code_execution_node",
607
- "node",
608
- ],
609
- "name": "CodeExecutionNode",
610
- }
574
+ "base": {
575
+ "module": [
576
+ "vellum",
577
+ "workflows",
578
+ "nodes",
579
+ "displayable",
580
+ "code_execution_node",
581
+ "node",
611
582
  ],
583
+ "name": "CodeExecutionNode",
584
+ },
585
+ "definition": {
612
586
  "module": [
613
587
  "tests",
614
588
  "workflows",
@@ -627,20 +601,7 @@ def test_serialize_workflow__try_wrapped():
627
601
  {
628
602
  "id": "af4fc1ef-7701-43df-b5e7-4f354f707db2",
629
603
  "type": "TERMINAL",
630
- "definition": {
631
- "bases": [
632
- {
633
- "bases": [],
634
- "module": [
635
- "vellum",
636
- "workflows",
637
- "nodes",
638
- "bases",
639
- "base",
640
- ],
641
- "name": "BaseNode",
642
- },
643
- ],
604
+ "base": {
644
605
  "module": [
645
606
  "vellum",
646
607
  "workflows",
@@ -651,6 +612,7 @@ def test_serialize_workflow__try_wrapped():
651
612
  ],
652
613
  "name": "FinalOutputNode",
653
614
  },
615
+ "definition": None,
654
616
  "data": {
655
617
  "label": "Final Output",
656
618
  "name": "log",
@@ -682,20 +644,7 @@ def test_serialize_workflow__try_wrapped():
682
644
  {
683
645
  "id": "4cbfa5f7-fc12-4ab2-81cb-168c5caef4f0",
684
646
  "type": "TERMINAL",
685
- "definition": {
686
- "bases": [
687
- {
688
- "bases": [],
689
- "module": [
690
- "vellum",
691
- "workflows",
692
- "nodes",
693
- "bases",
694
- "base",
695
- ],
696
- "name": "BaseNode",
697
- },
698
- ],
647
+ "base": {
699
648
  "module": [
700
649
  "vellum",
701
650
  "workflows",
@@ -706,6 +655,7 @@ def test_serialize_workflow__try_wrapped():
706
655
  ],
707
656
  "name": "FinalOutputNode",
708
657
  },
658
+ "definition": None,
709
659
  "data": {
710
660
  "label": "Final Output",
711
661
  "name": "result",