vellum-ai 0.14.32__py3-none-any.whl → 0.14.33__py3-none-any.whl

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.
@@ -18,7 +18,7 @@ class BaseClientWrapper:
18
18
  headers: typing.Dict[str, str] = {
19
19
  "X-Fern-Language": "Python",
20
20
  "X-Fern-SDK-Name": "vellum-ai",
21
- "X-Fern-SDK-Version": "0.14.32",
21
+ "X-Fern-SDK-Version": "0.14.33",
22
22
  }
23
23
  headers["X_API_KEY"] = self.api_key
24
24
  return headers
@@ -75,7 +75,9 @@ class InlineSubworkflowNode(
75
75
  with execution_context(parent_context=get_parent_context()):
76
76
  subworkflow = self.subworkflow(
77
77
  parent_state=self.state,
78
- context=WorkflowContext(vellum_client=self._context.vellum_client),
78
+ context=WorkflowContext(
79
+ vellum_client=self._context.vellum_client, generated_files=self._context.generated_files
80
+ ),
79
81
  )
80
82
  subworkflow_stream = subworkflow.stream(
81
83
  inputs=self._compile_subworkflow_inputs(),
@@ -171,7 +171,9 @@ class MapNode(BaseAdornmentNode[StateType], Generic[StateType, MapNodeItemType])
171
171
  self._run_subworkflow(item=item, index=index)
172
172
 
173
173
  def _run_subworkflow(self, *, item: MapNodeItemType, index: int) -> None:
174
- context = WorkflowContext(vellum_client=self._context.vellum_client)
174
+ context = WorkflowContext(
175
+ vellum_client=self._context.vellum_client, generated_files=self._context.generated_files
176
+ )
175
177
  subworkflow = self.subworkflow(
176
178
  parent_state=self.state,
177
179
  context=context,
@@ -45,7 +45,9 @@ class RetryNode(BaseAdornmentNode[StateType], Generic[StateType]):
45
45
  with execution_context(parent_context=parent_context):
46
46
  subworkflow = self.subworkflow(
47
47
  parent_state=self.state,
48
- context=WorkflowContext(vellum_client=self._context.vellum_client),
48
+ context=WorkflowContext(
49
+ vellum_client=self._context.vellum_client, generated_files=self._context.generated_files
50
+ ),
49
51
  )
50
52
  subworkflow_stream = subworkflow.stream(
51
53
  inputs=self.SubworkflowInputs(attempt_number=attempt_number),
@@ -32,7 +32,9 @@ class TryNode(BaseAdornmentNode[StateType], Generic[StateType]):
32
32
  with execution_context(parent_context=parent_context):
33
33
  subworkflow = self.subworkflow(
34
34
  parent_state=self.state,
35
- context=WorkflowContext(vellum_client=self._context.vellum_client),
35
+ context=WorkflowContext(
36
+ vellum_client=self._context.vellum_client, generated_files=self._context.generated_files
37
+ ),
36
38
  )
37
39
  subworkflow_stream = subworkflow.stream(
38
40
  event_filter=all_workflow_event_filter,
@@ -24,7 +24,7 @@ class GuardrailNode(BaseNode[StateType], Generic[StateType]):
24
24
 
25
25
  metric_definition: ClassVar[Union[UUID, str]]
26
26
 
27
- metric_inputs: ClassVar[EntityInputsInterface]
27
+ metric_inputs: ClassVar[EntityInputsInterface] = {}
28
28
  release_tag: str = LATEST_RELEASE_TAG
29
29
 
30
30
  request_options: Optional[RequestOptions] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 0.14.32
3
+ Version: 0.14.33
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.9,<4.0
@@ -6,7 +6,7 @@ vellum_cli/config.py,sha256=aKnhvM5B8QdPA4cQC5Sqg7ImP-vNcVdSkZmk_OBpQTw,9309
6
6
  vellum_cli/image_push.py,sha256=8DDvRDJEZ-FukUCqGW1827bg1ybF4xBbx9WyqWYQE-g,6816
7
7
  vellum_cli/init.py,sha256=WpnMXPItPmh0f0bBGIer3p-e5gu8DUGwSArT_FuoMEw,5093
8
8
  vellum_cli/logger.py,sha256=PuRFa0WCh4sAGFS5aqWB0QIYpS6nBWwPJrIXpWxugV4,1022
9
- vellum_cli/ping.py,sha256=DoVE8a495re9o8SZzCF_CYHMNAHXnEuC-guVTgUQhEI,869
9
+ vellum_cli/ping.py,sha256=p_BCCRjgPhng6JktuECtkDQLbhopt6JpmrtGoLnLJT8,1161
10
10
  vellum_cli/pull.py,sha256=OfP2FIChfYzi7ksWObnvmkibln0JubMQftr1TZL-Bxk,10061
11
11
  vellum_cli/push.py,sha256=xjTNbLwOVFNU3kpBrm56Bk5QkSRrJ9z86qceghCzfIA,9655
12
12
  vellum_cli/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -15,7 +15,7 @@ vellum_cli/tests/test_config.py,sha256=uvKGDc8BoVyT9_H0Z-g8469zVxomn6Oi3Zj-vK7O_
15
15
  vellum_cli/tests/test_image_push.py,sha256=i3lJuW8nFRwL1M1OF6752IZYvGAFgKmkB2hd_rYlsmg,2028
16
16
  vellum_cli/tests/test_init.py,sha256=8UOc_ThfouR4ja5cCl_URuLk7ohr9JXfCnG4yka1OUQ,18754
17
17
  vellum_cli/tests/test_main.py,sha256=qDZG-aQauPwBwM6A2DIu1494n47v3pL28XakTbLGZ-k,272
18
- vellum_cli/tests/test_ping.py,sha256=sN9Yfia6C3IPlXGTb9miEfVTFjAsGSuzQMZx_W-qMq4,1977
18
+ vellum_cli/tests/test_ping.py,sha256=3ucVRThEmTadlV9LrJdCCrr1Ofj3rOjG6ue0BNR2UC0,2523
19
19
  vellum_cli/tests/test_pull.py,sha256=UmgQwtv8J7U2zkbTvOPbxi6ozvAec1Fo1b2E5Fc9gWU,34625
20
20
  vellum_cli/tests/test_push.py,sha256=zDv_Q1hbXtLwmTJDPRAvwDjbuHC09uNRYOy4FQujUow,23476
21
21
  vellum_ee/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -40,7 +40,7 @@ vellum_ee/workflows/display/nodes/vellum/code_execution_node.py,sha256=IYx0nll0t
40
40
  vellum_ee/workflows/display/nodes/vellum/conditional_node.py,sha256=ybLIa4uclqVIy3VAQvI1ivg2tnK5Ug_1R5a69DFqL7E,11104
41
41
  vellum_ee/workflows/display/nodes/vellum/error_node.py,sha256=I1Jkp2htRINJATtv1e-zs9BrReFX842djpiVgBPHDYg,2186
42
42
  vellum_ee/workflows/display/nodes/vellum/final_output_node.py,sha256=BJ--Y-LCbGFJve3OFEKHVxrw8TKvgb342opYLJibToc,3128
43
- vellum_ee/workflows/display/nodes/vellum/guardrail_node.py,sha256=aYZSJTxknU4LMiQdWk9LcK6CkhdozeDEMiRxfAyUNEc,2202
43
+ vellum_ee/workflows/display/nodes/vellum/guardrail_node.py,sha256=IuJPKZoZT7lXhQkPH-wlut9-FsGtr8dIHM4jz8rp7BU,2228
44
44
  vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py,sha256=86hkneLIBS4Jel3GWsPVIIFqXGD3RHIpXw0iGa_Zues,8843
45
45
  vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py,sha256=MU9I8CB1X1TgL1aa1eT6DHWwNJ-2v79t74xl0oy-fBo,5510
46
46
  vellum_ee/workflows/display/nodes/vellum/map_node.py,sha256=8CPnn06HIBxBOiECevUffeVmQmCpec6WtPQnNl9gj9Y,3748
@@ -71,13 +71,13 @@ vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attr
71
71
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_outputs_serialization.py,sha256=s6_mnk0pkztU59wYpSfOFpMhAJaRjmyfxM6WJGtnD4Y,6456
72
72
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py,sha256=PkSgghJDz0fpDB72HHPjLjo8LkZk-HpUkCQzRLX-iVw,40611
73
73
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py,sha256=dsJr8I9AdPwMOGszirfNDzZP2Ychd94aAKuPXAzknMk,4632
74
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py,sha256=IRazH2QR6F8RGqNemEnHueyj5DtEa6rFTYhT16S4jI8,15917
74
+ vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py,sha256=EdLwx6iUEMrQd68UIlACa9DQguomcu621MOYuXmunig,15908
75
75
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py,sha256=V__y7uu-dy6TJjPeu4UDvaoO2yYwBRbPiW9uJdzWRx4,29828
76
76
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py,sha256=6ejs_C1cuaRHtc8Qb2qh8-b-juDwLwdfTBd-6CSDDYw,47672
77
77
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_default_state_serialization.py,sha256=WebMmamSwRykxcilhiNG1XTxI88VydCgPFavF-gSqWk,8820
78
78
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py,sha256=wgedEa2IVP2ssH_FLghoEmLgpJR41AY-iNIw1SESeqA,6106
79
79
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_generic_node_serialization.py,sha256=THQB73vAgdiRRk7GKWwzw99G-X3LLgEEVCb4QCQrrMQ,5773
80
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py,sha256=0N7lqB2WMvSItUY78EWpF-g4fXvhkc4NCY-Ws57OYsQ,7446
80
+ vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py,sha256=aWZ3XIquyKeS199VayYVA7qVjXdvPepGG8UkNt0osIU,7446
81
81
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_prompt_node_serialization.py,sha256=XRtXTWtNXHe1g8E_mNcAhYZVjc0UcGlJRjq34_sd0jo,787
82
82
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py,sha256=nZ3IOZSX3cOg4XV5-PW-Hsu806vfzmOZyCpZyl1I50w,20605
83
83
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py,sha256=8GakAJmf140XzQRZyr-BbZUt22h0lZKUFhNZY4zlD4g,16172
@@ -128,7 +128,7 @@ vellum/client/README.md,sha256=JkCJjmMZl4jrPj46pkmL9dpK4gSzQQmP5I7z4aME4LY,4749
128
128
  vellum/client/__init__.py,sha256=ki-TDOmYzC0FePN7swDyE6UpHFQV_4dK7lqy4h-3s1Y,118148
129
129
  vellum/client/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
130
130
  vellum/client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
131
- vellum/client/core/client_wrapper.py,sha256=ROybYfu3aOKwHhrkkcT0h8Xc0pCvi7MvyOI1CdydzpE,1869
131
+ vellum/client/core/client_wrapper.py,sha256=jPo42cS6hlGPneWIZtcMfaVmCbt4TEQwCPgoWxxCTUw,1869
132
132
  vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
133
133
  vellum/client/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
134
134
  vellum/client/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
@@ -1523,22 +1523,22 @@ vellum/workflows/nodes/core/__init__.py,sha256=5zDMCmyt1v0HTJzlUBwq3U9L825yZGZhT
1523
1523
  vellum/workflows/nodes/core/error_node/__init__.py,sha256=g7RRnlHhqu4qByfLjBwCunmgGA8dI5gNsjS3h6TwlSI,60
1524
1524
  vellum/workflows/nodes/core/error_node/node.py,sha256=MFHU5vITYSK-L9CuMZ49In2ZeNLWnhZD0f8r5dWvb5Y,1270
1525
1525
  vellum/workflows/nodes/core/inline_subworkflow_node/__init__.py,sha256=nKNEH1QTl-1PcvmYoqSWEl0-t6gAur8GLTXHzklRQfM,84
1526
- vellum/workflows/nodes/core/inline_subworkflow_node/node.py,sha256=e-Mal5tZ6JXJdWn8MspoBbXC8LBaCVxKb4RjoHnuZ0A,6611
1526
+ vellum/workflows/nodes/core/inline_subworkflow_node/node.py,sha256=gumdZs50XGpnFvKxde-WAu6NqH7ImwRf3gK6c7B46W0,6696
1527
1527
  vellum/workflows/nodes/core/inline_subworkflow_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1528
1528
  vellum/workflows/nodes/core/inline_subworkflow_node/tests/test_node.py,sha256=kUqwcRMMxjTHALbwGUXCJT_aJBrHS1bkg49oL8R0JO8,4337
1529
1529
  vellum/workflows/nodes/core/map_node/__init__.py,sha256=MXpZYmGfhsMJHqqlpd64WiJRtbAtAMQz-_3fCU_cLV0,56
1530
- vellum/workflows/nodes/core/map_node/node.py,sha256=dY27Xm11LHsqD7hnZnVYYDIazZ-XfL4_zatvWKTi6CU,9243
1530
+ vellum/workflows/nodes/core/map_node/node.py,sha256=8AOHvV1TR8Tr4IyDjdIk6Jzi86KJpg_wS9gp30tDRLQ,9312
1531
1531
  vellum/workflows/nodes/core/map_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1532
1532
  vellum/workflows/nodes/core/map_node/tests/test_node.py,sha256=uMR0AyIFn539LqTKHdwuBswnx1i-PHyqPpgtYrnmYMY,3496
1533
1533
  vellum/workflows/nodes/core/retry_node/__init__.py,sha256=lN2bIy5a3Uzhs_FYCrooADyYU6ZGShtvLKFWpelwPvo,60
1534
- vellum/workflows/nodes/core/retry_node/node.py,sha256=SoDQaizjoj6kKLr454rkXu4bdzN7hXrBBn7T2_cp1CA,5261
1534
+ vellum/workflows/nodes/core/retry_node/node.py,sha256=UmTxbxom2VPBoJLk75gXdMa300JJ-1rkW0rh2MeF3jE,5354
1535
1535
  vellum/workflows/nodes/core/retry_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1536
1536
  vellum/workflows/nodes/core/retry_node/tests/test_node.py,sha256=RM_OHwxrHwyxvlQQBJPqVBxpedFuWQ9h2-Xa3kP75sc,4399
1537
1537
  vellum/workflows/nodes/core/templating_node/__init__.py,sha256=GmyuYo81_A1_Bz6id69ozVFS6FKiuDsZTiA3I6MaL2U,70
1538
1538
  vellum/workflows/nodes/core/templating_node/node.py,sha256=iqBmr2i-f-BqhisNQJiDfewjol0ur7-XpupLStyMJsg,3731
1539
1539
  vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py,sha256=nXkgGDBg4wP36NwykdMEVWwx_xjv8oGT2rYkwuCB_VU,10075
1540
1540
  vellum/workflows/nodes/core/try_node/__init__.py,sha256=JVD4DrldTIqFQQFrubs9KtWCCc0YCAc7Fzol5ZWIWeM,56
1541
- vellum/workflows/nodes/core/try_node/node.py,sha256=RbxL0NRXS0IxRP0MJAnLABolF6dkwVniiqsagzy-lwk,4445
1541
+ vellum/workflows/nodes/core/try_node/node.py,sha256=-fHfcgI9RFQobNyiugP2dow4ahqY7iDd1LObJw5aB8k,4530
1542
1542
  vellum/workflows/nodes/core/try_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1543
1543
  vellum/workflows/nodes/core/try_node/tests/test_node.py,sha256=h6eUc3SggvhzBWlOD0PrPUlkoCSQHwjqYn81VkxSIxU,4948
1544
1544
  vellum/workflows/nodes/displayable/__init__.py,sha256=6F_4DlSwvHuilWnIalp8iDjjDXl0Nmz4QzJV2PYe5RI,1023
@@ -1577,7 +1577,7 @@ vellum/workflows/nodes/displayable/final_output_node/node.py,sha256=PuQ0RvtAmoSI
1577
1577
  vellum/workflows/nodes/displayable/final_output_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1578
1578
  vellum/workflows/nodes/displayable/final_output_node/tests/test_node.py,sha256=E6LQ74qZjY4Xi4avx2qdOCgGhF8pEcNLBh8cqYRkzMI,709
1579
1579
  vellum/workflows/nodes/displayable/guardrail_node/__init__.py,sha256=Ab5eXmOoBhyV4dMWdzh32HLUmnPIBEK_zFCT38C4Fng,68
1580
- vellum/workflows/nodes/displayable/guardrail_node/node.py,sha256=YMXBLHB4_TYWGvbWMQP2WH0ckktK1uFDOEYkRJc-RfE,4422
1580
+ vellum/workflows/nodes/displayable/guardrail_node/node.py,sha256=A9_vuahgKSemPAZdrDJilWwciLhOBTcxINXRnUHQl_g,4427
1581
1581
  vellum/workflows/nodes/displayable/guardrail_node/test_node.py,sha256=1yPIAt4_GWiUKT6u3rTW2XKp62b8xG8Jj3JWeCm5ZDM,1368
1582
1582
  vellum/workflows/nodes/displayable/inline_prompt_node/__init__.py,sha256=gSUOoEZLlrx35-tQhSAd3An8WDwBqyiQh-sIebLU9wU,74
1583
1583
  vellum/workflows/nodes/displayable/inline_prompt_node/node.py,sha256=8RXZqWMzViUjFfbpmcy1gkSsKnEpci8BGwsuPYv4xMQ,3380
@@ -1670,8 +1670,8 @@ vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnad
1670
1670
  vellum/workflows/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1671
1671
  vellum/workflows/workflows/tests/test_base_workflow.py,sha256=tCxrV3QBHL8wfdEO3bvKteDdw32xBlUl1_WxkAwaONw,8344
1672
1672
  vellum/workflows/workflows/tests/test_context.py,sha256=VJBUcyWVtMa_lE5KxdhgMu0WYNYnUQUDvTF7qm89hJ0,2333
1673
- vellum_ai-0.14.32.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
1674
- vellum_ai-0.14.32.dist-info/METADATA,sha256=8lA0Ay00pLf5yruRyIbC6RidBmmfE1gjq-oibfZ0zMA,5484
1675
- vellum_ai-0.14.32.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1676
- vellum_ai-0.14.32.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
1677
- vellum_ai-0.14.32.dist-info/RECORD,,
1673
+ vellum_ai-0.14.33.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
1674
+ vellum_ai-0.14.33.dist-info/METADATA,sha256=8j_YxkXJ0HIBjUZszx0257w_iMhp8KxdW3Y3pUmabMs,5484
1675
+ vellum_ai-0.14.33.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1676
+ vellum_ai-0.14.33.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
1677
+ vellum_ai-0.14.33.dist-info/RECORD,,
vellum_cli/ping.py CHANGED
@@ -14,7 +14,12 @@ def ping_command():
14
14
  try:
15
15
  workspace = client.workspaces.workspace_identity()
16
16
  organization = client.organizations.organization_identity()
17
- except ApiError:
17
+ except ApiError as e:
18
+ # If user did not provide an API key, we will get a 403 error
19
+ if e.status_code == 401 or e.status_code == 403:
20
+ raise Exception(
21
+ "Please make sure your `VELLUM_API_KEY` environment variable is set correctly." # noqa: E501
22
+ ) from e
18
23
  raise Exception(
19
24
  "The API we tried to ping returned an invalid response. Please make sure your `VELLUM_API_URL` environment variable is set correctly." # noqa: E501
20
25
  )
@@ -2,6 +2,7 @@ from datetime import datetime
2
2
 
3
3
  from click.testing import CliRunner
4
4
 
5
+ from vellum.client.core.api_error import ApiError
5
6
  from vellum.client.types.organization_read import OrganizationRead
6
7
  from vellum.client.types.workspace_read import WorkspaceRead
7
8
  from vellum_cli import main as cli_main
@@ -51,9 +52,6 @@ def test_ping__error_path(vellum_client):
51
52
  # GIVEN a cli
52
53
  runner = CliRunner()
53
54
 
54
- # Mock the workspace_identity method to raise ApiError directly
55
- from vellum.client.core.api_error import ApiError
56
-
57
55
  vellum_client.workspaces.workspace_identity.side_effect = ApiError(status_code=400, body="Invalid JSON")
58
56
 
59
57
  # WHEN the user runs the ping command
@@ -65,3 +63,20 @@ def test_ping__error_path(vellum_client):
65
63
  str(result.exception)
66
64
  == "The API we tried to ping returned an invalid response. Please make sure your `VELLUM_API_URL` environment variable is set correctly." # noqa: E501
67
65
  )
66
+
67
+
68
+ def test_ping__unauthorized_error_path(vellum_client):
69
+ # GIVEN a cli
70
+ runner = CliRunner()
71
+
72
+ # GIVEN an unauthorized error with the error message from the API
73
+ vellum_client.workspaces.workspace_identity.side_effect = ApiError(
74
+ status_code=403, body={"detail": "Authentication credentials were not provided."}
75
+ )
76
+
77
+ # WHEN the user runs the ping command
78
+ result = runner.invoke(cli_main, ["ping"])
79
+
80
+ # THEN the command returns an error
81
+ assert result.exit_code == 1
82
+ assert str(result.exception) == "Please make sure your `VELLUM_API_KEY` environment variable is set correctly."
@@ -1,5 +1,5 @@
1
1
  from uuid import UUID
2
- from typing import ClassVar, Dict, Generic, Optional, TypeVar
2
+ from typing import Generic, Optional, TypeVar
3
3
 
4
4
  from vellum.workflows.nodes import GuardrailNode
5
5
  from vellum.workflows.types.core import JsonObject
@@ -12,8 +12,6 @@ _GuardrailNodeType = TypeVar("_GuardrailNodeType", bound=GuardrailNode)
12
12
 
13
13
 
14
14
  class BaseGuardrailNodeDisplay(BaseNodeVellumDisplay[_GuardrailNodeType], Generic[_GuardrailNodeType]):
15
- metric_input_ids_by_name: ClassVar[Dict[str, UUID]] = {}
16
-
17
15
  def serialize(
18
16
  self, display_context: WorkflowDisplayContext, error_output_id: Optional[UUID] = None, **kwargs
19
17
  ) -> JsonObject:
@@ -27,7 +25,8 @@ class BaseGuardrailNodeDisplay(BaseNodeVellumDisplay[_GuardrailNodeType], Generi
27
25
  input_name=variable_name,
28
26
  value=variable_value,
29
27
  display_context=display_context,
30
- input_id=self.metric_input_ids_by_name.get(variable_name),
28
+ input_id=self.node_input_ids_by_name.get(f"{GuardrailNode.metric_inputs.name}.{variable_name}")
29
+ or self.node_input_ids_by_name.get(variable_name),
31
30
  )
32
31
  for variable_name, variable_value in metric_inputs.items()
33
32
  ]
@@ -7,7 +7,7 @@ from vellum import WorkspaceSecretRead
7
7
  from vellum_ee.workflows.display.workflows import VellumWorkflowDisplay
8
8
  from vellum_ee.workflows.display.workflows.get_vellum_workflow_display_class import get_workflow_display
9
9
 
10
- from tests.workflows.basic_vellum_api_node.workflow import SimpleAPIWorkflow
10
+ from tests.workflows.basic_api_node.workflow import SimpleAPIWorkflow
11
11
 
12
12
 
13
13
  def test_serialize_workflow(vellum_client):
@@ -99,7 +99,7 @@ def test_serialize_workflow(vellum_client):
99
99
  "id": "c3a17ceb-e201-4025-b18a-9162aac7705e",
100
100
  "key": "body",
101
101
  "value": {
102
- "rules": [{"type": "CONSTANT_VALUE", "data": {"type": "JSON", "value": None}}],
102
+ "rules": [{"type": "CONSTANT_VALUE", "data": {"type": "JSON", "value": {"key": "value"}}}],
103
103
  "combinator": "OR",
104
104
  },
105
105
  },
@@ -193,7 +193,7 @@ def test_serialize_workflow(vellum_client):
193
193
  },
194
194
  "definition": {
195
195
  "name": "SimpleAPINode",
196
- "module": ["tests", "workflows", "basic_vellum_api_node", "workflow"],
196
+ "module": ["tests", "workflows", "basic_api_node", "workflow"],
197
197
  },
198
198
  },
199
199
  api_node,
@@ -373,7 +373,7 @@ def test_serialize_workflow(vellum_client):
373
373
  "module": [
374
374
  "tests",
375
375
  "workflows",
376
- "basic_vellum_api_node",
376
+ "basic_api_node",
377
377
  "workflow",
378
378
  ],
379
379
  }
@@ -73,7 +73,7 @@ def test_serialize_workflow():
73
73
  "type": "METRIC",
74
74
  "inputs": [
75
75
  {
76
- "id": "3ec00ee3-c068-4d41-9488-87b7778a649e",
76
+ "id": "e5e9757e-27db-4200-a650-2f7bb2cd61f5",
77
77
  "key": "expected",
78
78
  "value": {
79
79
  "rules": [
@@ -86,7 +86,7 @@ def test_serialize_workflow():
86
86
  },
87
87
  },
88
88
  {
89
- "id": "a43ce7ba-1685-4977-a34d-65580c42853f",
89
+ "id": "f5cd9336-e8e9-429e-b7bc-785402e31bfb",
90
90
  "key": "actual",
91
91
  "value": {
92
92
  "rules": [