vellum-ai 0.14.41__py3-none-any.whl → 1.11.2__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.
Potentially problematic release.
This version of vellum-ai might be problematic. Click here for more details.
- vellum/__init__.py +281 -8
- vellum/client/README.md +70 -17
- vellum/client/__init__.py +598 -1371
- vellum/client/core/__init__.py +5 -0
- vellum/client/core/api_error.py +13 -5
- vellum/client/core/client_wrapper.py +31 -5
- vellum/client/core/file.py +13 -8
- vellum/client/core/force_multipart.py +16 -0
- vellum/client/core/http_client.py +76 -20
- vellum/client/core/http_response.py +55 -0
- vellum/client/core/jsonable_encoder.py +0 -1
- vellum/client/core/pydantic_utilities.py +95 -119
- vellum/client/core/request_options.py +3 -0
- vellum/client/core/serialization.py +7 -3
- vellum/client/errors/__init__.py +14 -1
- vellum/client/errors/bad_request_error.py +4 -3
- vellum/client/errors/forbidden_error.py +4 -3
- vellum/client/errors/internal_server_error.py +4 -3
- vellum/client/errors/misdirected_request_error.py +11 -0
- vellum/client/errors/not_found_error.py +4 -3
- vellum/client/errors/too_many_requests_error.py +11 -0
- vellum/client/errors/unauthorized_error.py +11 -0
- vellum/client/raw_client.py +2725 -0
- vellum/client/reference.md +2489 -1038
- vellum/client/resources/__init__.py +16 -2
- vellum/client/resources/ad_hoc/__init__.py +2 -0
- vellum/client/resources/ad_hoc/client.py +173 -365
- vellum/client/resources/ad_hoc/raw_client.py +569 -0
- vellum/client/resources/container_images/__init__.py +2 -0
- vellum/client/resources/container_images/client.py +72 -185
- vellum/client/resources/container_images/raw_client.py +407 -0
- vellum/client/resources/deployments/__init__.py +2 -0
- vellum/client/resources/deployments/client.py +211 -424
- vellum/client/resources/deployments/raw_client.py +1002 -0
- vellum/client/resources/deployments/types/__init__.py +2 -0
- vellum/client/resources/document_indexes/__init__.py +2 -0
- vellum/client/resources/document_indexes/client.py +131 -365
- vellum/client/resources/document_indexes/raw_client.py +866 -0
- vellum/client/resources/document_indexes/types/__init__.py +2 -0
- vellum/client/resources/documents/__init__.py +2 -0
- vellum/client/resources/documents/client.py +93 -325
- vellum/client/resources/documents/raw_client.py +662 -0
- vellum/client/resources/{release_reviews → environments}/__init__.py +2 -0
- vellum/client/resources/environments/client.py +106 -0
- vellum/client/resources/environments/raw_client.py +95 -0
- vellum/client/resources/events/__init__.py +4 -0
- vellum/client/resources/events/client.py +201 -0
- vellum/client/resources/events/raw_client.py +211 -0
- vellum/client/resources/folder_entities/__init__.py +2 -0
- vellum/client/resources/folder_entities/client.py +56 -89
- vellum/client/resources/folder_entities/raw_client.py +276 -0
- vellum/client/resources/folder_entities/types/__init__.py +2 -0
- vellum/client/resources/integration_auth_configs/__init__.py +4 -0
- vellum/client/resources/integration_auth_configs/client.py +186 -0
- vellum/client/resources/integration_auth_configs/raw_client.py +171 -0
- vellum/client/resources/integration_providers/__init__.py +4 -0
- vellum/client/resources/integration_providers/client.py +299 -0
- vellum/client/resources/integration_providers/raw_client.py +275 -0
- vellum/client/resources/integrations/__init__.py +4 -0
- vellum/client/resources/integrations/client.py +466 -0
- vellum/client/resources/integrations/raw_client.py +557 -0
- vellum/client/resources/metric_definitions/__init__.py +2 -0
- vellum/client/resources/metric_definitions/client.py +60 -100
- vellum/client/resources/metric_definitions/raw_client.py +224 -0
- vellum/client/resources/ml_models/__init__.py +2 -0
- vellum/client/resources/ml_models/client.py +37 -46
- vellum/client/resources/ml_models/raw_client.py +102 -0
- vellum/client/resources/organizations/__init__.py +2 -0
- vellum/client/resources/organizations/client.py +37 -45
- vellum/client/resources/organizations/raw_client.py +95 -0
- vellum/client/resources/prompts/__init__.py +2 -0
- vellum/client/resources/prompts/client.py +210 -95
- vellum/client/resources/prompts/raw_client.py +353 -0
- vellum/client/resources/sandboxes/__init__.py +2 -0
- vellum/client/resources/sandboxes/client.py +69 -147
- vellum/client/resources/sandboxes/raw_client.py +392 -0
- vellum/client/resources/test_suite_runs/__init__.py +2 -0
- vellum/client/resources/test_suite_runs/client.py +65 -151
- vellum/client/resources/test_suite_runs/raw_client.py +354 -0
- vellum/client/resources/test_suites/__init__.py +2 -0
- vellum/client/resources/test_suites/client.py +162 -266
- vellum/client/resources/test_suites/raw_client.py +530 -0
- vellum/client/resources/uploaded_files/__init__.py +4 -0
- vellum/client/resources/uploaded_files/client.py +230 -0
- vellum/client/resources/uploaded_files/raw_client.py +316 -0
- vellum/client/resources/workflow_deployments/__init__.py +2 -0
- vellum/client/resources/workflow_deployments/client.py +312 -355
- vellum/client/resources/workflow_deployments/raw_client.py +1059 -0
- vellum/client/resources/workflow_deployments/types/__init__.py +2 -0
- vellum/client/resources/workflow_executions/__init__.py +4 -0
- vellum/client/resources/workflow_executions/client.py +140 -0
- vellum/client/resources/workflow_executions/raw_client.py +173 -0
- vellum/client/resources/workflow_sandboxes/__init__.py +2 -0
- vellum/client/resources/workflow_sandboxes/client.py +58 -117
- vellum/client/resources/workflow_sandboxes/raw_client.py +291 -0
- vellum/client/resources/workflow_sandboxes/types/__init__.py +2 -0
- vellum/client/resources/workflows/__init__.py +2 -0
- vellum/client/resources/workflows/client.py +258 -141
- vellum/client/resources/workflows/raw_client.py +547 -0
- vellum/client/resources/workspace_secrets/__init__.py +2 -0
- vellum/client/resources/workspace_secrets/client.py +43 -94
- vellum/client/resources/workspace_secrets/raw_client.py +219 -0
- vellum/client/resources/workspaces/__init__.py +2 -0
- vellum/client/resources/workspaces/client.py +37 -45
- vellum/client/resources/workspaces/raw_client.py +95 -0
- vellum/client/tests/__init__.py +0 -0
- vellum/client/tests/test_utils.py +34 -0
- vellum/client/types/__init__.py +254 -4
- vellum/client/types/ad_hoc_execute_prompt_event.py +3 -2
- vellum/client/types/ad_hoc_expand_meta.py +2 -2
- vellum/client/types/ad_hoc_fulfilled_prompt_execution_meta.py +3 -3
- vellum/client/types/ad_hoc_initiated_prompt_execution_meta.py +2 -2
- vellum/client/types/ad_hoc_rejected_prompt_execution_meta.py +3 -3
- vellum/client/types/ad_hoc_streaming_prompt_execution_meta.py +2 -2
- vellum/client/types/api_actor_type_enum.py +7 -0
- vellum/client/types/api_node_result.py +3 -3
- vellum/client/types/api_node_result_data.py +4 -4
- vellum/client/types/api_request_parent_context.py +18 -17
- vellum/client/types/api_version_enum.py +1 -1
- vellum/client/types/array_chat_message_content.py +3 -3
- vellum/client/types/array_chat_message_content_item.py +7 -4
- vellum/client/types/array_chat_message_content_item_request.py +7 -4
- vellum/client/types/array_chat_message_content_request.py +3 -3
- vellum/client/types/array_input.py +9 -8
- vellum/client/types/array_vellum_value.py +4 -4
- vellum/client/types/array_vellum_value_request.py +4 -4
- vellum/client/types/audio_chat_message_content.py +3 -3
- vellum/client/types/audio_chat_message_content_request.py +3 -3
- vellum/client/types/audio_input.py +30 -0
- vellum/client/types/audio_input_request.py +30 -0
- vellum/client/types/audio_prompt_block.py +4 -4
- vellum/client/types/audio_vellum_value.py +3 -3
- vellum/client/types/audio_vellum_value_request.py +3 -3
- vellum/client/types/auth_type_enum.py +5 -0
- vellum/client/types/base_output.py +4 -4
- vellum/client/types/basic_vectorizer_intfloat_multilingual_e_5_large.py +2 -2
- vellum/client/types/basic_vectorizer_intfloat_multilingual_e_5_large_request.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1_request.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1.py +2 -2
- vellum/client/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request.py +2 -2
- vellum/client/types/build_status_enum.py +5 -0
- vellum/client/types/chat_history_input.py +3 -3
- vellum/client/types/chat_history_input_request.py +3 -3
- vellum/client/types/chat_history_vellum_value.py +3 -3
- vellum/client/types/chat_history_vellum_value_request.py +3 -3
- vellum/client/types/chat_message.py +4 -4
- vellum/client/types/chat_message_content.py +7 -4
- vellum/client/types/chat_message_content_request.py +7 -4
- vellum/client/types/chat_message_prompt_block.py +7 -7
- vellum/client/types/chat_message_request.py +4 -4
- vellum/client/types/code_execution_node_array_result.py +8 -7
- vellum/client/types/code_execution_node_chat_history_result.py +3 -3
- vellum/client/types/code_execution_node_error_result.py +3 -3
- vellum/client/types/code_execution_node_function_call_result.py +3 -3
- vellum/client/types/code_execution_node_json_result.py +2 -2
- vellum/client/types/code_execution_node_number_result.py +2 -2
- vellum/client/types/code_execution_node_result.py +7 -6
- vellum/client/types/code_execution_node_result_data.py +7 -6
- vellum/client/types/code_execution_node_result_output.py +6 -5
- vellum/client/types/code_execution_node_search_results_result.py +3 -3
- vellum/client/types/code_execution_node_string_result.py +2 -2
- vellum/client/types/code_execution_package.py +3 -2
- vellum/client/types/code_executor_input.py +15 -6
- vellum/client/types/code_executor_response.py +8 -7
- vellum/client/types/code_executor_secret_input.py +3 -3
- vellum/client/types/code_resource_definition.py +3 -3
- vellum/client/types/compile_prompt_deployment_expand_meta_request.py +2 -2
- vellum/client/types/compile_prompt_meta.py +2 -2
- vellum/client/types/components_schemas_composio_execute_tool_request.py +5 -0
- vellum/client/types/components_schemas_composio_execute_tool_response.py +5 -0
- vellum/client/types/components_schemas_composio_integration_exec_config.py +5 -0
- vellum/client/types/components_schemas_composio_tool_definition.py +5 -0
- vellum/client/types/components_schemas_prompt_version_build_config_sandbox.py +5 -0
- vellum/client/types/components_schemas_slim_composio_tool_definition.py +5 -0
- vellum/client/types/composio_execute_tool_request.py +24 -0
- vellum/client/types/composio_execute_tool_response.py +24 -0
- vellum/client/types/composio_integration_exec_config.py +21 -0
- vellum/client/types/composio_tool_definition.py +30 -0
- vellum/client/types/conditional_node_result.py +3 -3
- vellum/client/types/conditional_node_result_data.py +2 -2
- vellum/client/types/container_image_build_config.py +21 -0
- vellum/client/types/container_image_container_image_tag.py +2 -2
- vellum/client/types/container_image_read.py +8 -4
- vellum/client/types/create_test_suite_test_case_request.py +6 -5
- vellum/client/types/create_workflow_event_request.py +7 -0
- vellum/client/types/dataset_row_push_request.py +20 -0
- vellum/client/types/delimiter_chunker_config.py +20 -0
- vellum/client/types/delimiter_chunker_config_request.py +20 -0
- vellum/client/types/delimiter_chunking.py +21 -0
- vellum/client/types/delimiter_chunking_request.py +21 -0
- vellum/client/types/deployment_history_item.py +7 -6
- vellum/client/types/deployment_provider_payload_response.py +4 -4
- vellum/client/types/deployment_read.py +14 -13
- vellum/client/types/deployment_release_tag_deployment_history_item.py +2 -2
- vellum/client/types/deployment_release_tag_read.py +4 -4
- vellum/client/types/deprecated_prompt_request_input.py +8 -0
- vellum/client/types/docker_service_token.py +2 -2
- vellum/client/types/document_chat_message_content.py +3 -3
- vellum/client/types/document_chat_message_content_request.py +3 -3
- vellum/client/types/document_document_to_document_index.py +9 -4
- vellum/client/types/document_index_chunking.py +5 -1
- vellum/client/types/document_index_chunking_request.py +3 -1
- vellum/client/types/document_index_indexing_config.py +4 -4
- vellum/client/types/document_index_indexing_config_request.py +4 -4
- vellum/client/types/document_index_read.py +4 -4
- vellum/client/types/document_input.py +30 -0
- vellum/client/types/document_input_request.py +30 -0
- vellum/client/types/document_prompt_block.py +4 -4
- vellum/client/types/document_read.py +9 -5
- vellum/client/types/document_vellum_value.py +3 -3
- vellum/client/types/document_vellum_value_request.py +3 -3
- vellum/client/types/enriched_normalized_completion.py +3 -3
- vellum/client/types/environment_display_config.py +19 -0
- vellum/client/types/environment_read.py +23 -0
- vellum/client/types/ephemeral_prompt_cache_config.py +3 -3
- vellum/client/types/error_detail_response.py +22 -0
- vellum/client/types/error_input.py +3 -3
- vellum/client/types/error_vellum_value.py +3 -3
- vellum/client/types/error_vellum_value_request.py +3 -3
- vellum/client/types/event_create_response.py +31 -0
- vellum/client/types/execute_api_request_bearer_token.py +1 -0
- vellum/client/types/execute_api_request_body.py +3 -1
- vellum/client/types/execute_api_request_headers_value.py +1 -0
- vellum/client/types/execute_api_response.py +6 -7
- vellum/client/types/execute_api_response_json.py +7 -0
- vellum/client/types/execute_prompt_event.py +3 -2
- vellum/client/types/execute_prompt_response.py +1 -0
- vellum/client/types/execute_workflow_async_response.py +26 -0
- vellum/client/types/execute_workflow_response.py +7 -6
- vellum/client/types/execute_workflow_workflow_result_event.py +1 -0
- vellum/client/types/execution_array_vellum_value.py +9 -8
- vellum/client/types/execution_audio_vellum_value.py +31 -0
- vellum/client/types/execution_chat_history_vellum_value.py +3 -3
- vellum/client/types/execution_document_vellum_value.py +31 -0
- vellum/client/types/execution_error_vellum_value.py +3 -3
- vellum/client/types/execution_function_call_vellum_value.py +3 -3
- vellum/client/types/execution_image_vellum_value.py +31 -0
- vellum/client/types/execution_json_vellum_value.py +3 -3
- vellum/client/types/execution_number_vellum_value.py +3 -3
- vellum/client/types/execution_search_results_vellum_value.py +3 -3
- vellum/client/types/execution_string_vellum_value.py +3 -3
- vellum/client/types/execution_thinking_vellum_value.py +31 -0
- vellum/client/types/execution_vellum_value.py +16 -5
- vellum/client/types/execution_video_vellum_value.py +31 -0
- vellum/client/types/external_input_descriptor.py +3 -3
- vellum/client/types/external_parent_context.py +38 -0
- vellum/client/types/external_test_case_execution.py +7 -6
- vellum/client/types/external_test_case_execution_request.py +7 -6
- vellum/client/types/fast_embed_vectorizer_baai_bge_small_en_v_15.py +23 -0
- vellum/client/types/fast_embed_vectorizer_baai_bge_small_en_v_15_request.py +23 -0
- vellum/client/types/folder_entity.py +5 -2
- vellum/client/types/folder_entity_dataset.py +26 -0
- vellum/client/types/folder_entity_dataset_data.py +25 -0
- vellum/client/types/folder_entity_document_index.py +3 -3
- vellum/client/types/folder_entity_document_index_data.py +5 -3
- vellum/client/types/folder_entity_folder.py +3 -3
- vellum/client/types/folder_entity_folder_data.py +2 -2
- vellum/client/types/folder_entity_prompt_sandbox.py +3 -3
- vellum/client/types/folder_entity_prompt_sandbox_data.py +4 -3
- vellum/client/types/folder_entity_test_suite.py +3 -3
- vellum/client/types/folder_entity_test_suite_data.py +3 -3
- vellum/client/types/folder_entity_workflow_sandbox.py +3 -3
- vellum/client/types/folder_entity_workflow_sandbox_data.py +6 -3
- vellum/client/types/fulfilled_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/fulfilled_execute_prompt_event.py +4 -4
- vellum/client/types/fulfilled_execute_prompt_response.py +3 -3
- vellum/client/types/fulfilled_execute_workflow_workflow_result_event.py +8 -9
- vellum/client/types/fulfilled_prompt_execution_meta.py +3 -3
- vellum/client/types/fulfilled_workflow_node_result_event.py +9 -8
- vellum/client/types/function_call.py +2 -2
- vellum/client/types/function_call_chat_message_content.py +3 -3
- vellum/client/types/function_call_chat_message_content_request.py +3 -3
- vellum/client/types/function_call_chat_message_content_value.py +2 -2
- vellum/client/types/function_call_chat_message_content_value_request.py +2 -2
- vellum/client/types/function_call_input.py +3 -3
- vellum/client/types/function_call_prompt_block.py +4 -4
- vellum/client/types/function_call_request.py +2 -2
- vellum/client/types/function_call_vellum_value.py +3 -3
- vellum/client/types/function_call_vellum_value_request.py +3 -3
- vellum/client/types/function_definition.py +9 -4
- vellum/client/types/generate_options_request.py +3 -3
- vellum/client/types/generate_request.py +2 -2
- vellum/client/types/generate_response.py +3 -3
- vellum/client/types/generate_result.py +3 -3
- vellum/client/types/generate_result_data.py +3 -3
- vellum/client/types/generate_result_error.py +3 -3
- vellum/client/types/generate_stream_response.py +3 -3
- vellum/client/types/generate_stream_result.py +4 -4
- vellum/client/types/generate_stream_result_data.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_config.py +2 -2
- vellum/client/types/google_vertex_ai_vectorizer_config_request.py +2 -2
- vellum/client/types/google_vertex_ai_vectorizer_gemini_embedding_001.py +21 -0
- vellum/client/types/google_vertex_ai_vectorizer_gemini_embedding_001_request.py +21 -0
- vellum/client/types/google_vertex_ai_vectorizer_text_embedding_004.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_embedding_004_request.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002.py +3 -3
- vellum/client/types/google_vertex_ai_vectorizer_text_multilingual_embedding_002_request.py +3 -3
- vellum/client/types/hkunlp_instructor_xl_vectorizer.py +3 -3
- vellum/client/types/hkunlp_instructor_xl_vectorizer_request.py +3 -3
- vellum/client/types/image_chat_message_content.py +3 -3
- vellum/client/types/image_chat_message_content_request.py +3 -3
- vellum/client/types/image_input.py +30 -0
- vellum/client/types/image_input_request.py +30 -0
- vellum/client/types/image_prompt_block.py +4 -4
- vellum/client/types/image_vellum_value.py +3 -3
- vellum/client/types/image_vellum_value_request.py +3 -3
- vellum/client/types/indexing_config_vectorizer.py +11 -4
- vellum/client/types/indexing_config_vectorizer_request.py +11 -4
- vellum/client/types/initiated_ad_hoc_execute_prompt_event.py +3 -3
- vellum/client/types/initiated_execute_prompt_event.py +3 -3
- vellum/client/types/initiated_prompt_execution_meta.py +2 -2
- vellum/client/types/initiated_workflow_node_result_event.py +9 -8
- vellum/client/types/instructor_vectorizer_config.py +2 -2
- vellum/client/types/instructor_vectorizer_config_request.py +2 -2
- vellum/client/types/integration.py +27 -0
- vellum/client/types/integration_auth_config_integration.py +23 -0
- vellum/client/types/integration_auth_config_integration_credential.py +19 -0
- vellum/client/types/integration_credential_access_type.py +5 -0
- vellum/client/types/integration_name.py +85 -0
- vellum/client/types/integration_provider.py +5 -0
- vellum/client/types/integration_read.py +30 -0
- vellum/client/types/integration_trigger_context.py +39 -0
- vellum/client/types/invoked_port.py +2 -2
- vellum/client/types/jinja_prompt_block.py +4 -4
- vellum/client/types/json_input.py +3 -3
- vellum/client/types/json_input_request.py +3 -3
- vellum/client/types/json_vellum_value.py +2 -2
- vellum/client/types/json_vellum_value_request.py +2 -2
- vellum/client/types/logical_operator.py +4 -0
- vellum/client/types/map_node_result.py +3 -3
- vellum/client/types/map_node_result_data.py +3 -3
- vellum/client/types/merge_node_result.py +3 -3
- vellum/client/types/merge_node_result_data.py +2 -2
- vellum/client/types/metadata_filter_config_request.py +9 -8
- vellum/client/types/metadata_filter_rule_request.py +5 -5
- vellum/client/types/metadata_filters_request.py +1 -0
- vellum/client/types/metric_definition_execution.py +7 -6
- vellum/client/types/metric_definition_history_item.py +7 -6
- vellum/client/types/metric_definition_input.py +3 -2
- vellum/client/types/metric_node_result.py +2 -2
- vellum/client/types/ml_model_read.py +6 -3
- vellum/client/types/ml_model_usage.py +2 -2
- vellum/client/types/ml_model_usage_wrapper.py +4 -4
- vellum/client/types/named_scenario_input_audio_variable_value_request.py +22 -0
- vellum/client/types/named_scenario_input_chat_history_variable_value_request.py +3 -3
- vellum/client/types/named_scenario_input_document_variable_value_request.py +22 -0
- vellum/client/types/named_scenario_input_image_variable_value_request.py +22 -0
- vellum/client/types/named_scenario_input_json_variable_value_request.py +2 -2
- vellum/client/types/named_scenario_input_request.py +11 -2
- vellum/client/types/named_scenario_input_string_variable_value_request.py +2 -2
- vellum/client/types/named_scenario_input_video_variable_value_request.py +22 -0
- vellum/client/types/named_test_case_array_variable_value.py +8 -7
- vellum/client/types/named_test_case_array_variable_value_request.py +8 -9
- vellum/client/types/named_test_case_audio_variable_value.py +26 -0
- vellum/client/types/named_test_case_audio_variable_value_request.py +26 -0
- vellum/client/types/named_test_case_chat_history_variable_value.py +3 -3
- vellum/client/types/named_test_case_chat_history_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_document_variable_value.py +22 -0
- vellum/client/types/named_test_case_document_variable_value_request.py +22 -0
- vellum/client/types/named_test_case_error_variable_value.py +3 -3
- vellum/client/types/named_test_case_error_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_function_call_variable_value.py +3 -3
- vellum/client/types/named_test_case_function_call_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_image_variable_value.py +22 -0
- vellum/client/types/named_test_case_image_variable_value_request.py +22 -0
- vellum/client/types/named_test_case_json_variable_value.py +2 -2
- vellum/client/types/named_test_case_json_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_number_variable_value.py +2 -2
- vellum/client/types/named_test_case_number_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_search_results_variable_value.py +3 -3
- vellum/client/types/named_test_case_search_results_variable_value_request.py +3 -3
- vellum/client/types/named_test_case_string_variable_value.py +2 -2
- vellum/client/types/named_test_case_string_variable_value_request.py +2 -2
- vellum/client/types/named_test_case_variable_value.py +14 -5
- vellum/client/types/named_test_case_variable_value_request.py +14 -5
- vellum/client/types/named_test_case_video_variable_value.py +22 -0
- vellum/client/types/named_test_case_video_variable_value_request.py +22 -0
- vellum/client/types/node_execution_fulfilled_body.py +4 -4
- vellum/client/types/node_execution_fulfilled_event.py +21 -23
- vellum/client/types/node_execution_initiated_body.py +3 -3
- vellum/client/types/node_execution_initiated_event.py +21 -23
- vellum/client/types/node_execution_paused_body.py +3 -3
- vellum/client/types/node_execution_paused_event.py +21 -23
- vellum/client/types/node_execution_rejected_body.py +5 -4
- vellum/client/types/node_execution_rejected_event.py +21 -23
- vellum/client/types/node_execution_resumed_body.py +3 -3
- vellum/client/types/node_execution_resumed_event.py +21 -23
- vellum/client/types/node_execution_span.py +20 -20
- vellum/client/types/node_execution_span_attributes.py +4 -2
- vellum/client/types/node_execution_streaming_body.py +4 -4
- vellum/client/types/node_execution_streaming_event.py +21 -23
- vellum/client/types/node_input_compiled_array_value.py +8 -7
- vellum/client/types/node_input_compiled_audio_value.py +23 -0
- vellum/client/types/node_input_compiled_chat_history_value.py +3 -3
- vellum/client/types/node_input_compiled_document_value.py +23 -0
- vellum/client/types/node_input_compiled_error_value.py +3 -3
- vellum/client/types/node_input_compiled_function_call_value.py +3 -3
- vellum/client/types/node_input_compiled_image_value.py +23 -0
- vellum/client/types/node_input_compiled_json_value.py +2 -2
- vellum/client/types/node_input_compiled_number_value.py +2 -2
- vellum/client/types/node_input_compiled_search_results_value.py +3 -3
- vellum/client/types/node_input_compiled_secret_value.py +3 -3
- vellum/client/types/node_input_compiled_string_value.py +2 -2
- vellum/client/types/node_input_compiled_video_value.py +23 -0
- vellum/client/types/node_input_variable_compiled_value.py +14 -5
- vellum/client/types/node_output_compiled_array_value.py +9 -8
- vellum/client/types/node_output_compiled_chat_history_value.py +3 -3
- vellum/client/types/node_output_compiled_error_value.py +3 -3
- vellum/client/types/node_output_compiled_function_call_value.py +3 -3
- vellum/client/types/node_output_compiled_json_value.py +3 -3
- vellum/client/types/node_output_compiled_number_value.py +3 -3
- vellum/client/types/node_output_compiled_search_results_value.py +3 -3
- vellum/client/types/node_output_compiled_string_value.py +3 -3
- vellum/client/types/node_output_compiled_thinking_value.py +28 -0
- vellum/client/types/node_output_compiled_value.py +8 -5
- vellum/client/types/node_parent_context.py +15 -18
- vellum/client/types/normalized_log_probs.py +3 -3
- vellum/client/types/normalized_token_log_probs.py +2 -2
- vellum/client/types/number_input.py +3 -3
- vellum/client/types/number_vellum_value.py +2 -2
- vellum/client/types/number_vellum_value_request.py +2 -2
- vellum/client/types/open_ai_vectorizer_config.py +3 -3
- vellum/client/types/open_ai_vectorizer_config_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_large.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_large_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_small.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_3_small_request.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_ada_002.py +3 -3
- vellum/client/types/open_ai_vectorizer_text_embedding_ada_002_request.py +3 -3
- vellum/client/types/organization_read.py +6 -3
- vellum/client/types/paginated_container_image_read_list.py +3 -3
- vellum/client/types/paginated_deployment_release_tag_read_list.py +3 -3
- vellum/client/types/paginated_document_index_read_list.py +3 -3
- vellum/client/types/paginated_folder_entity_list.py +3 -3
- vellum/client/types/paginated_slim_deployment_read_list.py +7 -6
- vellum/client/types/paginated_slim_document_list.py +3 -3
- vellum/client/types/paginated_slim_integration_auth_config_read_list.py +23 -0
- vellum/client/types/paginated_slim_integration_read_list.py +23 -0
- vellum/client/types/paginated_slim_tool_definition_list.py +23 -0
- vellum/client/types/paginated_slim_workflow_deployment_list.py +7 -6
- vellum/client/types/paginated_test_suite_run_execution_list.py +7 -6
- vellum/client/types/paginated_test_suite_test_case_list.py +7 -6
- vellum/client/types/paginated_workflow_deployment_release_list.py +30 -0
- vellum/client/types/paginated_workflow_release_tag_read_list.py +3 -3
- vellum/client/types/paginated_workflow_sandbox_example_list.py +3 -3
- vellum/client/types/parent_context.py +21 -11
- vellum/client/types/pdf_search_result_meta_source.py +2 -2
- vellum/client/types/pdf_search_result_meta_source_request.py +2 -2
- vellum/client/types/plain_text_prompt_block.py +4 -4
- vellum/client/types/price.py +3 -3
- vellum/client/types/private_vectorizer.py +23 -0
- vellum/client/types/private_vectorizer_request.py +23 -0
- vellum/client/types/processing_failure_reason_enum.py +3 -1
- vellum/client/types/prompt_block.py +9 -6
- vellum/client/types/prompt_deployment_expand_meta_request.py +2 -2
- vellum/client/types/prompt_deployment_input_request.py +16 -3
- vellum/client/types/prompt_deployment_parent_context.py +14 -17
- vellum/client/types/prompt_deployment_release.py +6 -6
- vellum/client/types/prompt_deployment_release_prompt_deployment.py +2 -2
- vellum/client/types/prompt_deployment_release_prompt_version.py +7 -2
- vellum/client/types/prompt_exec_config.py +12 -12
- vellum/client/types/prompt_execution_meta.py +3 -3
- vellum/client/types/prompt_node_execution_meta.py +3 -3
- vellum/client/types/prompt_node_result.py +3 -3
- vellum/client/types/prompt_node_result_data.py +3 -3
- vellum/client/types/prompt_output.py +7 -3
- vellum/client/types/prompt_parameters.py +2 -2
- vellum/client/types/prompt_push_response.py +20 -0
- vellum/client/types/prompt_request_audio_input.py +26 -0
- vellum/client/types/prompt_request_chat_history_input.py +3 -3
- vellum/client/types/prompt_request_document_input.py +26 -0
- vellum/client/types/prompt_request_image_input.py +26 -0
- vellum/client/types/prompt_request_input.py +16 -3
- vellum/client/types/prompt_request_json_input.py +3 -3
- vellum/client/types/prompt_request_string_input.py +3 -3
- vellum/client/types/prompt_request_video_input.py +26 -0
- vellum/client/types/prompt_settings.py +3 -2
- vellum/client/types/prompt_version_build_config_sandbox.py +22 -0
- vellum/client/types/raw_prompt_execution_overrides_request.py +2 -2
- vellum/client/types/reducto_chunker_config.py +2 -2
- vellum/client/types/reducto_chunker_config_request.py +2 -2
- vellum/client/types/reducto_chunking.py +3 -3
- vellum/client/types/reducto_chunking_request.py +3 -3
- vellum/client/types/rejected_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/rejected_execute_prompt_event.py +4 -4
- vellum/client/types/rejected_execute_prompt_response.py +3 -3
- vellum/client/types/rejected_execute_workflow_workflow_result_event.py +4 -4
- vellum/client/types/rejected_prompt_execution_meta.py +3 -3
- vellum/client/types/rejected_workflow_node_result_event.py +9 -8
- vellum/client/types/release_created_by.py +2 -2
- vellum/client/types/release_environment.py +2 -2
- vellum/client/types/release_release_tag.py +3 -3
- vellum/client/types/release_review_reviewer.py +2 -2
- vellum/client/types/release_tag_release.py +2 -2
- vellum/client/types/replace_test_suite_test_case_request.py +6 -5
- vellum/client/types/rich_text_child_block.py +2 -1
- vellum/client/types/rich_text_prompt_block.py +4 -4
- vellum/client/types/sandbox_scenario.py +3 -3
- vellum/client/types/scenario_input.py +14 -3
- vellum/client/types/scenario_input_audio_variable_value.py +22 -0
- vellum/client/types/scenario_input_chat_history_variable_value.py +3 -3
- vellum/client/types/scenario_input_document_variable_value.py +22 -0
- vellum/client/types/scenario_input_image_variable_value.py +22 -0
- vellum/client/types/scenario_input_json_variable_value.py +2 -2
- vellum/client/types/scenario_input_string_variable_value.py +2 -2
- vellum/client/types/scenario_input_video_variable_value.py +22 -0
- vellum/client/types/scheduled_trigger_context.py +39 -0
- vellum/client/types/search_filters_request.py +8 -9
- vellum/client/types/search_node_result.py +3 -3
- vellum/client/types/search_node_result_data.py +3 -3
- vellum/client/types/search_request_options_request.py +10 -11
- vellum/client/types/search_response.py +3 -3
- vellum/client/types/search_result.py +3 -3
- vellum/client/types/search_result_document.py +2 -2
- vellum/client/types/search_result_document_request.py +2 -2
- vellum/client/types/search_result_merging_request.py +2 -2
- vellum/client/types/search_result_meta.py +3 -3
- vellum/client/types/search_result_meta_request.py +3 -3
- vellum/client/types/search_result_request.py +3 -3
- vellum/client/types/search_results_input.py +3 -3
- vellum/client/types/search_results_vellum_value.py +3 -3
- vellum/client/types/search_results_vellum_value_request.py +3 -3
- vellum/client/types/search_weights_request.py +2 -2
- vellum/client/types/secret_type_enum.py +3 -1
- vellum/client/types/sentence_chunker_config.py +2 -2
- vellum/client/types/sentence_chunker_config_request.py +2 -2
- vellum/client/types/sentence_chunking.py +3 -3
- vellum/client/types/sentence_chunking_request.py +3 -3
- vellum/client/types/slim_composio_tool_definition.py +24 -0
- vellum/client/types/slim_deployment_read.py +12 -11
- vellum/client/types/slim_document.py +6 -5
- vellum/client/types/slim_document_document_to_document_index.py +9 -4
- vellum/client/types/slim_integration_auth_config_read.py +36 -0
- vellum/client/types/slim_integration_read.py +25 -0
- vellum/client/types/slim_release_review.py +4 -4
- vellum/client/types/slim_workflow_deployment.py +13 -12
- vellum/client/types/slim_workflow_execution_read.py +21 -24
- vellum/client/types/span_link.py +16 -19
- vellum/client/types/span_link_type_enum.py +1 -1
- vellum/client/types/streaming_ad_hoc_execute_prompt_event.py +4 -4
- vellum/client/types/streaming_execute_prompt_event.py +3 -3
- vellum/client/types/streaming_prompt_execution_meta.py +2 -2
- vellum/client/types/streaming_workflow_node_result_event.py +9 -8
- vellum/client/types/string_chat_message_content.py +2 -2
- vellum/client/types/string_chat_message_content_request.py +2 -2
- vellum/client/types/string_input.py +3 -3
- vellum/client/types/string_input_request.py +3 -3
- vellum/client/types/string_vellum_value.py +2 -2
- vellum/client/types/string_vellum_value_request.py +2 -2
- vellum/client/types/submit_completion_actual_request.py +3 -3
- vellum/client/types/submit_workflow_execution_actual_request.py +3 -2
- vellum/client/types/subworkflow_node_result.py +3 -3
- vellum/client/types/subworkflow_node_result_data.py +2 -2
- vellum/client/types/templating_node_array_result.py +8 -7
- vellum/client/types/templating_node_chat_history_result.py +3 -3
- vellum/client/types/templating_node_error_result.py +3 -3
- vellum/client/types/templating_node_function_call_result.py +3 -3
- vellum/client/types/templating_node_json_result.py +2 -2
- vellum/client/types/templating_node_number_result.py +2 -2
- vellum/client/types/templating_node_result.py +7 -6
- vellum/client/types/templating_node_result_data.py +7 -6
- vellum/client/types/templating_node_result_output.py +6 -5
- vellum/client/types/templating_node_search_results_result.py +3 -3
- vellum/client/types/templating_node_string_result.py +2 -2
- vellum/client/types/terminal_node_array_result.py +8 -7
- vellum/client/types/terminal_node_chat_history_result.py +2 -2
- vellum/client/types/terminal_node_error_result.py +2 -2
- vellum/client/types/terminal_node_function_call_result.py +2 -2
- vellum/client/types/terminal_node_json_result.py +2 -2
- vellum/client/types/terminal_node_number_result.py +2 -2
- vellum/client/types/terminal_node_result.py +7 -6
- vellum/client/types/terminal_node_result_data.py +7 -6
- vellum/client/types/terminal_node_result_output.py +6 -5
- vellum/client/types/terminal_node_search_results_result.py +2 -2
- vellum/client/types/terminal_node_string_result.py +2 -2
- vellum/client/types/test_case_array_variable_value.py +8 -7
- vellum/client/types/test_case_audio_variable_value.py +27 -0
- vellum/client/types/test_case_chat_history_variable_value.py +3 -3
- vellum/client/types/test_case_document_variable_value.py +27 -0
- vellum/client/types/test_case_error_variable_value.py +3 -3
- vellum/client/types/test_case_function_call_variable_value.py +3 -3
- vellum/client/types/test_case_image_variable_value.py +27 -0
- vellum/client/types/test_case_json_variable_value.py +2 -2
- vellum/client/types/test_case_number_variable_value.py +2 -2
- vellum/client/types/test_case_search_results_variable_value.py +3 -3
- vellum/client/types/test_case_string_variable_value.py +2 -2
- vellum/client/types/test_case_variable_value.py +14 -5
- vellum/client/types/test_case_video_variable_value.py +27 -0
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_deployment_release_tag_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_exec_config.py +2 -1
- vellum/client/types/test_suite_run_exec_config_request.py +2 -1
- vellum/client/types/test_suite_run_execution.py +8 -7
- vellum/client/types/test_suite_run_execution_array_output.py +8 -7
- vellum/client/types/test_suite_run_execution_chat_history_output.py +3 -3
- vellum/client/types/test_suite_run_execution_error_output.py +3 -3
- vellum/client/types/test_suite_run_execution_function_call_output.py +3 -3
- vellum/client/types/test_suite_run_execution_json_output.py +2 -2
- vellum/client/types/test_suite_run_execution_metric_definition.py +2 -2
- vellum/client/types/test_suite_run_execution_metric_result.py +8 -7
- vellum/client/types/test_suite_run_execution_number_output.py +2 -2
- vellum/client/types/test_suite_run_execution_output.py +6 -5
- vellum/client/types/test_suite_run_execution_search_results_output.py +3 -3
- vellum/client/types/test_suite_run_execution_string_output.py +2 -2
- vellum/client/types/test_suite_run_external_exec_config.py +7 -6
- vellum/client/types/test_suite_run_external_exec_config_data.py +7 -6
- vellum/client/types/test_suite_run_external_exec_config_data_request.py +7 -8
- vellum/client/types/test_suite_run_external_exec_config_request.py +7 -8
- vellum/client/types/test_suite_run_metric_array_output.py +8 -7
- vellum/client/types/test_suite_run_metric_error_output.py +3 -3
- vellum/client/types/test_suite_run_metric_json_output.py +2 -2
- vellum/client/types/test_suite_run_metric_number_output.py +2 -2
- vellum/client/types/test_suite_run_metric_output.py +5 -4
- vellum/client/types/test_suite_run_metric_string_output.py +2 -2
- vellum/client/types/test_suite_run_progress.py +2 -2
- vellum/client/types/test_suite_run_prompt_sandbox_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_read.py +9 -8
- vellum/client/types/test_suite_run_test_suite.py +2 -2
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_release_tag_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_exec_config_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_data_request.py +3 -3
- vellum/client/types/test_suite_run_workflow_sandbox_history_item_exec_config_request.py +3 -3
- vellum/client/types/test_suite_test_case.py +7 -6
- vellum/client/types/test_suite_test_case_bulk_operation_request.py +2 -1
- vellum/client/types/test_suite_test_case_bulk_result.py +2 -1
- vellum/client/types/test_suite_test_case_create_bulk_operation_request.py +7 -8
- vellum/client/types/test_suite_test_case_created_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_created_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_delete_bulk_operation_data_request.py +2 -2
- vellum/client/types/test_suite_test_case_delete_bulk_operation_request.py +3 -3
- vellum/client/types/test_suite_test_case_deleted_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_deleted_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_rejected_bulk_result.py +2 -2
- vellum/client/types/test_suite_test_case_replace_bulk_operation_request.py +7 -8
- vellum/client/types/test_suite_test_case_replaced_bulk_result.py +3 -3
- vellum/client/types/test_suite_test_case_replaced_bulk_result_data.py +2 -2
- vellum/client/types/test_suite_test_case_upsert_bulk_operation_request.py +7 -8
- vellum/client/types/thinking_vellum_value.py +25 -0
- vellum/client/types/thinking_vellum_value_request.py +25 -0
- vellum/client/types/token_overlapping_window_chunker_config.py +2 -2
- vellum/client/types/token_overlapping_window_chunker_config_request.py +2 -2
- vellum/client/types/token_overlapping_window_chunking.py +3 -3
- vellum/client/types/token_overlapping_window_chunking_request.py +3 -3
- vellum/client/types/update_active_workspace_response.py +32 -0
- vellum/client/types/upload_document_response.py +3 -3
- vellum/client/types/uploaded_file_read.py +27 -0
- vellum/client/types/upsert_test_suite_test_case_request.py +6 -5
- vellum/client/types/variable_prompt_block.py +11 -4
- vellum/client/types/vellum_audio.py +5 -4
- vellum/client/types/vellum_audio_request.py +3 -3
- vellum/client/types/vellum_code_resource_definition.py +7 -2
- vellum/client/types/vellum_document.py +9 -4
- vellum/client/types/vellum_document_request.py +7 -3
- vellum/client/types/vellum_error.py +5 -4
- vellum/client/types/vellum_error_code_enum.py +6 -0
- vellum/client/types/vellum_error_request.py +5 -4
- vellum/client/types/vellum_image.py +9 -4
- vellum/client/types/vellum_image_request.py +7 -3
- vellum/client/types/vellum_node_execution_event.py +4 -3
- vellum/client/types/vellum_sdk_error.py +4 -3
- vellum/client/types/vellum_sdk_error_code_enum.py +5 -0
- vellum/client/types/vellum_secret.py +2 -2
- vellum/client/types/vellum_span.py +2 -1
- vellum/client/types/vellum_value.py +13 -8
- vellum/client/types/vellum_value_logical_condition_group_request.py +6 -9
- vellum/client/types/vellum_value_logical_condition_request.py +10 -9
- vellum/client/types/vellum_value_logical_expression_request.py +2 -1
- vellum/client/types/vellum_value_request.py +13 -8
- vellum/client/types/vellum_variable.py +10 -9
- vellum/client/types/vellum_variable_extensions.py +3 -2
- vellum/client/types/vellum_variable_type.py +3 -1
- vellum/client/types/vellum_video.py +25 -0
- vellum/client/types/vellum_video_request.py +24 -0
- vellum/client/types/vellum_workflow_execution_event.py +4 -3
- vellum/client/types/video_chat_message_content.py +25 -0
- vellum/client/types/video_chat_message_content_request.py +25 -0
- vellum/client/types/video_input.py +30 -0
- vellum/client/types/video_input_request.py +30 -0
- vellum/client/types/video_prompt_block.py +29 -0
- vellum/client/types/video_vellum_value.py +25 -0
- vellum/client/types/video_vellum_value_request.py +25 -0
- vellum/client/types/workflow_deployment_display_data.py +27 -0
- vellum/client/types/workflow_deployment_event_executions_response.py +17 -34
- vellum/client/types/workflow_deployment_history_item.py +7 -6
- vellum/client/types/workflow_deployment_parent_context.py +14 -17
- vellum/client/types/workflow_deployment_read.py +19 -12
- vellum/client/types/workflow_deployment_release.py +10 -9
- vellum/client/types/workflow_deployment_release_workflow_deployment.py +2 -2
- vellum/client/types/workflow_deployment_release_workflow_version.py +7 -6
- vellum/client/types/workflow_display_icon.py +24 -0
- vellum/client/types/workflow_error.py +1 -0
- vellum/client/types/workflow_event.py +37 -0
- vellum/client/types/workflow_event_error.py +5 -3
- vellum/client/types/workflow_event_execution_read.py +23 -29
- vellum/client/types/workflow_execution_actual.py +8 -7
- vellum/client/types/workflow_execution_actual_chat_history_request.py +2 -2
- vellum/client/types/workflow_execution_actual_json_request.py +2 -2
- vellum/client/types/workflow_execution_actual_string_request.py +2 -2
- vellum/client/types/workflow_execution_detail.py +51 -0
- vellum/client/types/workflow_execution_event_error_code.py +5 -0
- vellum/client/types/workflow_execution_fulfilled_body.py +5 -3
- vellum/client/types/workflow_execution_fulfilled_event.py +21 -23
- vellum/client/types/workflow_execution_initiated_body.py +3 -12
- vellum/client/types/workflow_execution_initiated_event.py +21 -27
- vellum/client/types/workflow_execution_node_result_event.py +7 -6
- vellum/client/types/workflow_execution_paused_body.py +4 -4
- vellum/client/types/workflow_execution_paused_event.py +21 -23
- vellum/client/types/workflow_execution_rejected_body.py +5 -4
- vellum/client/types/workflow_execution_rejected_event.py +21 -23
- vellum/client/types/workflow_execution_resumed_body.py +3 -3
- vellum/client/types/workflow_execution_resumed_event.py +21 -23
- vellum/client/types/workflow_execution_snapshotted_body.py +4 -3
- vellum/client/types/workflow_execution_snapshotted_event.py +21 -25
- vellum/client/types/workflow_execution_span.py +19 -23
- vellum/client/types/workflow_execution_span_attributes.py +3 -2
- vellum/client/types/workflow_execution_streaming_body.py +4 -4
- vellum/client/types/workflow_execution_streaming_event.py +21 -23
- vellum/client/types/workflow_execution_usage_calculation_error.py +21 -0
- vellum/client/types/workflow_execution_usage_calculation_error_code_enum.py +7 -0
- vellum/client/types/workflow_execution_usage_calculation_fulfilled_body.py +3 -3
- vellum/client/types/workflow_execution_usage_result.py +24 -0
- vellum/client/types/workflow_execution_view_online_eval_metric_result.py +7 -8
- vellum/client/types/workflow_execution_workflow_result_event.py +7 -6
- vellum/client/types/workflow_expand_meta_request.py +2 -2
- vellum/client/types/workflow_initialization_error.py +2 -2
- vellum/client/types/workflow_input.py +31 -0
- vellum/client/types/workflow_node_result_data.py +8 -7
- vellum/client/types/workflow_node_result_event.py +3 -2
- vellum/client/types/workflow_output.py +12 -5
- vellum/client/types/workflow_output_array.py +9 -8
- vellum/client/types/workflow_output_audio.py +31 -0
- vellum/client/types/workflow_output_chat_history.py +3 -3
- vellum/client/types/workflow_output_document.py +31 -0
- vellum/client/types/workflow_output_error.py +3 -3
- vellum/client/types/workflow_output_function_call.py +3 -3
- vellum/client/types/workflow_output_image.py +3 -3
- vellum/client/types/workflow_output_json.py +3 -3
- vellum/client/types/workflow_output_number.py +3 -3
- vellum/client/types/workflow_output_search_results.py +3 -3
- vellum/client/types/workflow_output_string.py +3 -3
- vellum/client/types/workflow_output_video.py +31 -0
- vellum/client/types/workflow_parent_context.py +15 -18
- vellum/client/types/workflow_push_deployment_config_request.py +3 -2
- vellum/client/types/workflow_push_response.py +2 -2
- vellum/client/types/workflow_release_tag_read.py +4 -4
- vellum/client/types/workflow_release_tag_workflow_deployment_history_item.py +2 -2
- vellum/client/types/workflow_request_audio_input_request.py +30 -0
- vellum/client/types/workflow_request_chat_history_input_request.py +3 -3
- vellum/client/types/workflow_request_document_input_request.py +30 -0
- vellum/client/types/workflow_request_image_input_request.py +30 -0
- vellum/client/types/workflow_request_input_request.py +11 -2
- vellum/client/types/workflow_request_json_input_request.py +3 -3
- vellum/client/types/workflow_request_number_input_request.py +3 -3
- vellum/client/types/workflow_request_string_input_request.py +3 -3
- vellum/client/types/workflow_request_video_input_request.py +30 -0
- vellum/client/types/workflow_resolved_state.py +31 -0
- vellum/client/types/workflow_result_event.py +11 -10
- vellum/client/types/workflow_result_event_output_data.py +7 -6
- vellum/client/types/workflow_result_event_output_data_array.py +9 -8
- vellum/client/types/workflow_result_event_output_data_chat_history.py +3 -3
- vellum/client/types/workflow_result_event_output_data_error.py +3 -3
- vellum/client/types/workflow_result_event_output_data_function_call.py +3 -3
- vellum/client/types/workflow_result_event_output_data_json.py +3 -3
- vellum/client/types/workflow_result_event_output_data_number.py +3 -3
- vellum/client/types/workflow_result_event_output_data_search_results.py +3 -3
- vellum/client/types/workflow_result_event_output_data_string.py +3 -3
- vellum/client/types/workflow_result_event_state.py +7 -0
- vellum/client/types/workflow_sandbox_display_data.py +27 -0
- vellum/client/types/workflow_sandbox_example.py +4 -2
- vellum/client/types/workflow_sandbox_parent_context.py +14 -17
- vellum/client/types/workflow_stream_event.py +2 -1
- vellum/client/types/workspace_display_config.py +19 -0
- vellum/client/types/workspace_read.py +5 -3
- vellum/client/types/workspace_secret_read.py +3 -3
- vellum/client/utils.py +24 -0
- vellum/{types/node_event_display_context.py → core/force_multipart.py} +1 -1
- vellum/core/http_response.py +3 -0
- vellum/errors/misdirected_request_error.py +3 -0
- vellum/errors/too_many_requests_error.py +3 -0
- vellum/errors/unauthorized_error.py +3 -0
- vellum/evaluations/resources.py +5 -5
- vellum/plugins/pydantic.py +14 -3
- vellum/plugins/tests/__init__.py +0 -0
- vellum/plugins/tests/test_pydantic.py +30 -0
- vellum/plugins/vellum_mypy.py +31 -23
- vellum/prompts/__init__.py +3 -0
- vellum/prompts/blocks/__init__.py +3 -0
- vellum/prompts/blocks/compilation.py +29 -11
- vellum/prompts/blocks/helpers.py +31 -0
- vellum/prompts/blocks/tests/test_compilation.py +64 -0
- vellum/raw_client.py +3 -0
- vellum/resources/ad_hoc/raw_client.py +3 -0
- vellum/resources/container_images/raw_client.py +3 -0
- vellum/resources/deployments/raw_client.py +3 -0
- vellum/resources/document_indexes/raw_client.py +3 -0
- vellum/resources/documents/raw_client.py +3 -0
- vellum/resources/{release_reviews → environments}/__init__.py +1 -1
- vellum/resources/{release_reviews → environments}/client.py +1 -1
- vellum/resources/environments/raw_client.py +3 -0
- vellum/resources/events/__init__.py +3 -0
- vellum/resources/events/client.py +3 -0
- vellum/resources/events/raw_client.py +3 -0
- vellum/{types/workflow_event_display_context.py → resources/folder_entities/raw_client.py} +1 -1
- vellum/resources/integration_auth_configs/__init__.py +3 -0
- vellum/resources/integration_auth_configs/client.py +3 -0
- vellum/resources/integration_auth_configs/raw_client.py +3 -0
- vellum/resources/integration_providers/__init__.py +3 -0
- vellum/resources/integration_providers/client.py +3 -0
- vellum/resources/integration_providers/raw_client.py +3 -0
- vellum/resources/integrations/__init__.py +3 -0
- vellum/resources/integrations/client.py +3 -0
- vellum/resources/integrations/raw_client.py +3 -0
- vellum/resources/metric_definitions/raw_client.py +3 -0
- vellum/resources/ml_models/raw_client.py +3 -0
- vellum/resources/organizations/raw_client.py +3 -0
- vellum/resources/prompts/raw_client.py +3 -0
- vellum/resources/sandboxes/raw_client.py +3 -0
- vellum/resources/test_suite_runs/raw_client.py +3 -0
- vellum/resources/test_suites/raw_client.py +3 -0
- vellum/resources/uploaded_files/__init__.py +3 -0
- vellum/resources/uploaded_files/client.py +3 -0
- vellum/resources/uploaded_files/raw_client.py +3 -0
- vellum/resources/workflow_deployments/raw_client.py +3 -0
- vellum/resources/workflow_executions/__init__.py +3 -0
- vellum/resources/workflow_executions/client.py +3 -0
- vellum/resources/workflow_executions/raw_client.py +3 -0
- vellum/resources/workflow_sandboxes/raw_client.py +3 -0
- vellum/resources/workflows/raw_client.py +3 -0
- vellum/resources/workspace_secrets/raw_client.py +3 -0
- vellum/resources/workspaces/raw_client.py +3 -0
- vellum/types/api_actor_type_enum.py +3 -0
- vellum/types/audio_input.py +3 -0
- vellum/types/audio_input_request.py +3 -0
- vellum/types/auth_type_enum.py +3 -0
- vellum/types/build_status_enum.py +3 -0
- vellum/types/components_schemas_composio_execute_tool_request.py +3 -0
- vellum/types/components_schemas_composio_execute_tool_response.py +3 -0
- vellum/types/components_schemas_composio_integration_exec_config.py +3 -0
- vellum/types/components_schemas_composio_tool_definition.py +3 -0
- vellum/types/components_schemas_prompt_version_build_config_sandbox.py +3 -0
- vellum/types/components_schemas_slim_composio_tool_definition.py +3 -0
- vellum/types/composio_execute_tool_request.py +3 -0
- vellum/types/composio_execute_tool_response.py +3 -0
- vellum/types/composio_integration_exec_config.py +3 -0
- vellum/types/composio_tool_definition.py +3 -0
- vellum/types/container_image_build_config.py +3 -0
- vellum/types/create_workflow_event_request.py +3 -0
- vellum/types/dataset_row_push_request.py +3 -0
- vellum/types/delimiter_chunker_config.py +3 -0
- vellum/types/delimiter_chunker_config_request.py +3 -0
- vellum/types/delimiter_chunking.py +3 -0
- vellum/types/delimiter_chunking_request.py +3 -0
- vellum/types/deprecated_prompt_request_input.py +3 -0
- vellum/types/document_input.py +3 -0
- vellum/types/document_input_request.py +3 -0
- vellum/types/environment_display_config.py +3 -0
- vellum/types/environment_read.py +3 -0
- vellum/types/error_detail_response.py +3 -0
- vellum/types/event_create_response.py +3 -0
- vellum/types/execute_api_response_json.py +3 -0
- vellum/types/execute_workflow_async_response.py +3 -0
- vellum/types/execution_audio_vellum_value.py +3 -0
- vellum/types/execution_document_vellum_value.py +3 -0
- vellum/types/execution_image_vellum_value.py +3 -0
- vellum/types/execution_thinking_vellum_value.py +3 -0
- vellum/types/execution_video_vellum_value.py +3 -0
- vellum/types/external_parent_context.py +3 -0
- vellum/types/fast_embed_vectorizer_baai_bge_small_en_v_15.py +3 -0
- vellum/types/fast_embed_vectorizer_baai_bge_small_en_v_15_request.py +3 -0
- vellum/types/folder_entity_dataset.py +3 -0
- vellum/types/folder_entity_dataset_data.py +3 -0
- vellum/types/google_vertex_ai_vectorizer_gemini_embedding_001.py +3 -0
- vellum/types/google_vertex_ai_vectorizer_gemini_embedding_001_request.py +3 -0
- vellum/types/image_input.py +3 -0
- vellum/types/image_input_request.py +3 -0
- vellum/types/integration.py +3 -0
- vellum/types/integration_auth_config_integration.py +3 -0
- vellum/types/integration_auth_config_integration_credential.py +3 -0
- vellum/types/integration_credential_access_type.py +3 -0
- vellum/types/integration_name.py +3 -0
- vellum/types/integration_provider.py +3 -0
- vellum/types/integration_read.py +3 -0
- vellum/types/integration_trigger_context.py +3 -0
- vellum/types/named_scenario_input_audio_variable_value_request.py +3 -0
- vellum/types/named_scenario_input_document_variable_value_request.py +3 -0
- vellum/types/named_scenario_input_image_variable_value_request.py +3 -0
- vellum/types/named_scenario_input_video_variable_value_request.py +3 -0
- vellum/types/named_test_case_audio_variable_value.py +3 -0
- vellum/types/named_test_case_audio_variable_value_request.py +3 -0
- vellum/types/named_test_case_document_variable_value.py +3 -0
- vellum/types/named_test_case_document_variable_value_request.py +3 -0
- vellum/types/named_test_case_image_variable_value.py +3 -0
- vellum/types/named_test_case_image_variable_value_request.py +3 -0
- vellum/types/named_test_case_video_variable_value.py +3 -0
- vellum/types/named_test_case_video_variable_value_request.py +3 -0
- vellum/types/node_input_compiled_audio_value.py +3 -0
- vellum/types/node_input_compiled_document_value.py +3 -0
- vellum/types/node_input_compiled_image_value.py +3 -0
- vellum/types/node_input_compiled_video_value.py +3 -0
- vellum/types/node_output_compiled_thinking_value.py +3 -0
- vellum/types/paginated_slim_integration_auth_config_read_list.py +3 -0
- vellum/types/paginated_slim_integration_read_list.py +3 -0
- vellum/types/paginated_slim_tool_definition_list.py +3 -0
- vellum/types/paginated_workflow_deployment_release_list.py +3 -0
- vellum/types/private_vectorizer.py +3 -0
- vellum/types/private_vectorizer_request.py +3 -0
- vellum/types/prompt_push_response.py +3 -0
- vellum/types/prompt_request_audio_input.py +3 -0
- vellum/types/prompt_request_document_input.py +3 -0
- vellum/types/prompt_request_image_input.py +3 -0
- vellum/types/prompt_request_video_input.py +3 -0
- vellum/types/prompt_version_build_config_sandbox.py +3 -0
- vellum/types/scenario_input_audio_variable_value.py +3 -0
- vellum/types/scenario_input_document_variable_value.py +3 -0
- vellum/types/scenario_input_image_variable_value.py +3 -0
- vellum/types/scenario_input_video_variable_value.py +3 -0
- vellum/types/scheduled_trigger_context.py +3 -0
- vellum/types/slim_composio_tool_definition.py +3 -0
- vellum/types/slim_integration_auth_config_read.py +3 -0
- vellum/types/slim_integration_read.py +3 -0
- vellum/types/test_case_audio_variable_value.py +3 -0
- vellum/types/test_case_document_variable_value.py +3 -0
- vellum/types/test_case_image_variable_value.py +3 -0
- vellum/types/test_case_video_variable_value.py +3 -0
- vellum/types/thinking_vellum_value.py +3 -0
- vellum/types/thinking_vellum_value_request.py +3 -0
- vellum/types/update_active_workspace_response.py +3 -0
- vellum/types/uploaded_file_read.py +3 -0
- vellum/types/vellum_video.py +3 -0
- vellum/types/vellum_video_request.py +3 -0
- vellum/types/video_chat_message_content.py +3 -0
- vellum/types/video_chat_message_content_request.py +3 -0
- vellum/types/video_input.py +3 -0
- vellum/types/video_input_request.py +3 -0
- vellum/types/video_prompt_block.py +3 -0
- vellum/types/video_vellum_value.py +3 -0
- vellum/types/video_vellum_value_request.py +3 -0
- vellum/types/workflow_deployment_display_data.py +3 -0
- vellum/types/workflow_display_icon.py +3 -0
- vellum/types/workflow_event.py +3 -0
- vellum/types/workflow_execution_detail.py +3 -0
- vellum/types/workflow_execution_usage_calculation_error.py +3 -0
- vellum/types/workflow_execution_usage_calculation_error_code_enum.py +3 -0
- vellum/types/workflow_execution_usage_result.py +3 -0
- vellum/types/workflow_input.py +3 -0
- vellum/types/workflow_output_audio.py +3 -0
- vellum/types/workflow_output_document.py +3 -0
- vellum/types/workflow_output_video.py +3 -0
- vellum/types/workflow_request_audio_input_request.py +3 -0
- vellum/types/workflow_request_document_input_request.py +3 -0
- vellum/types/workflow_request_image_input_request.py +3 -0
- vellum/types/workflow_request_video_input_request.py +3 -0
- vellum/types/workflow_resolved_state.py +3 -0
- vellum/types/workflow_result_event_state.py +3 -0
- vellum/types/workflow_sandbox_display_data.py +3 -0
- vellum/types/workspace_display_config.py +3 -0
- vellum/utils/files/__init__.py +18 -0
- vellum/utils/files/constants.py +47 -0
- vellum/utils/files/exceptions.py +25 -0
- vellum/utils/files/extensions.py +59 -0
- vellum/utils/files/mixin.py +109 -0
- vellum/utils/files/read.py +41 -0
- vellum/utils/files/stream.py +135 -0
- vellum/utils/files/tests/__init__.py +0 -0
- vellum/utils/files/tests/test_extensions.py +54 -0
- vellum/utils/files/tests/test_mixin.py +205 -0
- vellum/utils/files/tests/test_read.py +204 -0
- vellum/utils/files/tests/test_stream.py +199 -0
- vellum/utils/files/tests/test_upload.py +309 -0
- vellum/utils/files/tests/test_urls.py +252 -0
- vellum/utils/files/types.py +8 -0
- vellum/utils/files/upload.py +151 -0
- vellum/utils/files/urls.py +71 -0
- vellum/utils/json_encoder.py +95 -0
- vellum/utils/templating/custom_filters.py +4 -4
- vellum/utils/templating/render.py +4 -4
- vellum/utils/tests/__init__.py +0 -0
- vellum/utils/tests/test_json_encoder.py +92 -0
- vellum/utils/vellum_client.py +40 -0
- vellum/workflows/__init__.py +78 -0
- vellum/workflows/constants.py +7 -0
- vellum/workflows/context.py +27 -9
- vellum/workflows/descriptors/base.py +83 -2
- vellum/workflows/descriptors/exceptions.py +18 -1
- vellum/workflows/descriptors/tests/test_utils.py +57 -0
- vellum/workflows/descriptors/utils.py +27 -3
- vellum/workflows/edges/__init__.py +2 -0
- vellum/workflows/edges/trigger_edge.py +67 -0
- vellum/workflows/emitters/__init__.py +2 -0
- vellum/workflows/emitters/base.py +25 -0
- vellum/workflows/emitters/vellum_emitter.py +150 -0
- vellum/workflows/environment/__init__.py +2 -1
- vellum/workflows/environment/environment.py +10 -3
- vellum/workflows/errors/types.py +29 -2
- vellum/workflows/events/__init__.py +2 -0
- vellum/workflows/events/context.py +90 -0
- vellum/workflows/events/exception_handling.py +58 -0
- vellum/workflows/events/node.py +27 -11
- vellum/workflows/events/relational_threads.py +41 -0
- vellum/workflows/events/stream.py +28 -0
- vellum/workflows/events/tests/test_basic_workflow.py +50 -0
- vellum/workflows/events/tests/test_event.py +145 -20
- vellum/workflows/events/types.py +32 -4
- vellum/workflows/events/workflow.py +111 -8
- vellum/workflows/exceptions.py +46 -7
- vellum/workflows/executable.py +9 -0
- vellum/workflows/expressions/accessor.py +65 -11
- vellum/workflows/expressions/add.py +41 -0
- vellum/workflows/expressions/comparison_utils.py +38 -0
- vellum/workflows/expressions/concat.py +35 -0
- vellum/workflows/expressions/contains.py +7 -0
- vellum/workflows/expressions/greater_than.py +8 -1
- vellum/workflows/expressions/greater_than_or_equal_to.py +8 -1
- vellum/workflows/expressions/is_error.py +23 -0
- vellum/workflows/expressions/length.py +46 -0
- vellum/workflows/expressions/less_than.py +8 -1
- vellum/workflows/expressions/less_than_or_equal_to.py +8 -1
- vellum/workflows/expressions/minus.py +41 -0
- vellum/workflows/expressions/tests/test_accessor.py +248 -0
- vellum/workflows/expressions/tests/test_add.py +72 -0
- vellum/workflows/expressions/tests/test_concat.py +108 -0
- vellum/workflows/expressions/tests/test_contains.py +175 -0
- vellum/workflows/expressions/tests/test_expressions.py +145 -32
- vellum/workflows/expressions/tests/test_length.py +38 -0
- vellum/workflows/expressions/tests/test_minus.py +109 -0
- vellum/workflows/graph/graph.py +255 -8
- vellum/workflows/graph/tests/test_graph.py +300 -0
- vellum/workflows/inputs/__init__.py +2 -0
- vellum/workflows/inputs/base.py +75 -18
- vellum/workflows/inputs/dataset_row.py +81 -0
- vellum/workflows/inputs/tests/test_inputs.py +196 -1
- vellum/workflows/integrations/__init__.py +5 -0
- vellum/workflows/integrations/composio_service.py +158 -0
- vellum/workflows/integrations/mcp_service.py +282 -0
- vellum/workflows/integrations/tests/__init__.py +0 -0
- vellum/workflows/integrations/tests/test_mcp_service.py +273 -0
- vellum/workflows/integrations/tests/test_vellum_integration_service.py +299 -0
- vellum/workflows/integrations/vellum_integration_service.py +136 -0
- vellum/workflows/loaders/__init__.py +3 -0
- vellum/workflows/loaders/base.py +36 -0
- vellum/workflows/nodes/__init__.py +2 -0
- vellum/workflows/nodes/bases/base.py +238 -46
- vellum/workflows/nodes/bases/base_adornment_node.py +64 -1
- vellum/workflows/nodes/bases/tests/test_base_adornment_node.py +31 -0
- vellum/workflows/nodes/bases/tests/test_base_node.py +100 -4
- vellum/workflows/nodes/core/error_node/node.py +11 -2
- vellum/workflows/nodes/core/inline_subworkflow_node/node.py +29 -3
- vellum/workflows/nodes/core/inline_subworkflow_node/tests/test_node.py +35 -0
- vellum/workflows/nodes/core/map_node/node.py +103 -90
- vellum/workflows/nodes/core/map_node/tests/test_node.py +178 -0
- vellum/workflows/nodes/core/retry_node/node.py +8 -1
- vellum/workflows/nodes/core/retry_node/tests/test_node.py +2 -3
- vellum/workflows/nodes/core/templating_node/node.py +7 -2
- vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py +194 -1
- vellum/workflows/nodes/displayable/__init__.py +6 -0
- vellum/workflows/nodes/displayable/api_node/node.py +17 -1
- vellum/workflows/nodes/displayable/api_node/tests/test_api_node.py +177 -3
- vellum/workflows/nodes/displayable/bases/api_node/node.py +70 -16
- vellum/workflows/nodes/displayable/bases/api_node/tests/__init__.py +0 -0
- vellum/workflows/nodes/displayable/bases/api_node/tests/test_node.py +150 -0
- vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py +68 -7
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +299 -27
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/tests/test_inline_prompt_node.py +663 -20
- vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py +84 -14
- vellum/workflows/nodes/displayable/bases/search_node.py +26 -3
- vellum/workflows/nodes/displayable/bases/tests/test_prompt_deployment_node.py +90 -0
- vellum/workflows/nodes/displayable/bases/utils.py +82 -5
- vellum/workflows/nodes/displayable/code_execution_node/node.py +46 -15
- vellum/workflows/nodes/displayable/code_execution_node/tests/{test_code_execution_node.py → test_node.py} +646 -5
- vellum/workflows/nodes/displayable/code_execution_node/utils.py +28 -74
- vellum/workflows/nodes/displayable/conditional_node/node.py +8 -4
- vellum/workflows/nodes/displayable/final_output_node/node.py +80 -1
- vellum/workflows/nodes/displayable/final_output_node/tests/test_node.py +96 -1
- vellum/workflows/nodes/displayable/guardrail_node/node.py +25 -5
- vellum/workflows/nodes/displayable/guardrail_node/test_node.py +29 -0
- vellum/workflows/nodes/displayable/inline_prompt_node/node.py +9 -36
- vellum/workflows/nodes/displayable/inline_prompt_node/tests/test_node.py +3 -0
- vellum/workflows/nodes/displayable/merge_node/node.py +8 -1
- vellum/workflows/nodes/displayable/note_node/node.py +8 -1
- vellum/workflows/nodes/displayable/prompt_deployment_node/node.py +7 -23
- vellum/workflows/nodes/displayable/search_node/node.py +18 -0
- vellum/workflows/nodes/displayable/search_node/tests/test_node.py +76 -0
- vellum/workflows/nodes/displayable/set_state_node/__init__.py +5 -0
- vellum/workflows/nodes/displayable/set_state_node/node.py +71 -0
- vellum/workflows/nodes/displayable/set_state_node/tests/__init__.py +0 -0
- vellum/workflows/nodes/displayable/set_state_node/tests/test_node.py +212 -0
- vellum/workflows/nodes/displayable/subworkflow_deployment_node/node.py +220 -59
- vellum/workflows/nodes/displayable/subworkflow_deployment_node/tests/test_node.py +26 -1
- vellum/workflows/nodes/displayable/tests/test_inline_text_prompt_node.py +4 -1
- vellum/workflows/nodes/displayable/tests/test_search_node_error_handling.py +329 -0
- vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +10 -16
- vellum/workflows/nodes/displayable/tool_calling_node/__init__.py +3 -0
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +225 -0
- vellum/workflows/nodes/displayable/tool_calling_node/state.py +11 -0
- vellum/workflows/nodes/displayable/tool_calling_node/tests/__init__.py +0 -0
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_composio_service.py +219 -0
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +802 -0
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py +316 -0
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +633 -0
- vellum/workflows/nodes/displayable/web_search_node/__init__.py +3 -0
- vellum/workflows/nodes/displayable/web_search_node/node.py +136 -0
- vellum/workflows/nodes/displayable/web_search_node/tests/__init__.py +0 -0
- vellum/workflows/nodes/displayable/web_search_node/tests/test_node.py +246 -0
- vellum/workflows/nodes/experimental/__init__.py +1 -0
- vellum/workflows/nodes/mocks.py +40 -9
- vellum/workflows/nodes/tests/test_mocks.py +2 -2
- vellum/workflows/nodes/tests/test_utils.py +42 -26
- vellum/workflows/nodes/utils.py +70 -7
- vellum/workflows/outputs/base.py +53 -12
- vellum/workflows/ports/node_ports.py +6 -2
- vellum/workflows/ports/port.py +28 -3
- vellum/workflows/ports/tests/test_port.py +45 -0
- vellum/workflows/ports/utils.py +70 -17
- vellum/workflows/references/__init__.py +2 -0
- vellum/workflows/references/constant.py +4 -1
- vellum/workflows/references/environment_variable.py +27 -9
- vellum/workflows/references/output.py +3 -5
- vellum/workflows/references/trigger.py +77 -0
- vellum/workflows/references/workflow_input.py +5 -1
- vellum/workflows/resolvers/base.py +19 -1
- vellum/workflows/resolvers/resolver.py +71 -0
- vellum/workflows/resolvers/tests/test_resolver.py +168 -0
- vellum/workflows/resolvers/types.py +11 -0
- vellum/workflows/runner/runner.py +659 -154
- vellum/workflows/sandbox.py +55 -9
- vellum/workflows/state/base.py +192 -64
- vellum/workflows/state/context.py +225 -6
- vellum/workflows/state/delta.py +20 -0
- vellum/workflows/state/encoder.py +2 -62
- vellum/workflows/state/tests/test_state.py +24 -9
- vellum/workflows/tests/test_dataset_row.py +190 -0
- vellum/workflows/tests/test_sandbox.py +137 -0
- vellum/workflows/tests/triggers/test_integration_trigger.py +156 -0
- vellum/workflows/triggers/__init__.py +6 -0
- vellum/workflows/triggers/base.py +391 -0
- vellum/workflows/triggers/integration.py +186 -0
- vellum/workflows/triggers/manual.py +37 -0
- vellum/workflows/triggers/schedule.py +18 -0
- vellum/workflows/triggers/tests/__init__.py +1 -0
- vellum/workflows/triggers/tests/test_base_trigger_display.py +147 -0
- vellum/workflows/triggers/tests/test_integration.py +155 -0
- vellum/workflows/types/__init__.py +2 -1
- vellum/workflows/types/code_execution_node_wrappers.py +105 -0
- vellum/workflows/types/core.py +5 -0
- vellum/workflows/types/definition.py +168 -2
- vellum/workflows/types/generics.py +5 -0
- vellum/workflows/types/tests/test_definition.py +183 -0
- vellum/workflows/types/tests/test_utils.py +14 -3
- vellum/workflows/types/utils.py +64 -13
- vellum/workflows/utils/files.py +28 -0
- vellum/workflows/utils/functions.py +284 -17
- vellum/workflows/utils/hmac.py +44 -0
- vellum/workflows/utils/names.py +32 -4
- vellum/workflows/utils/pydantic_schema.py +38 -0
- vellum/workflows/utils/tests/test_functions.py +516 -5
- vellum/workflows/utils/tests/test_names.py +9 -0
- vellum/workflows/utils/tests/test_vellum_variables.py +32 -2
- vellum/workflows/utils/uuids.py +35 -0
- vellum/workflows/utils/vellum_variables.py +131 -7
- vellum/workflows/utils/zip.py +46 -0
- vellum/workflows/vellum_client.py +3 -21
- vellum/workflows/workflows/base.py +363 -39
- vellum/workflows/workflows/event_filters.py +13 -0
- vellum/workflows/workflows/tests/test_base_workflow.py +122 -10
- vellum/workflows/workflows/tests/test_event_filters.py +126 -0
- {vellum_ai-0.14.41.dist-info → vellum_ai-1.11.2.dist-info}/METADATA +12 -13
- vellum_ai-1.11.2.dist-info/RECORD +2177 -0
- vellum_ai-1.11.2.dist-info/entry_points.txt +4 -0
- vellum_cli/__init__.py +42 -4
- vellum_cli/config.py +12 -5
- vellum_cli/image_push.py +120 -10
- vellum_cli/logger.py +11 -0
- vellum_cli/move.py +56 -0
- vellum_cli/ping.py +6 -0
- vellum_cli/pull.py +78 -14
- vellum_cli/push.py +149 -61
- vellum_cli/tests/conftest.py +6 -0
- vellum_cli/tests/test_image_push.py +295 -8
- vellum_cli/tests/test_image_push_error_handling.py +258 -0
- vellum_cli/tests/test_init.py +7 -24
- vellum_cli/tests/test_move.py +154 -0
- vellum_cli/tests/test_ping.py +15 -0
- vellum_cli/tests/test_pull.py +133 -57
- vellum_cli/tests/test_push.py +708 -19
- vellum_ee/assets/node-definitions.json +1135 -0
- vellum_ee/scripts/generate_node_definitions.py +89 -0
- vellum_ee/workflows/display/base.py +29 -55
- vellum_ee/workflows/display/editor/types.py +3 -0
- vellum_ee/workflows/display/exceptions.py +3 -0
- vellum_ee/workflows/display/nodes/base_node_display.py +211 -218
- vellum_ee/workflows/display/nodes/get_node_display_class.py +1 -25
- vellum_ee/workflows/display/nodes/tests/test_base_node_display.py +149 -3
- vellum_ee/workflows/display/nodes/vellum/__init__.py +2 -0
- vellum_ee/workflows/display/nodes/vellum/api_node.py +37 -12
- vellum_ee/workflows/display/nodes/vellum/base_adornment_node.py +3 -3
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +30 -8
- vellum_ee/workflows/display/nodes/vellum/conditional_node.py +19 -7
- vellum_ee/workflows/display/nodes/vellum/error_node.py +23 -19
- vellum_ee/workflows/display/nodes/vellum/final_output_node.py +9 -19
- vellum_ee/workflows/display/nodes/vellum/function_node.py +14 -0
- vellum_ee/workflows/display/nodes/vellum/guardrail_node.py +4 -4
- vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +114 -29
- vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +35 -9
- vellum_ee/workflows/display/nodes/vellum/map_node.py +44 -25
- vellum_ee/workflows/display/nodes/vellum/merge_node.py +2 -4
- vellum_ee/workflows/display/nodes/vellum/note_node.py +2 -3
- vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py +28 -17
- vellum_ee/workflows/display/nodes/vellum/retry_node.py +6 -7
- vellum_ee/workflows/display/nodes/vellum/search_node.py +84 -18
- vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py +26 -14
- vellum_ee/workflows/display/nodes/vellum/templating_node.py +5 -5
- vellum_ee/workflows/display/nodes/vellum/tests/test_api_node.py +65 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +219 -3
- vellum_ee/workflows/display/nodes/vellum/tests/test_error_node.py +4 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_final_output_node.py +80 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_inline_subworkflow_node.py +88 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_prompt_deployment_node.py +177 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_prompt_node.py +207 -6
- vellum_ee/workflows/display/nodes/vellum/tests/test_retry_node.py +1 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_search_node.py +104 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_subworkflow_deployment_node.py +110 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_templating_node.py +2 -2
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +694 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_try_node.py +2 -2
- vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py +8 -9
- vellum_ee/workflows/display/nodes/vellum/try_node.py +6 -7
- vellum_ee/workflows/display/tests/test_base_workflow_display.py +427 -8
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/conftest.py +2 -2
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_adornments_serialization.py +150 -125
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +277 -87
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_outputs_serialization.py +21 -17
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py +76 -64
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py +69 -12
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py +68 -46
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py +92 -80
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py +320 -170
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_default_state_serialization.py +14 -15
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py +14 -12
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_generic_node_serialization.py +28 -18
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py +20 -16
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_prompt_node_serialization.py +621 -5
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py +73 -43
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py +51 -32
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_merge_node_serialization.py +37 -33
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_prompt_deployment_serialization.py +367 -36
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py +40 -36
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_set_state_node_serialization.py +86 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_subworkflow_deployment_serialization.py +25 -21
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_templating_node_serialization.py +22 -18
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_terminal_node_serialization.py +14 -10
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_composio_serialization.py +87 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_inline_workflow_serialization.py +313 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +65 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_parent_input.py +89 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_serialization.py +224 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_vellum_integration_serialization.py +68 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_workflow_deployment_serialization.py +107 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_serialization.py +2 -3
- vellum_ee/workflows/display/tests/workflow_serialization/test_chat_message_dict_reference_serialization.py +108 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py +20 -65
- vellum_ee/workflows/display/tests/workflow_serialization/test_final_output_node_map_reference_serialization.py +88 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_serialization.py +306 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_with_entrypoint_node_id.py +88 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_list_vellum_document_serialization.py +65 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_manual_trigger_serialization.py +110 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_map_node_with_terminal_nodes_serialization.py +62 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_multi_trigger_same_node_serialization.py +99 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_scheduled_trigger_serialization.py +267 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_terminal_node_any_serialization.py +49 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_trigger_display_from_display_class.py +153 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_web_search_node_serialization.py +72 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_workflow_input_parameterization_error.py +37 -0
- vellum_ee/workflows/display/types.py +32 -2
- vellum_ee/workflows/display/utils/auto_layout.py +130 -0
- vellum_ee/workflows/display/utils/events.py +57 -0
- vellum_ee/workflows/display/utils/exceptions.py +19 -0
- vellum_ee/workflows/display/utils/expressions.py +487 -2
- vellum_ee/workflows/display/utils/metadata.py +146 -0
- vellum_ee/workflows/display/utils/registry.py +46 -0
- vellum_ee/workflows/display/utils/tests/__init__.py +0 -0
- vellum_ee/workflows/display/utils/tests/test_auto_layout.py +56 -0
- vellum_ee/workflows/display/utils/tests/test_events.py +185 -0
- vellum_ee/workflows/display/utils/tests/test_expressions.py +92 -0
- vellum_ee/workflows/display/utils/vellum.py +49 -86
- vellum_ee/workflows/display/vellum.py +2 -128
- vellum_ee/workflows/display/workflows/__init__.py +0 -1
- vellum_ee/workflows/display/workflows/base_workflow_display.py +778 -129
- vellum_ee/workflows/display/workflows/get_vellum_workflow_display_class.py +3 -0
- vellum_ee/workflows/display/workflows/tests/test_workflow_display.py +752 -2
- vellum_ee/workflows/server/virtual_file_loader.py +131 -6
- vellum_ee/workflows/tests/local_workflow/display/nodes/final_output.py +1 -1
- vellum_ee/workflows/tests/local_workflow/display/nodes/templating_node.py +1 -1
- vellum_ee/workflows/tests/local_workflow/display/workflow.py +11 -14
- vellum_ee/workflows/tests/test_display_meta.py +89 -0
- vellum_ee/workflows/tests/test_registry.py +169 -0
- vellum_ee/workflows/tests/test_serialize_module.py +265 -0
- vellum_ee/workflows/tests/test_server.py +619 -44
- vellum_ee/workflows/tests/test_virtual_files.py +48 -0
- vellum/client/resources/release_reviews/client.py +0 -254
- vellum/client/types/node_event_display_context.py +0 -30
- vellum/client/types/workflow_event_display_context.py +0 -28
- vellum/workflows/nodes/experimental/openai_chat_completion_node/__init__.py +0 -5
- vellum/workflows/nodes/experimental/openai_chat_completion_node/node.py +0 -266
- vellum/workflows/nodes/experimental/tool_calling_node/__init__.py +0 -3
- vellum/workflows/nodes/experimental/tool_calling_node/node.py +0 -125
- vellum/workflows/nodes/experimental/tool_calling_node/utils.py +0 -128
- vellum_ai-0.14.41.dist-info/RECORD +0 -1704
- vellum_ai-0.14.41.dist-info/entry_points.txt +0 -3
- vellum_ee/workflows/display/workflows/vellum_workflow_display.py +0 -9
- /vellum/{workflows/nodes/displayable/bases/inline_prompt_node → prompts}/constants.py +0 -0
- {vellum_ai-0.14.41.dist-info → vellum_ai-1.11.2.dist-info}/LICENSE +0 -0
- {vellum_ai-0.14.41.dist-info → vellum_ai-1.11.2.dist-info}/WHEEL +0 -0
vellum_cli/tests/test_push.py
CHANGED
|
@@ -7,11 +7,13 @@ from unittest import mock
|
|
|
7
7
|
from uuid import uuid4
|
|
8
8
|
|
|
9
9
|
from click.testing import CliRunner
|
|
10
|
+
from httpx import Response
|
|
10
11
|
|
|
11
12
|
from vellum.client.core.api_error import ApiError
|
|
12
13
|
from vellum.client.types.workflow_push_response import WorkflowPushResponse
|
|
13
14
|
from vellum.utils.uuid import is_valid_uuid
|
|
14
15
|
from vellum_cli import main as cli_main
|
|
16
|
+
from vellum_ee.workflows.display.nodes.utils import to_kebab_case
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
def _extract_tar_gz(tar_gz_bytes: bytes) -> dict[str, str]:
|
|
@@ -29,19 +31,25 @@ def _extract_tar_gz(tar_gz_bytes: bytes) -> dict[str, str]:
|
|
|
29
31
|
return files
|
|
30
32
|
|
|
31
33
|
|
|
32
|
-
def
|
|
33
|
-
|
|
34
|
+
def _ensure_file(temp_dir: str, module: str, file_name: str, content: str) -> str:
|
|
35
|
+
file_path = os.path.join(temp_dir, *module.split("."), file_name)
|
|
36
|
+
base_dir = os.path.dirname(file_path)
|
|
34
37
|
os.makedirs(base_dir, exist_ok=True)
|
|
38
|
+
|
|
39
|
+
with open(file_path, "w") as f:
|
|
40
|
+
f.write(content)
|
|
41
|
+
|
|
42
|
+
return content
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _ensure_workflow_py(temp_dir: str, module: str) -> str:
|
|
35
46
|
workflow_py_file_content = """\
|
|
36
47
|
from vellum.workflows import BaseWorkflow
|
|
37
48
|
|
|
38
49
|
class ExampleWorkflow(BaseWorkflow):
|
|
39
50
|
pass
|
|
40
51
|
"""
|
|
41
|
-
|
|
42
|
-
f.write(workflow_py_file_content)
|
|
43
|
-
|
|
44
|
-
return workflow_py_file_content
|
|
52
|
+
return _ensure_file(temp_dir, module, "workflow.py", workflow_py_file_content)
|
|
45
53
|
|
|
46
54
|
|
|
47
55
|
def test_push__no_config(mock_module):
|
|
@@ -54,8 +62,41 @@ def test_push__no_config(mock_module):
|
|
|
54
62
|
|
|
55
63
|
# THEN it should fail
|
|
56
64
|
assert result.exit_code == 1
|
|
57
|
-
assert result.
|
|
58
|
-
assert
|
|
65
|
+
assert "No workflows found in project to push" in result.output
|
|
66
|
+
assert "No workflow configurations were found in vellum.lock.json" in result.output
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def test_push__no_matching_config_with_workflow_sandbox_id(mock_module):
|
|
70
|
+
# GIVEN a workflow was pulled with a specific sandbox ID
|
|
71
|
+
temp_dir = mock_module.temp_dir
|
|
72
|
+
module = mock_module.module
|
|
73
|
+
original_workflow_sandbox_id = mock_module.workflow_sandbox_id
|
|
74
|
+
|
|
75
|
+
# AND we have a valid project config from a pulled workflow
|
|
76
|
+
mock_module.set_pyproject_toml(
|
|
77
|
+
{
|
|
78
|
+
"workflows": [
|
|
79
|
+
{
|
|
80
|
+
"module": module,
|
|
81
|
+
"workflow_sandbox_id": original_workflow_sandbox_id,
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# AND a workflow exists in the module successfully
|
|
88
|
+
_ensure_workflow_py(temp_dir, module)
|
|
89
|
+
|
|
90
|
+
# WHEN the user tries to push with a different workflow sandbox ID via --workflow-sandbox-id
|
|
91
|
+
different_workflow_sandbox_id = str(uuid4())
|
|
92
|
+
runner = CliRunner()
|
|
93
|
+
result = runner.invoke(cli_main, ["workflows", "push", "--workflow-sandbox-id", different_workflow_sandbox_id])
|
|
94
|
+
|
|
95
|
+
# THEN it should fail with a helpful error message
|
|
96
|
+
assert result.exit_code == 1
|
|
97
|
+
assert "No workflows found in project to push" in result.output
|
|
98
|
+
assert "No workflow configurations were found in vellum.lock.json" in result.output
|
|
99
|
+
assert "vellum workflows push" in result.output
|
|
59
100
|
|
|
60
101
|
|
|
61
102
|
def test_push__multiple_workflows_configured__no_module_specified(mock_module):
|
|
@@ -69,9 +110,8 @@ def test_push__multiple_workflows_configured__no_module_specified(mock_module):
|
|
|
69
110
|
# THEN it should fail
|
|
70
111
|
assert result.exit_code == 1
|
|
71
112
|
assert result.exception
|
|
72
|
-
assert (
|
|
73
|
-
|
|
74
|
-
== "Multiple workflows found in project to push. Pushing only a single workflow is supported."
|
|
113
|
+
assert str(result.exception) == (
|
|
114
|
+
"Multiple workflows found. Please specify a single workflow to push. Found: examples.mock, examples.mock2"
|
|
75
115
|
)
|
|
76
116
|
|
|
77
117
|
|
|
@@ -133,6 +173,39 @@ def test_push__happy_path(mock_module, vellum_client, base_command):
|
|
|
133
173
|
assert extracted_files["workflow.py"] == workflow_py_file_content
|
|
134
174
|
|
|
135
175
|
|
|
176
|
+
@pytest.mark.usefixtures("info_log_level")
|
|
177
|
+
def test_push__verify_default_url_in_raw_httpx_transport(mock_module, mock_httpx_transport):
|
|
178
|
+
# GIVEN a single workflow configured
|
|
179
|
+
module = mock_module.module
|
|
180
|
+
temp_dir = mock_module.temp_dir
|
|
181
|
+
_ensure_workflow_py(temp_dir, module)
|
|
182
|
+
|
|
183
|
+
# AND the push API call returns successfully
|
|
184
|
+
mock_httpx_transport.handle_request.return_value = Response(
|
|
185
|
+
status_code=200,
|
|
186
|
+
text=json.dumps(
|
|
187
|
+
{
|
|
188
|
+
"workflow_sandbox_id": str(uuid4()),
|
|
189
|
+
}
|
|
190
|
+
),
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
# WHEN calling `vellum push`
|
|
194
|
+
runner = CliRunner()
|
|
195
|
+
result = runner.invoke(cli_main, ["workflows", "push", module])
|
|
196
|
+
|
|
197
|
+
# THEN it should succeed
|
|
198
|
+
assert result.exit_code == 0
|
|
199
|
+
|
|
200
|
+
# AND we should have called the push API with the correct args
|
|
201
|
+
mock_httpx_transport.handle_request.assert_called_once()
|
|
202
|
+
request = mock_httpx_transport.handle_request.call_args[0][0]
|
|
203
|
+
assert str(request.url) == "https://api.vellum.ai/v1/workflows/push"
|
|
204
|
+
|
|
205
|
+
# AND the new URL is in the message at the end
|
|
206
|
+
assert "Visit at: https://app.vellum.ai/workflow-sandboxes/" in result.output
|
|
207
|
+
|
|
208
|
+
|
|
136
209
|
def test_push__no_config__module_found(mock_module, vellum_client):
|
|
137
210
|
# GIVEN no config file set
|
|
138
211
|
temp_dir = mock_module.temp_dir
|
|
@@ -308,9 +381,8 @@ def test_push__workflow_sandbox_option__existing_id_different_module(mock_module
|
|
|
308
381
|
# THEN it should fail
|
|
309
382
|
assert result.exit_code == 1
|
|
310
383
|
assert result.exception
|
|
311
|
-
assert (
|
|
312
|
-
|
|
313
|
-
== "Multiple workflows found in project to push. Pushing only a single workflow is supported."
|
|
384
|
+
assert str(result.exception) == (
|
|
385
|
+
f"Multiple workflows found. Please specify a single workflow to push. Found: {module}, {second_module}"
|
|
314
386
|
)
|
|
315
387
|
|
|
316
388
|
|
|
@@ -351,12 +423,15 @@ def test_push__deployment(mock_module, vellum_client, base_command):
|
|
|
351
423
|
assert json.loads(call_args["exec_config"])["workflow_raw_data"]["definition"]["name"] == "ExampleWorkflow"
|
|
352
424
|
assert is_valid_uuid(call_args["workflow_sandbox_id"])
|
|
353
425
|
assert call_args["artifact"].name == expected_artifact_name
|
|
354
|
-
|
|
426
|
+
expected_deployment_name = to_kebab_case(module.split(".")[-1])
|
|
427
|
+
deployment_config = json.loads(call_args["deployment_config"])
|
|
428
|
+
assert deployment_config["name"] == expected_deployment_name
|
|
355
429
|
|
|
356
430
|
extracted_files = _extract_tar_gz(call_args["artifact"].read())
|
|
357
431
|
assert extracted_files["workflow.py"] == workflow_py_file_content
|
|
358
432
|
|
|
359
433
|
|
|
434
|
+
@pytest.mark.usefixtures("info_log_level")
|
|
360
435
|
def test_push__dry_run_option_returns_report(mock_module, vellum_client):
|
|
361
436
|
# GIVEN a single workflow configured
|
|
362
437
|
temp_dir = mock_module.temp_dir
|
|
@@ -405,8 +480,8 @@ class ExampleWorkflow(BaseWorkflow):
|
|
|
405
480
|
runner = CliRunner(mix_stderr=True)
|
|
406
481
|
result = runner.invoke(cli_main, ["push", module, "--dry-run"])
|
|
407
482
|
|
|
408
|
-
# THEN it should
|
|
409
|
-
assert result.exit_code ==
|
|
483
|
+
# THEN it should fail with exit code 1 due to errors
|
|
484
|
+
assert result.exit_code == 1
|
|
410
485
|
|
|
411
486
|
# AND we should have called the push API with the dry-run option
|
|
412
487
|
vellum_client.workflows.push.assert_called_once()
|
|
@@ -420,6 +495,39 @@ class ExampleWorkflow(BaseWorkflow):
|
|
|
420
495
|
assert "iterable_item_added" in result.output
|
|
421
496
|
|
|
422
497
|
|
|
498
|
+
@pytest.mark.usefixtures("info_log_level")
|
|
499
|
+
def test_push__dry_run_option_no_errors_returns_success(mock_module, vellum_client):
|
|
500
|
+
"""Test that dry-run returns exit code 0 when there are no errors or diffs"""
|
|
501
|
+
# GIVEN a workflow module with a valid workflow (using the same pattern as happy path test)
|
|
502
|
+
temp_dir = mock_module.temp_dir
|
|
503
|
+
module = mock_module.module
|
|
504
|
+
_ensure_workflow_py(temp_dir, module)
|
|
505
|
+
|
|
506
|
+
# AND the push API call returns successfully with no errors and no diffs
|
|
507
|
+
vellum_client.workflows.push.return_value = WorkflowPushResponse(
|
|
508
|
+
workflow_sandbox_id=str(uuid4()),
|
|
509
|
+
proposed_diffs=None,
|
|
510
|
+
)
|
|
511
|
+
|
|
512
|
+
# WHEN calling `vellum push` with dry-run
|
|
513
|
+
runner = CliRunner(mix_stderr=True)
|
|
514
|
+
result = runner.invoke(cli_main, ["push", module, "--dry-run"])
|
|
515
|
+
|
|
516
|
+
# THEN it should succeed with exit code 0
|
|
517
|
+
assert result.exit_code == 0
|
|
518
|
+
|
|
519
|
+
# AND we should have called the push API with the dry-run option
|
|
520
|
+
vellum_client.workflows.push.assert_called_once()
|
|
521
|
+
call_args = vellum_client.workflows.push.call_args.kwargs
|
|
522
|
+
assert call_args["dry_run"] is True
|
|
523
|
+
|
|
524
|
+
# AND the report should be in the output
|
|
525
|
+
assert "## Errors" in result.output
|
|
526
|
+
assert "No errors found." in result.output
|
|
527
|
+
assert "## Proposed Diffs" in result.output
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
@pytest.mark.usefixtures("info_log_level")
|
|
423
531
|
def test_push__strict_option_returns_diffs(mock_module, vellum_client):
|
|
424
532
|
# GIVEN a single workflow configured
|
|
425
533
|
temp_dir = mock_module.temp_dir
|
|
@@ -486,7 +594,183 @@ Files that were different between the original project and the generated artifac
|
|
|
486
594
|
)
|
|
487
595
|
|
|
488
596
|
|
|
489
|
-
def
|
|
597
|
+
def test_push__push_fails_due_to_400_error(mock_module, vellum_client):
|
|
598
|
+
# GIVEN a single workflow configured
|
|
599
|
+
temp_dir = mock_module.temp_dir
|
|
600
|
+
module = mock_module.module
|
|
601
|
+
|
|
602
|
+
# AND a workflow exists in the module successfully
|
|
603
|
+
_ensure_workflow_py(temp_dir, module)
|
|
604
|
+
|
|
605
|
+
# AND the push API call returns a 4xx response
|
|
606
|
+
vellum_client.workflows.push.side_effect = ApiError(
|
|
607
|
+
status_code=400,
|
|
608
|
+
body={
|
|
609
|
+
"detail": "Pushing the Workflow failed because you did something wrong",
|
|
610
|
+
},
|
|
611
|
+
)
|
|
612
|
+
|
|
613
|
+
# WHEN calling `vellum push` on strict mode
|
|
614
|
+
runner = CliRunner()
|
|
615
|
+
result = runner.invoke(cli_main, ["push", module])
|
|
616
|
+
|
|
617
|
+
# THEN it should fail with a user error code
|
|
618
|
+
assert result.exit_code == 1
|
|
619
|
+
|
|
620
|
+
# AND the error message should be in the error message
|
|
621
|
+
assert "API request to /workflows/push failed." in result.output
|
|
622
|
+
assert "Pushing the Workflow failed because you did something wrong" in result.output
|
|
623
|
+
|
|
624
|
+
# AND the stack trace should not be
|
|
625
|
+
assert "Traceback" not in result.output
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
def test_push__push_fails_due_to_404_error_with_id(mock_module, vellum_client):
|
|
629
|
+
"""
|
|
630
|
+
Tests that a 404 error with a workflow sandbox ID shows a helpful error message.
|
|
631
|
+
"""
|
|
632
|
+
|
|
633
|
+
# GIVEN a single workflow configured with a workflow_sandbox_id
|
|
634
|
+
temp_dir = mock_module.temp_dir
|
|
635
|
+
module = mock_module.module
|
|
636
|
+
|
|
637
|
+
# AND a workflow exists in the module successfully
|
|
638
|
+
_ensure_workflow_py(temp_dir, module)
|
|
639
|
+
|
|
640
|
+
# AND the push API call returns a 404 response
|
|
641
|
+
vellum_client.workflows.push.side_effect = ApiError(
|
|
642
|
+
status_code=404,
|
|
643
|
+
body={},
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
# WHEN calling `vellum push`
|
|
647
|
+
runner = CliRunner()
|
|
648
|
+
result = runner.invoke(cli_main, ["push", module])
|
|
649
|
+
|
|
650
|
+
# THEN it should fail with a user error code
|
|
651
|
+
assert result.exit_code == 1
|
|
652
|
+
|
|
653
|
+
# AND the error message should be in the error message
|
|
654
|
+
assert "Workflow Sandbox not found" in result.output
|
|
655
|
+
assert mock_module.workflow_sandbox_id in result.output
|
|
656
|
+
assert "workspace" in result.output
|
|
657
|
+
|
|
658
|
+
# AND the stack trace should not be present
|
|
659
|
+
assert "Traceback" not in result.output
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
def test_push__push_fails_due_to_404_error_without_id(tmp_path, vellum_client, monkeypatch):
|
|
663
|
+
"""
|
|
664
|
+
Tests that a 404 error without a workflow sandbox ID shows a helpful error message.
|
|
665
|
+
"""
|
|
666
|
+
|
|
667
|
+
# GIVEN a workflow module exists but has no workflow_sandbox_id configured
|
|
668
|
+
module = "examples.mock.test_push__404_without_id"
|
|
669
|
+
module_dir = tmp_path / "examples" / "mock" / "test_push__404_without_id"
|
|
670
|
+
module_dir.mkdir(parents=True)
|
|
671
|
+
|
|
672
|
+
# AND a workflow.py file exists
|
|
673
|
+
workflow_file = module_dir / "workflow.py"
|
|
674
|
+
workflow_file.write_text(
|
|
675
|
+
"from vellum.workflows import BaseWorkflow\n\nclass ExampleWorkflow(BaseWorkflow):\n pass\n"
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
# AND the pyproject.toml file exists without workflow_sandbox_id
|
|
679
|
+
pyproject_file = tmp_path / "pyproject.toml"
|
|
680
|
+
pyproject_file.write_text(f'[tool.vellum]\n[[tool.vellum.workflows]]\nmodule = "{module}"\n')
|
|
681
|
+
|
|
682
|
+
monkeypatch.chdir(tmp_path)
|
|
683
|
+
|
|
684
|
+
# AND the push API call returns a 404 response
|
|
685
|
+
vellum_client.workflows.push.side_effect = ApiError(
|
|
686
|
+
status_code=404,
|
|
687
|
+
body={},
|
|
688
|
+
)
|
|
689
|
+
|
|
690
|
+
# WHEN calling `vellum push`
|
|
691
|
+
runner = CliRunner()
|
|
692
|
+
result = runner.invoke(cli_main, ["push", module])
|
|
693
|
+
|
|
694
|
+
# THEN it should fail with a user error code
|
|
695
|
+
assert result.exit_code == 1
|
|
696
|
+
|
|
697
|
+
# AND the error message should be in the output
|
|
698
|
+
assert "Workflow Sandbox not found" in result.output
|
|
699
|
+
assert "/workflows/push" in result.output
|
|
700
|
+
assert "404 response" in result.output
|
|
701
|
+
|
|
702
|
+
# AND the stack trace should not be present
|
|
703
|
+
assert "Traceback" not in result.output
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
@pytest.mark.parametrize(
|
|
707
|
+
"file_data",
|
|
708
|
+
[
|
|
709
|
+
{
|
|
710
|
+
"workflow.py": """\
|
|
711
|
+
from vellum.workflows import BaseWorkflow
|
|
712
|
+
|
|
713
|
+
class ExampleWorkflow(BaseWorkflow):
|
|
714
|
+
pass
|
|
715
|
+
"""
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"nodes/start_node.py": """\
|
|
719
|
+
from vellum.workflows.nodes import CodeExecutionNode
|
|
720
|
+
from vellum.workflows.references import VellumSecretReference
|
|
721
|
+
|
|
722
|
+
class StartNode(CodeExecutionNode):
|
|
723
|
+
code_inputs = {
|
|
724
|
+
"foo": VellumSecretReference("MY_SECRET_KEY"),
|
|
725
|
+
}
|
|
726
|
+
""",
|
|
727
|
+
"workflow.py": """\
|
|
728
|
+
from vellum.workflows import BaseWorkflow
|
|
729
|
+
from .nodes.start_node import StartNode
|
|
730
|
+
|
|
731
|
+
class ExampleWorkflow(BaseWorkflow):
|
|
732
|
+
graph = StartNode
|
|
733
|
+
""",
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"nodes/start_node.py": """\
|
|
737
|
+
from vellum.workflows.nodes import PromptDeploymentNode
|
|
738
|
+
|
|
739
|
+
class StartNode(PromptDeploymentNode):
|
|
740
|
+
deployment = "my-deployment"
|
|
741
|
+
""",
|
|
742
|
+
"workflow.py": """\
|
|
743
|
+
from vellum.workflows import BaseWorkflow
|
|
744
|
+
from .nodes.start_node import StartNode
|
|
745
|
+
|
|
746
|
+
class ExampleWorkflow(BaseWorkflow):
|
|
747
|
+
graph = StartNode
|
|
748
|
+
""",
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"nodes/start_node.py": """\
|
|
752
|
+
from vellum.workflows.nodes import SubworkflowDeploymentNode
|
|
753
|
+
|
|
754
|
+
class StartNode(SubworkflowDeploymentNode):
|
|
755
|
+
deployment = "my-deployment"
|
|
756
|
+
""",
|
|
757
|
+
"workflow.py": """\
|
|
758
|
+
from vellum.workflows import BaseWorkflow
|
|
759
|
+
from .nodes.start_node import StartNode
|
|
760
|
+
|
|
761
|
+
class ExampleWorkflow(BaseWorkflow):
|
|
762
|
+
graph = StartNode
|
|
763
|
+
""",
|
|
764
|
+
},
|
|
765
|
+
],
|
|
766
|
+
ids=[
|
|
767
|
+
"base_case",
|
|
768
|
+
"with_secret_reference",
|
|
769
|
+
"with_prompt_deployment",
|
|
770
|
+
"with_subworkflow_deployment",
|
|
771
|
+
],
|
|
772
|
+
)
|
|
773
|
+
def test_push__workspace_option__uses_different_api_key(mock_module, vellum_client_class, file_data):
|
|
490
774
|
# GIVEN a single workflow configured
|
|
491
775
|
temp_dir = mock_module.temp_dir
|
|
492
776
|
module = mock_module.module
|
|
@@ -521,7 +805,8 @@ MY_OTHER_VELLUM_API_KEY=aaabbbcccddd
|
|
|
521
805
|
)
|
|
522
806
|
|
|
523
807
|
# AND a workflow exists in the module successfully
|
|
524
|
-
|
|
808
|
+
for file_name, content in file_data.items():
|
|
809
|
+
_ensure_file(temp_dir, module, file_name, content)
|
|
525
810
|
|
|
526
811
|
# AND the push API call returns a new workflow sandbox id
|
|
527
812
|
new_workflow_sandbox_id = str(uuid4())
|
|
@@ -547,8 +832,84 @@ MY_OTHER_VELLUM_API_KEY=aaabbbcccddd
|
|
|
547
832
|
vellum_client_class.assert_called_once_with(
|
|
548
833
|
api_key="aaabbbcccddd",
|
|
549
834
|
environment=mock.ANY,
|
|
835
|
+
api_version=None,
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
# AND the vellum lock file should have been updated with the correct workspace
|
|
839
|
+
with open(os.path.join(temp_dir, "vellum.lock.json")) as f:
|
|
840
|
+
lock_file_content = json.load(f)
|
|
841
|
+
assert lock_file_content["workflows"][1] == {
|
|
842
|
+
"module": module,
|
|
843
|
+
"workflow_sandbox_id": new_workflow_sandbox_id,
|
|
844
|
+
"workspace": "my_other_workspace",
|
|
845
|
+
"container_image_name": None,
|
|
846
|
+
"container_image_tag": None,
|
|
847
|
+
"deployments": [],
|
|
848
|
+
"ignore": None,
|
|
849
|
+
"target_directory": None,
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
@pytest.mark.usefixtures("info_log_level")
|
|
854
|
+
def test_push__workspace_option__uses_different_api_url_env(mock_module, mock_httpx_transport):
|
|
855
|
+
# GIVEN a single workflow configured
|
|
856
|
+
temp_dir = mock_module.temp_dir
|
|
857
|
+
module = mock_module.module
|
|
858
|
+
workflow_sandbox_id = mock_module.workflow_sandbox_id
|
|
859
|
+
set_pyproject_toml = mock_module.set_pyproject_toml
|
|
860
|
+
|
|
861
|
+
# AND a different workspace is set in the pyproject.toml
|
|
862
|
+
set_pyproject_toml(
|
|
863
|
+
{
|
|
864
|
+
"workflows": [
|
|
865
|
+
{
|
|
866
|
+
"module": module,
|
|
867
|
+
"workflow_sandbox_id": workflow_sandbox_id,
|
|
868
|
+
}
|
|
869
|
+
],
|
|
870
|
+
"workspaces": [
|
|
871
|
+
{
|
|
872
|
+
"name": "my_other_workspace",
|
|
873
|
+
"api_url": "MY_OTHER_VELLUM_API_URL",
|
|
874
|
+
}
|
|
875
|
+
],
|
|
876
|
+
}
|
|
877
|
+
)
|
|
878
|
+
|
|
879
|
+
# AND the .env file has the other api key stored
|
|
880
|
+
with open(os.path.join(temp_dir, ".env"), "w") as f:
|
|
881
|
+
f.write(
|
|
882
|
+
"""\
|
|
883
|
+
VELLUM_API_KEY=abcdef123456
|
|
884
|
+
MY_OTHER_VELLUM_API_URL=https://app.aws-vpc-staging.vellum.ai
|
|
885
|
+
"""
|
|
886
|
+
)
|
|
887
|
+
|
|
888
|
+
# AND a workflow exists in the module successfully
|
|
889
|
+
_ensure_workflow_py(temp_dir, module)
|
|
890
|
+
|
|
891
|
+
# AND the push API call returns a new workflow sandbox id
|
|
892
|
+
new_workflow_sandbox_id = str(uuid4())
|
|
893
|
+
mock_httpx_transport.handle_request.return_value = Response(
|
|
894
|
+
status_code=200,
|
|
895
|
+
text=json.dumps(
|
|
896
|
+
{
|
|
897
|
+
"workflow_sandbox_id": new_workflow_sandbox_id,
|
|
898
|
+
}
|
|
899
|
+
),
|
|
550
900
|
)
|
|
551
901
|
|
|
902
|
+
# WHEN calling `vellum push` on strict mode
|
|
903
|
+
runner = CliRunner()
|
|
904
|
+
result = runner.invoke(cli_main, ["push", module, "--workspace", "my_other_workspace"])
|
|
905
|
+
|
|
906
|
+
# THEN it should succeed
|
|
907
|
+
assert result.exit_code == 0, result.output
|
|
908
|
+
|
|
909
|
+
# AND we should have called the push API once with the correct api url
|
|
910
|
+
request = mock_httpx_transport.handle_request.call_args[0][0]
|
|
911
|
+
assert str(request.url) == "https://app.aws-vpc-staging.vellum.ai/v1/workflows/push"
|
|
912
|
+
|
|
552
913
|
# AND the vellum lock file should have been updated with the correct workspace
|
|
553
914
|
with open(os.path.join(temp_dir, "vellum.lock.json")) as f:
|
|
554
915
|
lock_file_content = json.load(f)
|
|
@@ -563,6 +924,9 @@ MY_OTHER_VELLUM_API_KEY=aaabbbcccddd
|
|
|
563
924
|
"target_directory": None,
|
|
564
925
|
}
|
|
565
926
|
|
|
927
|
+
# AND the new URL is in the message at the end
|
|
928
|
+
assert "Visit at: https://app.aws-vpc-staging.vellum.ai/workflow-sandboxes/" in result.output
|
|
929
|
+
|
|
566
930
|
|
|
567
931
|
def test_push__workspace_option__both_options_already_configured(mock_module, vellum_client_class):
|
|
568
932
|
# GIVEN a single workflow configured
|
|
@@ -630,6 +994,7 @@ MY_OTHER_VELLUM_API_KEY=aaabbbcccddd
|
|
|
630
994
|
vellum_client_class.assert_called_once_with(
|
|
631
995
|
api_key="aaabbbcccddd",
|
|
632
996
|
environment=mock.ANY,
|
|
997
|
+
api_version=None,
|
|
633
998
|
)
|
|
634
999
|
|
|
635
1000
|
# AND the vellum lock file should have the same two workflows
|
|
@@ -686,3 +1051,327 @@ def test_push__create_new_config_for_existing_module(mock_module, vellum_client)
|
|
|
686
1051
|
new_config = new_configs[0]
|
|
687
1052
|
assert new_config["workflow_sandbox_id"] == new_workflow_sandbox_id
|
|
688
1053
|
assert new_config["workspace"] == "default"
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
def test_push__use_default_workspace_if_not_specified__multiple_workflows_configured(mock_module, vellum_client):
|
|
1057
|
+
# GIVEN a config with a workspace configured
|
|
1058
|
+
temp_dir = mock_module.temp_dir
|
|
1059
|
+
module = mock_module.module
|
|
1060
|
+
workflow_sandbox_id = str(uuid4())
|
|
1061
|
+
mock_module.set_pyproject_toml(
|
|
1062
|
+
{
|
|
1063
|
+
"workspaces": [
|
|
1064
|
+
{"name": "my_other_workspace"},
|
|
1065
|
+
],
|
|
1066
|
+
"workflows": [
|
|
1067
|
+
{"module": module, "workflow_sandbox_id": workflow_sandbox_id, "workspace": "default"},
|
|
1068
|
+
{"module": module, "workflow_sandbox_id": str(uuid4()), "workspace": "my_other_workspace"},
|
|
1069
|
+
],
|
|
1070
|
+
}
|
|
1071
|
+
)
|
|
1072
|
+
|
|
1073
|
+
# AND a workflow exists in the module successfully
|
|
1074
|
+
_ensure_workflow_py(temp_dir, module)
|
|
1075
|
+
|
|
1076
|
+
# AND the push API call returns successfully
|
|
1077
|
+
vellum_client.workflows.push.return_value = WorkflowPushResponse(
|
|
1078
|
+
workflow_sandbox_id=workflow_sandbox_id,
|
|
1079
|
+
)
|
|
1080
|
+
|
|
1081
|
+
# WHEN calling `vellum push` with a module without a workspace specified
|
|
1082
|
+
runner = CliRunner()
|
|
1083
|
+
result = runner.invoke(cli_main, ["workflows", "push", module])
|
|
1084
|
+
|
|
1085
|
+
# THEN it should succeed
|
|
1086
|
+
assert result.exit_code == 0, result.output
|
|
1087
|
+
|
|
1088
|
+
# AND check that lockfile should maintain that this workflow is using the default workspace
|
|
1089
|
+
with open(os.path.join(temp_dir, "vellum.lock.json")) as f:
|
|
1090
|
+
lock_file_content = json.load(f)
|
|
1091
|
+
configs = [w for w in lock_file_content["workflows"] if w["module"] == module]
|
|
1092
|
+
assert len(configs) == 2
|
|
1093
|
+
config = configs[0]
|
|
1094
|
+
assert config["workflow_sandbox_id"] == workflow_sandbox_id
|
|
1095
|
+
assert config["workspace"] == "default"
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
def test_push__deploy_with_malformed_release_tags_shows_friendly_validation_error(mock_module, vellum_client):
|
|
1099
|
+
# GIVEN a single workflow configured
|
|
1100
|
+
temp_dir = mock_module.temp_dir
|
|
1101
|
+
module = mock_module.module
|
|
1102
|
+
|
|
1103
|
+
# AND a workflow exists in the module successfully
|
|
1104
|
+
_ensure_workflow_py(temp_dir, module)
|
|
1105
|
+
|
|
1106
|
+
# AND the push API call would return successfully
|
|
1107
|
+
vellum_client.workflows.push.return_value = WorkflowPushResponse(
|
|
1108
|
+
workflow_sandbox_id=str(uuid4()),
|
|
1109
|
+
)
|
|
1110
|
+
|
|
1111
|
+
# WHEN calling `vellum workflows push` with --deploy and --release-tag
|
|
1112
|
+
runner = CliRunner()
|
|
1113
|
+
result = runner.invoke(cli_main, ["workflows", "push", module, "--deploy", "--release-tag", None]) # type: ignore
|
|
1114
|
+
|
|
1115
|
+
# THEN it should show the friendly error message instead of a raw Pydantic traceback
|
|
1116
|
+
assert "Invalid release tag format" in result.output
|
|
1117
|
+
assert "Release tags must be provided as separate arguments" in result.output
|
|
1118
|
+
assert "--release-tag tag1 --release-tag tag2" in result.output
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
@pytest.mark.usefixtures("info_log_level")
|
|
1122
|
+
def test_push__deploy_with_release_tags_success(mock_module, vellum_client):
|
|
1123
|
+
# GIVEN a single workflow configured
|
|
1124
|
+
temp_dir = mock_module.temp_dir
|
|
1125
|
+
module = mock_module.module
|
|
1126
|
+
|
|
1127
|
+
# AND a workflow exists in the module successfully
|
|
1128
|
+
_ensure_workflow_py(temp_dir, module)
|
|
1129
|
+
|
|
1130
|
+
# AND the push API call returns successfully
|
|
1131
|
+
workflow_deployment_id = str(uuid4())
|
|
1132
|
+
vellum_client.workflows.push.return_value = WorkflowPushResponse(
|
|
1133
|
+
workflow_sandbox_id=str(uuid4()),
|
|
1134
|
+
workflow_deployment_id=workflow_deployment_id,
|
|
1135
|
+
)
|
|
1136
|
+
|
|
1137
|
+
# WHEN calling `vellum workflows push` with --deploy and --release-tag
|
|
1138
|
+
runner = CliRunner()
|
|
1139
|
+
result = runner.invoke(cli_main, ["workflows", "push", module, "--deploy", "--release-tag", "v1.0.0"])
|
|
1140
|
+
|
|
1141
|
+
# THEN it should succeed
|
|
1142
|
+
assert result.exit_code == 0, result.output
|
|
1143
|
+
|
|
1144
|
+
# AND we should have called the push API with the correct deployment config
|
|
1145
|
+
vellum_client.workflows.push.assert_called_once()
|
|
1146
|
+
call_args = vellum_client.workflows.push.call_args.kwargs
|
|
1147
|
+
|
|
1148
|
+
# AND the deployment_config should contain the release tags
|
|
1149
|
+
deployment_config_str = call_args["deployment_config"]
|
|
1150
|
+
deployment_config = json.loads(deployment_config_str)
|
|
1151
|
+
assert deployment_config["release_tags"] == ["v1.0.0"]
|
|
1152
|
+
|
|
1153
|
+
# AND should show success message
|
|
1154
|
+
assert "Successfully pushed" in result.output
|
|
1155
|
+
assert "Updated vellum.lock.json file." in result.output
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
@pytest.mark.usefixtures("info_log_level")
|
|
1159
|
+
def test_push__deploy_with_release_description_success(mock_module, vellum_client):
|
|
1160
|
+
# GIVEN a single workflow configured
|
|
1161
|
+
temp_dir = mock_module.temp_dir
|
|
1162
|
+
module = mock_module.module
|
|
1163
|
+
|
|
1164
|
+
# AND a workflow exists in the module successfully
|
|
1165
|
+
_ensure_workflow_py(temp_dir, module)
|
|
1166
|
+
|
|
1167
|
+
# AND the push API call returns successfully
|
|
1168
|
+
workflow_deployment_id = str(uuid4())
|
|
1169
|
+
vellum_client.workflows.push.return_value = WorkflowPushResponse(
|
|
1170
|
+
workflow_sandbox_id=str(uuid4()),
|
|
1171
|
+
workflow_deployment_id=workflow_deployment_id,
|
|
1172
|
+
)
|
|
1173
|
+
|
|
1174
|
+
# WHEN calling `vellum workflows push` with --deploy and --release-description
|
|
1175
|
+
runner = CliRunner()
|
|
1176
|
+
result = runner.invoke(
|
|
1177
|
+
cli_main, ["workflows", "push", module, "--deploy", "--release-description", "This is a test release"]
|
|
1178
|
+
)
|
|
1179
|
+
|
|
1180
|
+
# THEN it should succeed
|
|
1181
|
+
assert result.exit_code == 0, result.output
|
|
1182
|
+
|
|
1183
|
+
# AND we should have called the push API with the correct deployment config
|
|
1184
|
+
vellum_client.workflows.push.assert_called_once()
|
|
1185
|
+
call_args = vellum_client.workflows.push.call_args.kwargs
|
|
1186
|
+
|
|
1187
|
+
# AND the deployment_config should contain the release description
|
|
1188
|
+
deployment_config_str = call_args["deployment_config"]
|
|
1189
|
+
deployment_config = json.loads(deployment_config_str)
|
|
1190
|
+
assert deployment_config["release_description"] == "This is a test release"
|
|
1191
|
+
|
|
1192
|
+
# AND should show success message
|
|
1193
|
+
assert "Successfully pushed" in result.output
|
|
1194
|
+
assert "Updated vellum.lock.json file." in result.output
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
def test_push__deploy_stores_deployment_config_in_lock_file(mock_module, vellum_client):
|
|
1198
|
+
# GIVEN a single workflow
|
|
1199
|
+
temp_dir = mock_module.temp_dir
|
|
1200
|
+
module = mock_module.module
|
|
1201
|
+
|
|
1202
|
+
# AND a workflow exists in the module successfully
|
|
1203
|
+
_ensure_workflow_py(temp_dir, module)
|
|
1204
|
+
|
|
1205
|
+
# AND the push API call returns successfully with a deployment
|
|
1206
|
+
workflow_deployment_id = str(uuid4())
|
|
1207
|
+
vellum_client.workflows.push.return_value = WorkflowPushResponse(
|
|
1208
|
+
workflow_sandbox_id=str(uuid4()),
|
|
1209
|
+
workflow_deployment_id=workflow_deployment_id,
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
# WHEN calling `vellum workflows push --deploy` for the first time
|
|
1213
|
+
runner = CliRunner()
|
|
1214
|
+
result = runner.invoke(cli_main, ["workflows", "push", module, "--deploy"])
|
|
1215
|
+
|
|
1216
|
+
# THEN it should succeed
|
|
1217
|
+
assert result.exit_code == 0, result.output
|
|
1218
|
+
|
|
1219
|
+
# AND the deployment config should be stored in the lock file with the deployment ID and module name
|
|
1220
|
+
with open(os.path.join(temp_dir, "vellum.lock.json")) as f:
|
|
1221
|
+
lock_data = json.loads(f.read())
|
|
1222
|
+
assert len(lock_data["workflows"][0]["deployments"]) == 1
|
|
1223
|
+
deployment = lock_data["workflows"][0]["deployments"][0]
|
|
1224
|
+
assert str(deployment["id"]) == workflow_deployment_id
|
|
1225
|
+
assert deployment["name"] == "test-push-deploy-stores-deployment-config-in-lock-file"
|
|
1226
|
+
assert deployment.get("label") is None
|
|
1227
|
+
assert deployment.get("description") is None
|
|
1228
|
+
assert deployment.get("release_tags") is None
|
|
1229
|
+
|
|
1230
|
+
# AND when we do a second push
|
|
1231
|
+
vellum_client.workflows.push.reset_mock()
|
|
1232
|
+
vellum_client.workflows.push.return_value = WorkflowPushResponse(
|
|
1233
|
+
workflow_sandbox_id=str(uuid4()),
|
|
1234
|
+
workflow_deployment_id=workflow_deployment_id,
|
|
1235
|
+
)
|
|
1236
|
+
|
|
1237
|
+
result = runner.invoke(cli_main, ["workflows", "push", module, "--deploy"])
|
|
1238
|
+
|
|
1239
|
+
# THEN it should succeed
|
|
1240
|
+
assert result.exit_code == 0, result.output
|
|
1241
|
+
|
|
1242
|
+
# AND we should have called the push API with the module name as deployment name
|
|
1243
|
+
vellum_client.workflows.push.assert_called_once()
|
|
1244
|
+
call_args = vellum_client.workflows.push.call_args.kwargs
|
|
1245
|
+
deployment_config_str = call_args["deployment_config"]
|
|
1246
|
+
deployment_config = json.loads(deployment_config_str)
|
|
1247
|
+
assert deployment_config["name"] == "test-push-deploy-stores-deployment-config-in-lock-file"
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
def test_push__custom_workspace_in_lockfile__uses_custom_workspace_without_flag(mock_module, vellum_client_class):
|
|
1251
|
+
"""
|
|
1252
|
+
Tests that push respects the custom workspace from the lockfile when no --workspace flag is provided.
|
|
1253
|
+
"""
|
|
1254
|
+
|
|
1255
|
+
# GIVEN a workflow already configured in the lockfile with a custom workspace
|
|
1256
|
+
temp_dir = mock_module.temp_dir
|
|
1257
|
+
module = mock_module.module
|
|
1258
|
+
workflow_sandbox_id = mock_module.workflow_sandbox_id
|
|
1259
|
+
set_pyproject_toml = mock_module.set_pyproject_toml
|
|
1260
|
+
|
|
1261
|
+
# AND the lockfile has the workflow with a custom workspace
|
|
1262
|
+
with open(os.path.join(temp_dir, "vellum.lock.json"), "w") as f:
|
|
1263
|
+
json.dump(
|
|
1264
|
+
{
|
|
1265
|
+
"version": "1.0",
|
|
1266
|
+
"workflows": [
|
|
1267
|
+
{
|
|
1268
|
+
"module": module,
|
|
1269
|
+
"workflow_sandbox_id": workflow_sandbox_id,
|
|
1270
|
+
"workspace": "my_custom_workspace",
|
|
1271
|
+
"container_image_name": None,
|
|
1272
|
+
"container_image_tag": None,
|
|
1273
|
+
"deployments": [],
|
|
1274
|
+
"ignore": None,
|
|
1275
|
+
"target_directory": None,
|
|
1276
|
+
}
|
|
1277
|
+
],
|
|
1278
|
+
"workspaces": [],
|
|
1279
|
+
},
|
|
1280
|
+
f,
|
|
1281
|
+
indent=2,
|
|
1282
|
+
)
|
|
1283
|
+
|
|
1284
|
+
# AND the custom workspace is defined in pyproject.toml
|
|
1285
|
+
set_pyproject_toml(
|
|
1286
|
+
{
|
|
1287
|
+
"workflows": [],
|
|
1288
|
+
"workspaces": [
|
|
1289
|
+
{
|
|
1290
|
+
"name": "my_custom_workspace",
|
|
1291
|
+
"api_key": "MY_CUSTOM_VELLUM_API_KEY",
|
|
1292
|
+
}
|
|
1293
|
+
],
|
|
1294
|
+
}
|
|
1295
|
+
)
|
|
1296
|
+
|
|
1297
|
+
# AND the .env file has the custom api key
|
|
1298
|
+
with open(os.path.join(temp_dir, ".env"), "w") as f:
|
|
1299
|
+
f.write(
|
|
1300
|
+
"""\
|
|
1301
|
+
VELLUM_API_KEY=abcdef123456
|
|
1302
|
+
MY_CUSTOM_VELLUM_API_KEY=custom-key-xyz
|
|
1303
|
+
"""
|
|
1304
|
+
)
|
|
1305
|
+
|
|
1306
|
+
# AND a workflow exists in the module
|
|
1307
|
+
_ensure_workflow_py(temp_dir, module)
|
|
1308
|
+
|
|
1309
|
+
# AND the push API returns successfully
|
|
1310
|
+
vellum_client_class.return_value.workflows.push.return_value = WorkflowPushResponse(
|
|
1311
|
+
workflow_sandbox_id=workflow_sandbox_id,
|
|
1312
|
+
)
|
|
1313
|
+
vellum_client_class.return_value._client_wrapper._environment.default = "https://api.vellum.ai/v1"
|
|
1314
|
+
|
|
1315
|
+
# WHEN calling `vellum push` WITHOUT the --workspace flag
|
|
1316
|
+
runner = CliRunner()
|
|
1317
|
+
result = runner.invoke(cli_main, ["push", module])
|
|
1318
|
+
|
|
1319
|
+
# THEN it should succeed
|
|
1320
|
+
assert result.exit_code == 0, result.output
|
|
1321
|
+
|
|
1322
|
+
# AND the custom workspace API key should have been used
|
|
1323
|
+
vellum_client_class.assert_called_once_with(
|
|
1324
|
+
api_key="custom-key-xyz",
|
|
1325
|
+
environment=mock.ANY,
|
|
1326
|
+
api_version=None,
|
|
1327
|
+
)
|
|
1328
|
+
|
|
1329
|
+
with open(os.path.join(temp_dir, "vellum.lock.json")) as f:
|
|
1330
|
+
lock_file_content = json.load(f)
|
|
1331
|
+
assert len(lock_file_content["workflows"]) == 1
|
|
1332
|
+
assert lock_file_content["workflows"][0]["workspace"] == "my_custom_workspace"
|
|
1333
|
+
assert lock_file_content["workflows"][0]["workflow_sandbox_id"] == workflow_sandbox_id
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
def test_push__workspace_option__nonexistent_workspace_should_fail(mock_module):
|
|
1337
|
+
"""
|
|
1338
|
+
Tests that pushing with a nonexistent workspace that isn't default should fail.
|
|
1339
|
+
"""
|
|
1340
|
+
|
|
1341
|
+
# GIVEN a single workflow configured
|
|
1342
|
+
temp_dir = mock_module.temp_dir
|
|
1343
|
+
module = mock_module.module
|
|
1344
|
+
set_pyproject_toml = mock_module.set_pyproject_toml
|
|
1345
|
+
|
|
1346
|
+
# AND a custom workspace is configured
|
|
1347
|
+
set_pyproject_toml(
|
|
1348
|
+
{
|
|
1349
|
+
"workflows": [
|
|
1350
|
+
{
|
|
1351
|
+
"module": module,
|
|
1352
|
+
}
|
|
1353
|
+
],
|
|
1354
|
+
"workspaces": [
|
|
1355
|
+
{
|
|
1356
|
+
"name": "my_custom_workspace",
|
|
1357
|
+
"api_key": "MY_CUSTOM_VELLUM_API_KEY",
|
|
1358
|
+
}
|
|
1359
|
+
],
|
|
1360
|
+
}
|
|
1361
|
+
)
|
|
1362
|
+
|
|
1363
|
+
# AND a workflow exists in the module successfully
|
|
1364
|
+
_ensure_workflow_py(temp_dir, module)
|
|
1365
|
+
|
|
1366
|
+
# WHEN calling `vellum push` with a nonexistent workspace
|
|
1367
|
+
runner = CliRunner()
|
|
1368
|
+
result = runner.invoke(cli_main, ["push", module, "--workspace", "nonexistent_workspace"])
|
|
1369
|
+
|
|
1370
|
+
# THEN it should exit with an error
|
|
1371
|
+
assert result.exit_code == 1
|
|
1372
|
+
|
|
1373
|
+
# AND the error message should indicate the workspace doesn't exist
|
|
1374
|
+
assert "Workspace 'nonexistent_workspace' not found in config" in result.output
|
|
1375
|
+
assert "Available workspaces:" in result.output
|
|
1376
|
+
assert "default" in result.output
|
|
1377
|
+
assert "my_custom_workspace" in result.output
|