Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/converters/_agentengines_converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,18 @@ export function reasoningEngineFromVertex(
common.setValueByPath(toObject, ['trafficConfig'], fromTrafficConfig);
}

const fromRevisionGarbageCollectionStrategy = common.getValueByPath(
fromObject,
['revisionGarbageCollectionStrategy'],
);
if (fromRevisionGarbageCollectionStrategy != null) {
common.setValueByPath(
toObject,
['revisionGarbageCollectionStrategy'],
fromRevisionGarbageCollectionStrategy,
);
}

return toObject;
}

Expand Down
12 changes: 12 additions & 0 deletions src/converters/_memorybanks_converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,18 @@ export function reasoningEngineFromVertex(
common.setValueByPath(toObject, ['trafficConfig'], fromTrafficConfig);
}

const fromRevisionGarbageCollectionStrategy = common.getValueByPath(
fromObject,
['revisionGarbageCollectionStrategy'],
);
if (fromRevisionGarbageCollectionStrategy != null) {
common.setValueByPath(
toObject,
['revisionGarbageCollectionStrategy'],
fromRevisionGarbageCollectionStrategy,
);
}

return toObject;
}

Expand Down
14 changes: 14 additions & 0 deletions src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,18 @@ export declare interface ReasoningEngineTrafficConfig {
trafficSplitManual?: ReasoningEngineTrafficConfigTrafficSplitManual;
}

/** Keeps only the latest N Runtime Revisions active. */
export declare interface ReasoningEngineRevisionGarbageCollectionStrategyKeepNLatest {
/** Required. Specifies the maximum number of Runtime Revisions to keep active. If an update to Reasoning Engine would result in exceeding this number of active Runtime Revisions, a new Runtime Revision will be created, while the oldest Runtime Revision will be automatically deleted, providing it's not configured to serve traffic via `traffic_config`. If the oldest Runtime Revision is configured to serve traffic, the update will fail validation. No changes will be made to the Reasoning Engine, existing Runtime Revisions, and no new Runtime Revision will be created. */
maxRevisions?: number;
}

/** Configures garbage collection of Runtime Revisions. */
export declare interface ReasoningEngineRevisionGarbageCollectionStrategy {
/** Optional. Keeps only the latest N Runtime Revisions active. */
keepNLatest?: ReasoningEngineRevisionGarbageCollectionStrategyKeepNLatest;
}

/** An agent engine. */
export declare interface ReasoningEngine {
/** Customer-managed encryption key spec for a ReasoningEngine. If set, this ReasoningEngine and all sub-resources of this ReasoningEngine will be secured by this key. */
Expand All @@ -975,6 +987,8 @@ export declare interface ReasoningEngine {
updateTime?: string;
/** Optional. Traffic distribution configuration for the Reasoning Engine. */
trafficConfig?: ReasoningEngineTrafficConfig;
/** Optional. Configures garbage collection of Runtime Revisions. */
revisionGarbageCollectionStrategy?: ReasoningEngineRevisionGarbageCollectionStrategy;
}

/** Operation that has an agent engine as a response. */
Expand Down
Loading