Skip to content

Commit b3ea8e3

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: Add support for agent gateway in agent engine
PiperOrigin-RevId: 897784392
1 parent 7932c2b commit b3ea8e3

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

src/genai/converters/_agentengines_converters.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ export function createAgentEngineConfigToVertex(
112112
common.setValueByPath(parentObject, ['pythonVersion'], fromPythonVersion);
113113
}
114114

115+
const fromAgentGatewayConfig = common.getValueByPath(fromObject, [
116+
'agentGatewayConfig',
117+
]);
118+
if (parentObject !== undefined && fromAgentGatewayConfig != null) {
119+
common.setValueByPath(
120+
parentObject,
121+
['agentGatewayConfig'],
122+
fromAgentGatewayConfig,
123+
);
124+
}
125+
115126
return toObject;
116127
}
117128

@@ -362,6 +373,17 @@ export function updateAgentEngineConfigToVertex(
362373
common.setValueByPath(parentObject, ['pythonVersion'], fromPythonVersion);
363374
}
364375

376+
const fromAgentGatewayConfig = common.getValueByPath(fromObject, [
377+
'agentGatewayConfig',
378+
]);
379+
if (parentObject !== undefined && fromAgentGatewayConfig != null) {
380+
common.setValueByPath(
381+
parentObject,
382+
['agentGatewayConfig'],
383+
fromAgentGatewayConfig,
384+
);
385+
}
386+
365387
const fromUpdateMask = common.getValueByPath(fromObject, ['updateMask']);
366388
if (parentObject !== undefined && fromUpdateMask != null) {
367389
common.setValueByPath(

src/genai/types/common.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,8 @@ export declare interface CreateAgentEngineConfig {
657657
subdirectory and the path must be added to `extra_packages`.
658658
*/
659659
buildOptions?: Record<string, string[]>;
660+
/** Agent Gateway configuration for a Reasoning Engine deployment. */
661+
agentGatewayConfig?: ReasoningEngineSpecDeploymentSpecAgentGatewayConfig;
660662
}
661663

662664
/** Parameters for creating agent engines. */
@@ -983,6 +985,8 @@ export declare interface UpdateAgentEngineConfig {
983985
subdirectory and the path must be added to `extra_packages`.
984986
*/
985987
buildOptions?: Record<string, string[]>;
988+
/** Agent Gateway configuration for a Reasoning Engine deployment. */
989+
agentGatewayConfig?: ReasoningEngineSpecDeploymentSpecAgentGatewayConfig;
986990
/** The update mask to apply. For the `FieldMask` definition, see
987991
https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask. */
988992
updateMask?: string;
@@ -2418,6 +2422,8 @@ export declare interface AgentEngineConfig {
24182422
agentConfigSource?: ReasoningEngineSpecSourceCodeSpecAgentConfigSource;
24192423
/** The container spec for the Agent Engine. */
24202424
containerSpec?: ReasoningEngineSpecContainerSpec;
2425+
/** Agent Gateway configuration for a Reasoning Engine deployment. */
2426+
agentGatewayConfig?: ReasoningEngineSpecDeploymentSpecAgentGatewayConfig;
24212427
}
24222428

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

0 commit comments

Comments
 (0)