From bd5f32d634d0dfd6a367c1ea707643ab99161d4e Mon Sep 17 00:00:00 2001 From: Google APIs Date: Tue, 14 Oct 2025 12:35:11 -0700 Subject: [PATCH] feat: Add support for Inline source based deployment docs: A comment for message `ReasoningEngineSpec` is changed docs: A comment for field `package_spec` in message `.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec` is changed PiperOrigin-RevId: 819349769 --- .../aiplatform/v1beta1/reasoning_engine.proto | 79 +++++++++++++++++-- 1 file changed, 74 insertions(+), 5 deletions(-) diff --git a/google/cloud/aiplatform/v1beta1/reasoning_engine.proto b/google/cloud/aiplatform/v1beta1/reasoning_engine.proto index 126f0843b2..6e14c18fac 100644 --- a/google/cloud/aiplatform/v1beta1/reasoning_engine.proto +++ b/google/cloud/aiplatform/v1beta1/reasoning_engine.proto @@ -35,7 +35,8 @@ option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; // ReasoningEngine configurations message ReasoningEngineSpec { - // User provided package spec like pickled object and package requirements. + // User-provided package specification, containing pickled object and package + // requirements. message PackageSpec { // Optional. The Cloud Storage URI of the pickled python object. string pickle_object_gcs_uri = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -72,20 +73,23 @@ message ReasoningEngineSpec { [(google.api.field_behavior) = OPTIONAL]; // Optional. The minimum number of application instances that will be kept - // running at all times. Defaults to 1. + // running at all times. Defaults to 1. Range: [0, 10]. optional int32 min_instances = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of application instances that can be - // launched to handle increased traffic. Defaults to 100. + // launched to handle increased traffic. Defaults to 100. Range: [1, 1000]. + // + // If VPC-SC or PSC-I is enabled, the acceptable range is [1, 100]. optional int32 max_instances = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Resource limits for each container. Only 'cpu' and 'memory' // keys are supported. Defaults to {"cpu": "4", "memory": "4Gi"}. // - // * The only supported values for CPU are '1', '2', '4', and '8'. For + // * The only supported values for CPU are '1', '2', '4', '6' and '8'. For // more information, go to // https://cloud.google.com/run/docs/configuring/cpu. - // * For supported 'memory' values and syntax, go to + // * The only supported values for memory are '1Gi', '2Gi', ... '32 Gi'. + // * For required cpu on different memory values, go to // https://cloud.google.com/run/docs/configuring/memory-limits map resource_limits = 7 [(google.api.field_behavior) = OPTIONAL]; @@ -96,6 +100,66 @@ message ReasoningEngineSpec { [(google.api.field_behavior) = OPTIONAL]; } + // Specification for deploying from source code. + message SourceCodeSpec { + // Specifies source code provided as a byte stream. + message InlineSource { + // Required. Input only. The application source code archive, provided as + // a compressed tarball + // (.tar.gz) file. + bytes source_archive = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + } + + // Specification for running a Python application from source. + message PythonSpec { + // Optional. The version of Python to use. Support version + // includes 3.9, 3.10, 3.11, 3.12, 3.13. + // If not specified, default value is 3.10. + string version = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Python module to load as the entrypoint, specified as a + // fully qualified module name. For example: path.to.agent. + // If not specified, defaults to "agent". + // + // The project root will be added to Python sys.path, allowing imports + // to be specified relative to the root. + string entrypoint_module = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the callable object within the + // `entrypoint_module` to use as the application If not specified, + // defaults to "root_agent". + string entrypoint_object = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The path to the requirements file, relative to the source + // root. If not specified, defaults to "requirements.txt". + string requirements_file = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Specifies where the source code is located. + oneof source { + // Source code is provided directly in the request. + InlineSource inline_source = 1; + } + + // Specifies the language-specific configuration for building and running + // the code. + oneof language_spec { + // Configuration for a Python application. + PythonSpec python_spec = 2; + } + } + + // Defines the source for the deployment. + // The `package_spec` field should not be set if `deployment_source` is + // specified. + oneof deployment_source { + // Deploy from source code files with a defined entrypoint. + SourceCodeSpec source_code_spec = 11; + } + // Optional. The service account that the Reasoning Engine artifact runs as. // It should have "roles/storage.objectViewer" for reading the user project's // Cloud Storage and "roles/aiplatform.user" for using Vertex extensions. If @@ -107,6 +171,8 @@ message ReasoningEngineSpec { // Ignored when users directly specify a deployment image through // `deployment_spec.first_party_image_override`, but keeping the // field_behavior to avoid introducing breaking changes. + // The `deployment_source` field should not be set if `package_spec` is + // specified. PackageSpec package_spec = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The specification of a Reasoning Engine deployment. @@ -168,6 +234,9 @@ message ReasoningEngine { // ReasoningEngine and all sub-resources of this ReasoningEngine will be // secured by this key. EncryptionSpec encryption_spec = 11; + + // Labels for the ReasoningEngine. + map labels = 17; } // Configuration for how Agent Engine sub-resources should manage context.