Skip to content

Commit 5c5ca47

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: add support for keep alive probe in agent engines
Keep alive probe allows reasoning engine users to configure a probe that a deployment host can use to keep the container alive, based on the probe settings. If the keep alive endpoint returns a 2xx status, the deployment host will make a best effort (up to 1 hour) to keep the container alive. Reasoning engine users with custom container specs (BYOC) have the option to configure a custom keep alive probe while the users without custom container specs (BYOC) have the option to configure an empty keep alive probe {} and the reasoning engine platform will handle the configuration and logic for keep alive probe. To opt in, users should set the keep alive probe field when creating or updating reasoning engines. PiperOrigin-RevId: 889254469
1 parent 4a1a387 commit 5c5ca47

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/genai/types/common.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,22 @@ export declare interface SecretEnvVar {
240240
secretRef?: SecretRef;
241241
}
242242

243+
/** Specifies the HTTP GET configuration for the probe. */
244+
export declare interface KeepAliveProbeHttpGet {
245+
/** Required. Specifies the path of the HTTP GET request (e.g., "/is_busy"). */
246+
path?: string;
247+
/** Optional. Specifies the port number on the container to which the request is sent. */
248+
port?: number;
249+
}
250+
251+
/** Represents the configuration for keep-alive probe. Contains configuration on a specified endpoint that a deployment host should use to keep the container alive based on the probe settings. */
252+
export declare interface KeepAliveProbe {
253+
/** Optional. Specifies the HTTP GET configuration for the probe. */
254+
httpGet?: KeepAliveProbeHttpGet;
255+
/** Optional. Specifies the maximum duration (in seconds) to keep the instance alive via this probe. Can be a maximum of 3600 seconds (1 hour). */
256+
maxSeconds?: number;
257+
}
258+
243259
/** The specification of a Reasoning Engine deployment. */
244260
export declare interface ReasoningEngineSpecDeploymentSpec {
245261
/** The agent server mode. */
@@ -258,6 +274,8 @@ export declare interface ReasoningEngineSpecDeploymentSpec {
258274
resourceLimits?: Record<string, string>;
259275
/** Optional. Environment variables where the value is a secret in Cloud Secret Manager. To use this feature, add 'Secret Manager Secret Accessor' role (roles/secretmanager.secretAccessor) to AI Platform Reasoning Engine Service Agent. */
260276
secretEnv?: SecretEnvVar[];
277+
/** Optional. Specifies the configuration for keep-alive probe. Contains configuration on a specified endpoint that a deployment host should use to keep the container alive based on the probe settings. */
278+
keepAliveProbe?: KeepAliveProbe;
261279
}
262280

263281
/** User-provided package specification, containing pickled object and package requirements. */
@@ -611,6 +629,10 @@ export declare interface CreateAgentEngineConfig {
611629
subdirectory and the path must be added to `extra_packages`.
612630
*/
613631
buildOptions?: Record<string, string[]>;
632+
/** Optional. Specifies the configuration for keep-alive probe.
633+
Contains configuration on a specified endpoint that a deployment host
634+
should use to keep the container alive based on the probe settings. */
635+
keepAliveProbe?: KeepAliveProbe;
614636
}
615637

616638
/** Parameters for creating agent engines. */
@@ -910,6 +932,10 @@ export declare interface UpdateAgentEngineConfig {
910932
subdirectory and the path must be added to `extra_packages`.
911933
*/
912934
buildOptions?: Record<string, string[]>;
935+
/** Optional. Specifies the configuration for keep-alive probe.
936+
Contains configuration on a specified endpoint that a deployment host
937+
should use to keep the container alive based on the probe settings. */
938+
keepAliveProbe?: KeepAliveProbe;
913939
/** The update mask to apply. For the `FieldMask` definition, see
914940
https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask. */
915941
updateMask?: string;
@@ -2341,6 +2367,10 @@ export declare interface AgentEngineConfig {
23412367
agentConfigSource?: ReasoningEngineSpecSourceCodeSpecAgentConfigSource;
23422368
/** The container spec for the Agent Engine. */
23432369
containerSpec?: ReasoningEngineSpecContainerSpec;
2370+
/** Optional. Specifies the configuration for keep-alive probe.
2371+
Contains configuration on a specified endpoint that a deployment host
2372+
should use to keep the container alive based on the probe settings. */
2373+
keepAliveProbe?: KeepAliveProbe;
23442374
}
23452375

23462376
/** Config for checking a query job on an agent engine. */

0 commit comments

Comments
 (0)