Skip to content

GCP.AIPlatform reference

Source: packages/gcp/src/AIPlatform/Agent.ts

A Vertex AI Agent — instructions and tool configuration for an LLM task.

Agent id, location, and base agent are immutable. Description, system instruction, tools, and metadata update in place. Alchemy ownership is stored in metadata (and mirrored in description) so list / nuke can find the agent.

Generated id

const agent = yield* GCP.AIPlatform.Agent("Support", {
systemInstruction: "Answer product questions briefly.",
metadata: { env: "test" },
});

Explicit id and a search tool

const agent = yield* GCP.AIPlatform.Agent("Research", {
agentId: "research-bot",
tools: [{ type: "google_search" }],
});

Source: packages/gcp/src/AIPlatform/BatchPredictionJob.ts

A Vertex AI BatchPredictionJob — offline predictions over many instances.

Creating a job starts it immediately. There is no update API, so reconcile is observe-ensure. Delete can only run after the job finishes; Alchemy cancels first. Alchemy ownership labels are merged into labels so list / nuke can find the job.

BatchPredictionJob: Creating a Batch Prediction Job

Section titled “BatchPredictionJob: Creating a Batch Prediction Job”
const job = yield* GCP.AIPlatform.BatchPredictionJob("Nightly", {
displayName: "nightly-scores",
model: "projects/my-project/locations/us-central1/models/my-model",
inputConfig: {
instancesFormat: "jsonl",
gcsSource: { uris: ["gs://bucket/input.jsonl"] },
},
outputConfig: {
predictionsFormat: "jsonl",
gcsDestination: { outputUriPrefix: "gs://bucket/out/" },
},
});

Source: packages/gcp/src/AIPlatform/CachedContent.ts

Vertex AI cached content — explicit context cache for LLM queries.

Cached content has no labels field, so Alchemy stamps ownership into displayName for list / nuke. Model, contents, system instruction, and CMEK are immutable. TTL / expire time update in place.

const cache = yield* GCP.AIPlatform.CachedContent("Style", {
model:
"projects/my-project/locations/us-central1/publishers/google/models/gemini-2.0-flash-001",
ttl: "3600s",
contents: [
{ role: "user", parts: [{ text: "You are a terse assistant." }] },
],
});
// Same logical id, changed TTL: the engine updates it in place.
const cache = yield* GCP.AIPlatform.CachedContent("Style", {
model:
"projects/my-project/locations/us-central1/publishers/google/models/gemini-2.0-flash-001",
ttl: "7200s",
contents: [
{ role: "user", parts: [{ text: "You are a terse assistant." }] },
],
});

Source: packages/gcp/src/AIPlatform/CancelTrainingPipeline.ts

Runtime binding for Vertex AI trainingPipelines.cancel.

Bind this operation to a TrainingPipeline in a Function/Action init phase. Provide CancelTrainingPipelineHttp.

const cancel = yield* GCP.AIPlatform.CancelTrainingPipeline(pipeline);
yield* cancel({ body: {} });

Source: packages/gcp/src/AIPlatform/CancelTrainingPipelineHttp.ts Kind: Layer · Provides: GCP.AIPlatform.CancelTrainingPipeline

HTTP implementation of CancelTrainingPipeline.

Source: packages/gcp/src/AIPlatform/CustomJob.ts

A Vertex AI CustomJob — a container or Python training workload.

Creating a CustomJob starts it immediately. There is no update API, so reconcile is observe-ensure (create if missing). Delete cancels a running job, then deletes it. Alchemy ownership labels are merged into labels so list / nuke can find the job.

const job = yield* GCP.AIPlatform.CustomJob("Train", {
displayName: "echo-train",
jobSpec: {
workerPoolSpecs: [
{
machineSpec: { machineType: "n1-standard-4" },
replicaCount: "1",
containerSpec: {
imageUri: "gcr.io/google-samples/hello-app:1.0",
command: ["echo"],
args: ["ok"],
},
},
],
scheduling: { timeout: "600s" },
},
labels: { env: "test" },
});

Source: packages/gcp/src/AIPlatform/DataLabelingJob.ts

A Vertex AI DataLabelingJob — human labeling of Dataset DataItems.

Creating a job starts labeling immediately. There is no update API, so reconcile is observe-ensure. Delete cancels a running job, then deletes it. Alchemy ownership labels are merged into labels so list / nuke can find the job.

DataLabelingJob: Creating a Data Labeling Job

Section titled “DataLabelingJob: Creating a Data Labeling Job”
const job = yield* GCP.AIPlatform.DataLabelingJob("Label", {
datasets: [dataset.name],
displayName: "label-images",
labelerCount: 1,
instructionUri: "gs://bucket/instructions.pdf",
inputsSchemaUri:
"gs://google-cloud-aiplatform/schema/datalabelingjob/inputs/image_classification_1.0.0.yaml",
inputs: { annotationSpecs: ["cat", "dog"] },
});

Source: packages/gcp/src/AIPlatform/Dataset.ts

A Vertex AI Dataset — a collection of DataItems and Annotations.

Location, dataset id, metadata schema, and CMEK are immutable. Display name, description, and labels update in place. Alchemy ownership labels are merged into labels so list / pnpm nuke:gcp can find the dataset.

Generated id, empty tabular dataset

const dataset = yield* GCP.AIPlatform.Dataset("Samples", {
displayName: "sample rows",
labels: { env: "test" },
});

Explicit id and image metadata schema

const dataset = yield* GCP.AIPlatform.Dataset("Images", {
datasetId: "app-images",
location: "us-central1",
metadataSchemaUri:
"gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml",
metadata: {},
});
// Same logical id, changed props: the engine updates it in place.
const dataset = yield* GCP.AIPlatform.Dataset("Samples", {
displayName: "prod rows",
labels: { env: "prod" },
});

Source: packages/gcp/src/AIPlatform/DatasetsDatasetVersion.ts

A Vertex AI DatasetVersion — a snapshot of a Dataset.

Versions have no labels field, so Alchemy stamps ownership into displayName for list / nuke. The parent dataset is immutable; display name updates in place.

DatasetsDatasetVersion: Creating a Dataset Version

Section titled “DatasetsDatasetVersion: Creating a Dataset Version”
const dataset = yield* GCP.AIPlatform.Dataset("Samples", {
metadataSchemaUri:
"gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml",
});
const version = yield* GCP.AIPlatform.DatasetsDatasetVersion("V1", {
dataset: dataset.name,
displayName: "v1",
});

DatasetsDatasetVersion: Updating a Dataset Version

Section titled “DatasetsDatasetVersion: Updating a Dataset Version”
// Same logical id, changed props: the engine updates it in place.
const version = yield* GCP.AIPlatform.DatasetsDatasetVersion("V1", {
dataset: dataset.name,
displayName: "v1-final",
});

Source: packages/gcp/src/AIPlatform/DeploymentResourcePool.ts

A Vertex AI DeploymentResourcePool — dedicated machines shared by multiple DeployedModels.

Deployment resource pools have no labels field. Generated ids are prefixed with alch- so list / nuke can find them. Location, pool id, machine spec, and CMEK are immutable. Replica counts, logging, and service account update in place.

const pool = yield* GCP.AIPlatform.DeploymentResourcePool("Shared", {
dedicatedResources: {
minReplicaCount: 1,
maxReplicaCount: 1,
machineSpec: { machineType: "n1-standard-2" },
},
});
// Same logical id, changed props: the engine updates it in place.
const pool = yield* GCP.AIPlatform.DeploymentResourcePool("Shared", {
dedicatedResources: {
minReplicaCount: 1,
maxReplicaCount: 2,
machineSpec: { machineType: "n1-standard-2" },
},
});

DeploymentResourcePool: Looking up an existing deployment resource pool

Section titled “DeploymentResourcePool: Looking up an existing deployment resource pool”

DeploymentResourcePool.lookup references a deployment resource pool Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared deployment resource pool.

const deploymentResourcePool = GCP.AIPlatform.DeploymentResourcePool.lookup({
deploymentResourcePoolId: "my-deployment-resource-pool",
});

Source: packages/gcp/src/AIPlatform/Endpoint.ts

A Vertex AI Endpoint for online prediction.

Name, location, network, encryption, and GDC zone are identity — changing them replaces the endpoint. Display name, description, labels, traffic split, dedicated-endpoint flag, client connection, logging, and GenAI features update in place.

Generated name

const endpoint = yield* GCP.AIPlatform.Endpoint("Predictor", {});

Named endpoint with labels

const endpoint = yield* GCP.AIPlatform.Endpoint("Predictor", {
endpointId: "orders-predictor",
displayName: "orders",
labels: { env: "prod" },
});
// Same logical id, changed props: the engine updates it in place.
const endpoint = yield* GCP.AIPlatform.Endpoint("Predictor", {
displayName: "orders-v2",
labels: { env: "prod", role: "predict" },
});

Endpoint.lookup references an endpoint Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared endpoint.

const endpoint = GCP.AIPlatform.Endpoint.lookup({
endpointId: "my-endpoint",
});

Source: packages/gcp/src/AIPlatform/EvaluationItem.ts

A Vertex AI Evaluation Item — one request or result row used by Evaluation Sets and Evaluation Runs.

Vertex assigns the resource id. There is no update API: changing type, location, display name, request, or GCS URI replaces the item. Labels are stamped at create time.

EvaluationItem: Creating an Evaluation Item

Section titled “EvaluationItem: Creating an Evaluation Item”
const item = yield* GCP.AIPlatform.EvaluationItem("Prompt", {
evaluationItemType: "REQUEST",
evaluationRequest: { prompt: { text: "What is 2+2?" } },
labels: { env: "test" },
});

Source: packages/gcp/src/AIPlatform/EvaluationRun.ts

A Vertex AI Evaluation Run — one execution of metrics over a set of evaluation items or a BigQuery request set.

Vertex assigns the resource id. Creating a run starts evaluation. There is no update API: changing location, display name, data source, or config replaces the run.

const run = yield* GCP.AIPlatform.EvaluationRun("Quality", {
dataSource: { evaluationSet: evaluationSet.name },
evaluationConfig: {
metrics: [
{
metric: "instruction_following_v1",
predefinedMetricSpec: { metricSpecName: "instruction_following_v1" },
},
],
},
labels: { env: "test" },
});

Source: packages/gcp/src/AIPlatform/EvaluationSet.ts

A Vertex AI Evaluation Set — a collection of Evaluation Items evaluated together.

Evaluation Sets have no labels field, so Alchemy stamps ownership into metadata. Member items and agent configs update in place; display name, metadata, and location changes replace the set.

const set = yield* GCP.AIPlatform.EvaluationSet("Prompts", {
evaluationItems: [item.name],
});
// Same logical id, changed props: the engine updates it in place.
const set = yield* GCP.AIPlatform.EvaluationSet("Prompts", {
evaluationItems: [item.name, extra.name],
});

Source: packages/gcp/src/AIPlatform/FeatureGroup.ts

A Vertex AI Feature Registry Feature Group backed by a BigQuery table or view.

Id, location, and BigQuery URI are identity. Description, labels, entity-id columns, and service-agent type update in place.

const group = yield* GCP.AIPlatform.FeatureGroup("Users", {
bigQuery: {
inputUri: "bq://my-project.features.users",
entityIdColumns: ["entity_id"],
},
labels: { env: "prod" },
});

FeatureGroup: Looking up an existing feature group

Section titled “FeatureGroup: Looking up an existing feature group”

FeatureGroup.lookup references a feature group Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared feature group.

const featureGroup = GCP.AIPlatform.FeatureGroup.lookup({
featureGroupId: "my-feature-group",
});

Source: packages/gcp/src/AIPlatform/FeatureGroupsFeature.ts

A Feature Registry Feature belonging to a Feature Group.

Parent group, feature id, and location are identity. Description, labels, version column, and point of contact update in place.

const feature = yield* GCP.AIPlatform.FeatureGroupsFeature("Age", {
featureGroup: group.name,
versionColumnName: "age",
labels: { env: "prod" },
});

FeatureGroupsFeature: Looking up an existing feature groups feature

Section titled “FeatureGroupsFeature: Looking up an existing feature groups feature”

FeatureGroupsFeature.lookup references a feature groups feature Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared feature groups feature.

const featureGroupsFeature = GCP.AIPlatform.FeatureGroupsFeature.lookup({
featureId: "my-feature",
featureGroup: "my-feature-group",
});

Source: packages/gcp/src/AIPlatform/FeatureOnlineStore.ts

A Vertex AI Feature Online Store for low-latency feature and embedding serving.

Id, location, storage type (Bigtable vs Optimized), Bigtable zone, and encryption are identity. Labels and Bigtable autoscaling update in place. Defaults to a one-node Bigtable backend when neither backend is set (Vertex AI no longer creates new Optimized stores for most projects).

FeatureOnlineStore: Creating a Feature Online Store

Section titled “FeatureOnlineStore: Creating a Feature Online Store”

Default one-node Bigtable store

const store = yield* GCP.AIPlatform.FeatureOnlineStore("Serving", {
labels: { env: "prod" },
});

Bigtable-backed store

const store = yield* GCP.AIPlatform.FeatureOnlineStore("Serving", {
bigtable: {
autoScaling: { minNodeCount: 1, maxNodeCount: 2 },
},
});

FeatureOnlineStore: Looking up an existing feature online store

Section titled “FeatureOnlineStore: Looking up an existing feature online store”

FeatureOnlineStore.lookup references a feature online store Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared feature online store.

const featureOnlineStore = GCP.AIPlatform.FeatureOnlineStore.lookup({
featureOnlineStoreId: "my-feature-online-store",
});

Source: packages/gcp/src/AIPlatform/FeatureOnlineStoresFeatureView.ts

A Feature View — the serving projection of a Feature Online Store.

Parent store, view id, and location are identity. Labels, sources, sync schedule, and optimized replica counts update in place.

FeatureOnlineStoresFeatureView: Creating a Feature View

Section titled “FeatureOnlineStoresFeatureView: Creating a Feature View”
const view = yield* GCP.AIPlatform.FeatureOnlineStoresFeatureView("Users", {
featureOnlineStore: store.name,
featureRegistrySource: {
featureGroups: [{ featureGroupId: group.featureGroupId, featureIds: ["age"] }],
},
syncConfig: { cron: "0 * * * *" },
});

FeatureOnlineStoresFeatureView: Looking up an existing feature online stores feature view

Section titled “FeatureOnlineStoresFeatureView: Looking up an existing feature online stores feature view”

FeatureOnlineStoresFeatureView.lookup references a feature online stores feature view Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared feature online stores feature view.

const featureOnlineStoresFeatureView = GCP.AIPlatform.FeatureOnlineStoresFeatureView.lookup({
featureViewId: "my-feature-view",
featureOnlineStore: "my-feature-online-store",
});

Source: packages/gcp/src/AIPlatform/Featurestore.ts

A Vertex AI Feature Store (legacy) — a container for Entity Types and Features.

Id, location, and encryption are identity. Labels, online serving, and online TTL update in place. Omit onlineServingConfig for an offline-only store.

Offline-only store

const store = yield* GCP.AIPlatform.Featurestore("Features", {
labels: { env: "prod" },
});

Online serving with a fixed node

const store = yield* GCP.AIPlatform.Featurestore("Features", {
onlineServingConfig: { fixedNodeCount: 1 },
});

Featurestore: Looking up an existing featurestore

Section titled “Featurestore: Looking up an existing featurestore”

Featurestore.lookup references a featurestore Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared featurestore.

const featurestore = GCP.AIPlatform.Featurestore.lookup({
featurestoreId: "my-featurestore",
});

Source: packages/gcp/src/AIPlatform/FeaturestoresEntityType.ts

A Vertex AI Feature Store Entity Type — a class of objects (for example user or movie) whose feature values live in a Featurestore.

Parent store, entity type id, and location are identity. Description, labels, monitoring, and offline TTL update in place.

FeaturestoresEntityType: Creating an Entity Type

Section titled “FeaturestoresEntityType: Creating an Entity Type”
const users = yield* GCP.AIPlatform.FeaturestoresEntityType("User", {
featurestore: store.name,
description: "end users",
labels: { env: "prod" },
});

FeaturestoresEntityType: Looking up an existing featurestores entity type

Section titled “FeaturestoresEntityType: Looking up an existing featurestores entity type”

FeaturestoresEntityType.lookup references a featurestores entity type Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared featurestores entity type.

const featurestoresEntityType = GCP.AIPlatform.FeaturestoresEntityType.lookup({
entityTypeId: "my-entity-type",
featurestore: "my-featurestore",
});

Source: packages/gcp/src/AIPlatform/FeaturestoresEntityTypesFeature.ts

A Vertex AI Feature Store (legacy) Feature under an EntityType.

Changing entityType, featureId, or valueType replaces the feature. Description, labels, monitoring, and point of contact update in place.

FeaturestoresEntityTypesFeature: Creating a Feature

Section titled “FeaturestoresEntityTypesFeature: Creating a Feature”
const feature = yield* GCP.AIPlatform.FeaturestoresEntityTypesFeature(
"Age",
{
entityType: entityType.name,
valueType: "INT64",
description: "customer age",
labels: { env: "prod" },
},
);

FeaturestoresEntityTypesFeature: Looking up an existing featurestores entity types feature

Section titled “FeaturestoresEntityTypesFeature: Looking up an existing featurestores entity types feature”

FeaturestoresEntityTypesFeature.lookup references a featurestores entity types feature Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared featurestores entity types feature.

const featurestoresEntityTypesFeature = GCP.AIPlatform.FeaturestoresEntityTypesFeature.lookup({
featureId: "my-feature",
entityType: "my-entity-type",
});

Source: packages/gcp/src/AIPlatform/GenerateContent.ts

Runtime binding for Vertex AI generateContent on a publisher model (Gemini).

Bind it in a Function/Job init phase with a model id or a PublisherModel descriptor and provide GenerateContentHttp. At deploy time it grants the host’s runtime service account roles/aiplatform.user on the project — Vertex AI publisher models have no resource-level IAM policy.

Ask Gemini a question

const gemini = yield* GCP.AIPlatform.GenerateContent("gemini-2.5-flash");
const answer = yield* gemini.text("Name three primary colors.");

Pin a region and tune generation

const gemini = yield* GCP.AIPlatform.GenerateContent({
model: "gemini-2.5-flash",
location: "us-central1",
});
const answer = yield* gemini.text("Write a haiku about rain.", {
generationConfig: { temperature: 0.2, maxOutputTokens: 256 },
});
const response = yield* gemini.generate({
systemInstruction: { parts: [{ text: "Answer in one sentence." }] },
contents: [
{ role: "user", parts: [{ text: "What is Cloud Run?" }] },
{ role: "model", parts: [{ text: "A serverless container platform." }] },
{ role: "user", parts: [{ text: "How is it billed?" }] },
],
});
const usage = response.usageMetadata?.totalTokenCount;

Source: packages/gcp/src/AIPlatform/GenerateContentHttp.ts Kind: Layer · Provides: GCP.AIPlatform.GenerateContent

HTTP implementation of GenerateContent.

Source: packages/gcp/src/AIPlatform/GetReasoningEngine.ts

Runtime binding for Vertex AI reasoningEngines.get.

Bind this operation to a ReasoningEngine in a Function/Action init phase. Provide GetReasoningEngineHttp.

const getEngine = yield* GCP.AIPlatform.GetReasoningEngine(engine);
const live = yield* getEngine();

Source: packages/gcp/src/AIPlatform/GetReasoningEngineHttp.ts Kind: Layer · Provides: GCP.AIPlatform.GetReasoningEngine

HTTP implementation of GetReasoningEngine.

Source: packages/gcp/src/AIPlatform/GetSandboxEnvironment.ts

Runtime binding for Vertex AI sandboxEnvironments.get.

Bind this operation to a ReasoningEnginesSandboxEnvironment in a Function/Action init phase. Provide GetSandboxEnvironmentHttp.

GetSandboxEnvironment: Observing Sandboxes

Section titled “GetSandboxEnvironment: Observing Sandboxes”
const getSandbox = yield* GCP.AIPlatform.GetSandboxEnvironment(sandbox);
const live = yield* getSandbox();

Source: packages/gcp/src/AIPlatform/GetSandboxEnvironmentHttp.ts Kind: Layer · Provides: GCP.AIPlatform.GetSandboxEnvironment

HTTP implementation of GetSandboxEnvironment.

Source: packages/gcp/src/AIPlatform/GetSandboxEnvironmentTemplate.ts

Runtime binding for Vertex AI sandboxEnvironmentTemplates.get.

Bind this operation to a ReasoningEnginesSandboxEnvironmentTemplate in a Function/Action init phase. Provide GetSandboxEnvironmentTemplateHttp.

GetSandboxEnvironmentTemplate: Observing Templates

Section titled “GetSandboxEnvironmentTemplate: Observing Templates”
const getTemplate = yield* GCP.AIPlatform.GetSandboxEnvironmentTemplate(template);
const live = yield* getTemplate();

Source: packages/gcp/src/AIPlatform/GetSandboxEnvironmentTemplateHttp.ts Kind: Layer · Provides: GCP.AIPlatform.GetSandboxEnvironmentTemplate

HTTP implementation of GetSandboxEnvironmentTemplate.

Source: packages/gcp/src/AIPlatform/GetTrainingPipeline.ts

Runtime binding for Vertex AI trainingPipelines.get.

Bind this operation to a TrainingPipeline in a Function/Action init phase. Provide GetTrainingPipelineHttp.

const getPipeline = yield* GCP.AIPlatform.GetTrainingPipeline(pipeline);
const live = yield* getPipeline();

Source: packages/gcp/src/AIPlatform/GetTrainingPipelineHttp.ts Kind: Layer · Provides: GCP.AIPlatform.GetTrainingPipeline

HTTP implementation of GetTrainingPipeline.

Source: packages/gcp/src/AIPlatform/HyperparameterTuningJob.ts

A Vertex AI HyperparameterTuningJob that runs CustomJobs for each trial.

The API assigns the job id. There is no update method — changing display name, labels, trial counts, or specs replaces the job. Delete cancels a running job first.

HyperparameterTuningJob: Creating a HyperparameterTuningJob

Section titled “HyperparameterTuningJob: Creating a HyperparameterTuningJob”
const job = yield* GCP.AIPlatform.HyperparameterTuningJob("Tune", {
maxTrialCount: 2,
parallelTrialCount: 1,
studySpec: {
metrics: [{ metricId: "accuracy", goal: "MAXIMIZE" }],
parameters: [{
parameterId: "lr",
doubleValueSpec: { minValue: 0.001, maxValue: 0.1 },
}],
},
trialJobSpec: {
workerPoolSpecs: [{
machineSpec: { machineType: "n1-standard-4" },
replicaCount: "1",
containerSpec: { imageUri: "gcr.io/cloud-aiplatform/training/tf-cpu.2-8:latest" },
}],
},
});

Source: packages/gcp/src/AIPlatform/IndexEndpoint.ts

A Vertex AI Matching Engine IndexEndpoint that serves one or more deployed indexes.

Changing location, network, encryption, or private-service-connect configuration replaces the endpoint. Display name, description, and labels update in place.

const endpoint = yield* GCP.AIPlatform.IndexEndpoint("Search", {
displayName: "product-search",
publicEndpointEnabled: true,
labels: { env: "prod" },
});

Source: packages/gcp/src/AIPlatform/Indexes.ts

A Vertex AI Matching Engine Index of embedding vectors.

Changing location, indexUpdateMethod, encryption, or metadataSchemaUri replaces the index. Display name, description, labels, and metadata update in place (metadata updates are long-running).

const index = yield* GCP.AIPlatform.Index("Embeddings", {
displayName: "product-embeddings",
indexUpdateMethod: "STREAM_UPDATE",
metadata: {
config: {
dimensions: 768,
approximateNeighborsCount: 150,
distanceMeasureType: "DOT_PRODUCT_DISTANCE",
shardSize: "SHARD_SIZE_SMALL",
algorithmConfig: { bruteForceConfig: {} },
},
},
labels: { env: "prod" },
});

Source: packages/gcp/src/AIPlatform/MetadataStore.ts

A Vertex ML Metadata store for artifacts, contexts, and executions.

Metadata stores have no labels field, so Alchemy stamps ownership into the description for list / nuke. There is no update API — changing identity, location, encryption, or Dataplex config replaces the store.

const store = yield* GCP.AIPlatform.MetadataStore("Mlmd", {
description: "pipeline metadata",
});

MetadataStore: Looking up an existing metadata store

Section titled “MetadataStore: Looking up an existing metadata store”

MetadataStore.lookup references a metadata store Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared metadata store.

const metadataStore = GCP.AIPlatform.MetadataStore.lookup({
metadataStoreId: "my-metadata-store",
});

Source: packages/gcp/src/AIPlatform/MetadataStoresArtifact.ts

A Vertex ML Metadata Artifact associated with a MetadataStore.

Changing metadataStore or artifactId replaces the artifact. Display name, description, labels, URI, state, schema, and metadata update in place.

MetadataStoresArtifact: Creating an Artifact

Section titled “MetadataStoresArtifact: Creating an Artifact”
const artifact = yield* GCP.AIPlatform.MetadataStoresArtifact("Model", {
metadataStore: store.name,
displayName: "trained-model",
uri: "gs://bucket/model",
labels: { env: "prod" },
});

MetadataStoresArtifact: Looking up an existing metadata stores artifact

Section titled “MetadataStoresArtifact: Looking up an existing metadata stores artifact”

MetadataStoresArtifact.lookup references a metadata stores artifact Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared metadata stores artifact.

const metadataStoresArtifact = GCP.AIPlatform.MetadataStoresArtifact.lookup({
artifactId: "my-artifact",
metadataStore: "my-metadata-store",
});

Source: packages/gcp/src/AIPlatform/MetadataStoresContext.ts

A Vertex ML Metadata Context associated with a MetadataStore.

Changing metadataStore or contextId replaces the context. Display name, description, labels, schema, and metadata update in place.

const context = yield* GCP.AIPlatform.MetadataStoresContext("Experiment", {
metadataStore: store.name,
displayName: "training-run",
labels: { env: "prod" },
});

MetadataStoresContext: Looking up an existing metadata stores context

Section titled “MetadataStoresContext: Looking up an existing metadata stores context”

MetadataStoresContext.lookup references a metadata stores context Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared metadata stores context.

const metadataStoresContext = GCP.AIPlatform.MetadataStoresContext.lookup({
contextId: "my-context",
metadataStore: "my-metadata-store",
});

Source: packages/gcp/src/AIPlatform/MetadataStoresExecution.ts

A Vertex ML Metadata Execution associated with a MetadataStore.

Changing metadataStore or executionId replaces the execution. Display name, description, labels, state, schema, and metadata update in place.

MetadataStoresExecution: Creating an Execution

Section titled “MetadataStoresExecution: Creating an Execution”
const execution = yield* GCP.AIPlatform.MetadataStoresExecution("Train", {
metadataStore: store.name,
displayName: "train-step",
state: "RUNNING",
labels: { env: "prod" },
});

MetadataStoresExecution: Looking up an existing metadata stores execution

Section titled “MetadataStoresExecution: Looking up an existing metadata stores execution”

MetadataStoresExecution.lookup references a metadata stores execution Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared metadata stores execution.

const metadataStoresExecution = GCP.AIPlatform.MetadataStoresExecution.lookup({
executionId: "my-execution",
metadataStore: "my-metadata-store",
});

Source: packages/gcp/src/AIPlatform/ModelDeploymentMonitoringJob.ts

A Vertex AI ModelDeploymentMonitoringJob that periodically scores a deployed model for skew and drift.

Changing location or endpoint replaces the job. Display name, labels, schedule, sampling, alerts, and objective configs update in place (long-running). Delete pauses the job first.

ModelDeploymentMonitoringJob: Creating a ModelDeploymentMonitoringJob

Section titled “ModelDeploymentMonitoringJob: Creating a ModelDeploymentMonitoringJob”
const job = yield* GCP.AIPlatform.ModelDeploymentMonitoringJob("Watch", {
endpoint: endpoint.name,
loggingSamplingStrategy: { randomSampleConfig: { sampleRate: 0.1 } },
modelDeploymentMonitoringScheduleConfig: { monitorInterval: "3600s" },
modelDeploymentMonitoringObjectiveConfigs: [{
deployedModelId: deployed.id,
objectiveConfig: {
predictionDriftDetectionConfig: {},
},
}],
});

Source: packages/gcp/src/AIPlatform/NasJob.ts

A Vertex AI Neural Architecture Search job.

The API assigns the job id. There is no update method — changing display name, labels, or nasJobSpec replaces the job. Delete cancels a running job first.

const job = yield* GCP.AIPlatform.NasJob("Search", {
nasJobSpec: {
searchSpaceSpec: "{}",
multiTrialAlgorithmSpec: {
metric: { metricId: "accuracy", goal: "MAXIMIZE" },
searchTrialSpec: {
maxTrialCount: 1,
maxParallelTrialCount: 1,
searchTrialJobSpec: {
workerPoolSpecs: [{
machineSpec: { machineType: "n1-standard-4" },
replicaCount: "1",
containerSpec: { imageUri: "gcr.io/cloud-aiplatform/training/tf-cpu.2-8:latest" },
}],
},
},
},
},
});

Source: packages/gcp/src/AIPlatform/NotebookExecutionJob.ts

A Vertex AI notebook execution job — runs an ipynb once against a runtime template or custom environment.

There is no update API. Changing identity (notebookExecutionJobId, location) or the notebook source replaces the job. Other fields are create-time only.

const job = yield* GCP.AIPlatform.NotebookExecutionJob("Nightly", {
notebookRuntimeTemplateResourceName: template.name,
gcsNotebookSource: { uri: "gs://bucket/notebook.ipynb" },
gcsOutputUri: "gs://bucket/output",
});

NotebookExecutionJob: Looking up an existing notebook execution job

Section titled “NotebookExecutionJob: Looking up an existing notebook execution job”

NotebookExecutionJob.lookup references a notebook execution job Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared notebook execution job.

const notebookExecutionJob = GCP.AIPlatform.NotebookExecutionJob.lookup({
notebookExecutionJobId: "my-notebook-execution-job",
});

Source: packages/gcp/src/AIPlatform/NotebookRuntimeTemplate.ts

A Vertex AI notebook runtime template — machine, disk, network, and software defaults used to create Colab Enterprise runtimes.

Only displayName and softwareConfig update in place; changing notebookRuntimeTemplateId, location, machineSpec, notebookRuntimeType, description, or labels replaces the template.

NotebookRuntimeTemplate: Creating a Template

Section titled “NotebookRuntimeTemplate: Creating a Template”

Generated name

const template = yield* GCP.AIPlatform.NotebookRuntimeTemplate("Runtime", {
machineSpec: { machineType: "e2-standard-4" },
});

Named template with labels

const template = yield* GCP.AIPlatform.NotebookRuntimeTemplate("Runtime", {
notebookRuntimeTemplateId: "colab-default",
displayName: "colab default",
labels: { env: "prod" },
machineSpec: { machineType: "e2-standard-4" },
networkSpec: { enableInternetAccess: true },
});

NotebookRuntimeTemplate: Looking up an existing notebook runtime template

Section titled “NotebookRuntimeTemplate: Looking up an existing notebook runtime template”

NotebookRuntimeTemplate.lookup references a notebook runtime template Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared notebook runtime template.

const notebookRuntimeTemplate = GCP.AIPlatform.NotebookRuntimeTemplate.lookup({
notebookRuntimeTemplateId: "my-notebook-runtime-template",
});

Source: packages/gcp/src/AIPlatform/OnlineEvaluator.ts

A Vertex AI Online Evaluator — periodically scores agent traces against registered metrics.

OnlineEvaluator has no labels, so Alchemy stamps ownership into the display name. Changing location or agentResource replaces the evaluator. Display name, config, and metric sources update in place.

OnlineEvaluator: Creating an Online Evaluator

Section titled “OnlineEvaluator: Creating an Online Evaluator”
const evaluator = yield* GCP.AIPlatform.OnlineEvaluator("Quality", {
agentResource: engine.name,
metricSources: [{ metricResourceName: metric.name }],
config: { randomSampling: { percentage: 10 } },
});

Source: packages/gcp/src/AIPlatform/PauseSandboxEnvironment.ts

Runtime binding for Vertex AI sandboxEnvironments.pause.

Bind this operation to a ReasoningEnginesSandboxEnvironment in a Function/Action init phase. Provide PauseSandboxEnvironmentHttp.

const pause = yield* GCP.AIPlatform.PauseSandboxEnvironment(sandbox);
yield* pause({ body: {} });

Source: packages/gcp/src/AIPlatform/PauseSandboxEnvironmentHttp.ts Kind: Layer · Provides: GCP.AIPlatform.PauseSandboxEnvironment

HTTP implementation of PauseSandboxEnvironment.

Source: packages/gcp/src/AIPlatform/PersistentResource.ts

A Vertex AI Persistent Resource — dedicated node pools for custom training and Ray-on-Vertex workloads.

Changing persistentResourceId, location, network, encryptionSpec, or pool machine specs replaces the resource. Replica counts, labels, and display name update in place.

Provisioning typically takes several minutes.

PersistentResource: Creating a Persistent Resource

Section titled “PersistentResource: Creating a Persistent Resource”
const pool = yield* GCP.AIPlatform.PersistentResource("Train", {
resourcePools: [
{
id: "worker",
replicaCount: "1",
machineSpec: { machineType: "n1-standard-4" },
},
],
});

PersistentResource: Looking up an existing persistent resource

Section titled “PersistentResource: Looking up an existing persistent resource”

PersistentResource.lookup references a persistent resource Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared persistent resource.

const persistentResource = GCP.AIPlatform.PersistentResource.lookup({
persistentResourceId: "my-persistent-resource",
});

Source: packages/gcp/src/AIPlatform/PipelineJob.ts

A Vertex AI PipelineJob — a compiled Kubeflow pipeline that runs immediately on create.

There is no update API. Changing identity (pipelineJobId, location) or the pipeline spec / template URI replaces the job.

const job = yield* GCP.AIPlatform.PipelineJob("Train", {
pipelineSpec: compiled,
runtimeConfig: { gcsOutputDirectory: "gs://bucket/pipeline-out" },
labels: { env: "prod" },
});

PipelineJob: Looking up an existing pipeline job

Section titled “PipelineJob: Looking up an existing pipeline job”

PipelineJob.lookup references a pipeline job Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared pipeline job.

const pipelineJob = GCP.AIPlatform.PipelineJob.lookup({
pipelineJobId: "my-pipeline-job",
});

Source: packages/gcp/src/AIPlatform/QueryReasoningEngine.ts

Runtime binding for Vertex AI reasoningEngines.query.

Bind this operation to a ReasoningEngine in a Function/Action init phase. Provide QueryReasoningEngineHttp.

const query = yield* GCP.AIPlatform.QueryReasoningEngine(engine);
const result = yield* query({
body: { input: { input: "hello" } },
});

Source: packages/gcp/src/AIPlatform/QueryReasoningEngineHttp.ts Kind: Layer · Provides: GCP.AIPlatform.QueryReasoningEngine

HTTP implementation of QueryReasoningEngine.

Source: packages/gcp/src/AIPlatform/RagCorpora.ts

A Vertex AI RAG corpus — a container for RagFiles used by retrieval augmented generation.

RagCorpus has no labels, so Alchemy stamps ownership into the description. Changing location, encryptionSpec, vertexAiSearchConfig, or vectorDbConfig replaces the corpus. Display name and description update in place.

const corpus = yield* GCP.AIPlatform.RagCorpora("Docs", {
displayName: "product-docs",
description: "product manuals",
});

Source: packages/gcp/src/AIPlatform/ReasoningEngine.ts

A Vertex AI Reasoning Engine (Agent Engine) — a customizable runtime for models that choose which actions to take and in which order.

Changing reasoningEngineId, location, or encryptionSpec replaces the engine. Display name, description, labels, and spec update in place.

ReasoningEngine: Creating a Reasoning Engine

Section titled “ReasoningEngine: Creating a Reasoning Engine”
const engine = yield* GCP.AIPlatform.ReasoningEngine("Agent", {
displayName: "support-agent",
labels: { env: "prod" },
spec: { agentFramework: "custom" },
});
const query = yield* GCP.AIPlatform.QueryReasoningEngine(engine);
const result = yield* query({ body: { input: { input: "hello" } } });

Source: packages/gcp/src/AIPlatform/ReasoningEnginesMemory.ts

A Vertex AI Reasoning Engine memory — scoped semantic knowledge used by an Agent Engine Memory Bank.

Memory has no labels, so Alchemy stamps ownership into the description. Changing memoryId, reasoningEngine, location, or scope replaces the memory. Fact, description, and metadata update in place.

const memory = yield* GCP.AIPlatform.ReasoningEnginesMemory("Pref", {
reasoningEngine: engine.name,
scope: { user_id: "user-123" },
fact: "the user prefers concise answers",
});

ReasoningEnginesMemory: Looking up an existing reasoning engines memory

Section titled “ReasoningEnginesMemory: Looking up an existing reasoning engines memory”

ReasoningEnginesMemory.lookup references a reasoning engines memory Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared reasoning engines memory.

const reasoningEnginesMemory = GCP.AIPlatform.ReasoningEnginesMemory.lookup({
memoryId: "my-memory",
reasoningEngine: "my-reasoning-engine",
});

Source: packages/gcp/src/AIPlatform/ReasoningEnginesSandboxEnvironment.ts

A Vertex AI sandbox environment — a containerized secure execution runtime for Agent Engine workloads.

There is no update API. Changing parent or location replaces the sandbox. Ownership is stamped into the display name.

ReasoningEnginesSandboxEnvironment: Creating a Sandbox

Section titled “ReasoningEnginesSandboxEnvironment: Creating a Sandbox”
const sandbox = yield* GCP.AIPlatform.ReasoningEnginesSandboxEnvironment(
"Box",
{
reasoningEngine: engine.name,
displayName: "dev-box",
sandboxEnvironmentTemplate: template.sandboxEnvironmentTemplateId,
ttl: "3600s",
},
);

ReasoningEnginesSandboxEnvironmentTemplate

Section titled “ReasoningEnginesSandboxEnvironmentTemplate”

Source: packages/gcp/src/AIPlatform/ReasoningEnginesSandboxEnvironmentTemplate.ts

A Vertex AI sandbox environment template — the blueprint used to create Agent Engine sandbox environments.

There is no update API. Changing parent or location replaces the template. Ownership is stamped into the display name.

ReasoningEnginesSandboxEnvironmentTemplate: Creating a Template

Section titled “ReasoningEnginesSandboxEnvironmentTemplate: Creating a Template”
const template = yield* GCP.AIPlatform.ReasoningEnginesSandboxEnvironmentTemplate(
"Sandbox",
{
reasoningEngine: engine.name,
displayName: "computer-use",
defaultContainerEnvironment: {
defaultContainerCategory: "DEFAULT_CONTAINER_CATEGORY_COMPUTER_USE",
},
},
);

Source: packages/gcp/src/AIPlatform/ReasoningEnginesSession.ts

A Vertex AI Reasoning Engine session between a user and an agent.

Parent engine, session id, and user id are immutable. Display name, labels, expiration, and session state update in place.

ReasoningEnginesSession: Creating a Session

Section titled “ReasoningEnginesSession: Creating a Session”
const session = yield* GCP.AIPlatform.ReasoningEnginesSession("Chat", {
parent: engine.name,
userId: "user-123",
displayName: "support-chat",
});

ReasoningEnginesSession: Looking up an existing reasoning engines session

Section titled “ReasoningEnginesSession: Looking up an existing reasoning engines session”

ReasoningEnginesSession.lookup references a reasoning engines session Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared reasoning engines session.

const reasoningEnginesSession = GCP.AIPlatform.ReasoningEnginesSession.lookup({
sessionId: "my-session",
parent: "my-parent",
});

Source: packages/gcp/src/AIPlatform/ResumeSandboxEnvironment.ts

Runtime binding for Vertex AI sandboxEnvironments.resume.

Bind this operation to a ReasoningEnginesSandboxEnvironment in a Function/Action init phase. Provide ResumeSandboxEnvironmentHttp.

const resume = yield* GCP.AIPlatform.ResumeSandboxEnvironment(sandbox);
yield* resume({ body: {} });

Source: packages/gcp/src/AIPlatform/ResumeSandboxEnvironmentHttp.ts Kind: Layer · Provides: GCP.AIPlatform.ResumeSandboxEnvironment

HTTP implementation of ResumeSandboxEnvironment.

Source: packages/gcp/src/AIPlatform/Schedule.ts

A Vertex AI Schedule that periodically starts pipeline or notebook jobs.

Schedules have no labels field — Alchemy stamps ownership into the display name. Location is immutable. Cron, run limits, and pause state update in place.

const schedule = yield* GCP.AIPlatform.Schedule("Nightly", {
cron: "CRON_TZ=UTC 0 8 * * *",
paused: true,
maxRunCount: "1",
createPipelineJobRequest: {
pipelineJob: {
displayName: "nightly",
templateUri: "https://us-kfp.pkg.dev/ml-pipeline/google-cloud-registry/hello-world/latest",
},
},
});

Source: packages/gcp/src/AIPlatform/SemanticGovernancePolicy.ts

A Vertex AI SemanticGovernancePolicy constraining an Agent’s tools.

Policies have no labels field — Alchemy stamps ownership into the description. Location and policy id are immutable.

SemanticGovernancePolicy: Creating a Policy

Section titled “SemanticGovernancePolicy: Creating a Policy”
const policy = yield* GCP.AIPlatform.SemanticGovernancePolicy("Safety", {
agent: "projects/my-project/locations/us-central1/agents/support",
naturalLanguageConstraint: "Never share customer PII.",
});

SemanticGovernancePolicy: Looking up an existing semantic governance policy

Section titled “SemanticGovernancePolicy: Looking up an existing semantic governance policy”

SemanticGovernancePolicy.lookup references a semantic governance policy Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared semantic governance policy.

const semanticGovernancePolicy = GCP.AIPlatform.SemanticGovernancePolicy.lookup({
semanticGovernancePolicyId: "my-semantic-governance-policy",
});

Source: packages/gcp/src/AIPlatform/SpecialistPool.ts

A Vertex AI SpecialistPool of managers and workers for data labeling.

Specialist pools have no labels field — Alchemy stamps ownership into the display name. Location is immutable. Manager and worker emails update in place.

const pool = yield* GCP.AIPlatform.SpecialistPool("Labelers", {
displayName: "labelers",
});

Source: packages/gcp/src/AIPlatform/StudiesTrial.ts

A user-provided Vertex AI Vizier Trial attached to a Study.

Trials have no labels and no update RPC. Alchemy records the logical id in clientId so list can find them. Parent and parameters are immutable.

const trial = yield* GCP.AIPlatform.StudiesTrial("Seed", {
parent: study.name,
parameters: [{ parameterId: "learning_rate", value: 0.01 }],
});

Source: packages/gcp/src/AIPlatform/Study.ts

A Vertex AI Vizier Study for hyperparameter search.

Studies have no labels field and no update RPC — Alchemy stamps an ownership hash onto the display name. Location and study spec are immutable.

const study = yield* GCP.AIPlatform.Study("Tune", {
studySpec: {
metrics: [{ metricId: "accuracy", goal: "MAXIMIZE" }],
parameters: [
{
parameterId: "learning_rate",
doubleValueSpec: { minValue: 0.001, maxValue: 0.1 },
},
],
algorithm: "RANDOM_SEARCH",
},
});

Source: packages/gcp/src/AIPlatform/Tensorboard.ts

A Vertex AI Tensorboard, the physical store for training metrics.

Location and encryption key are immutable. Display name, description, labels, and the default flag update in place.

Generated display name

const board = yield* GCP.AIPlatform.Tensorboard("Metrics", {});

Named Tensorboard with labels

const board = yield* GCP.AIPlatform.Tensorboard("Metrics", {
displayName: "training-metrics",
description: "experiment store",
labels: { env: "prod" },
});

Tensorboard: Looking up an existing tensorboard

Section titled “Tensorboard: Looking up an existing tensorboard”

Tensorboard.lookup references a tensorboard Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared tensorboard.

const tensorboard = GCP.AIPlatform.Tensorboard.lookup({ displayName: "training" });

Source: packages/gcp/src/AIPlatform/TensorboardsExperiment.ts

A Vertex AI TensorboardExperiment grouping runs from a training job.

Parent Tensorboard, experiment id, and source are immutable. Display name, description, and labels update in place.

TensorboardsExperiment: Creating an Experiment

Section titled “TensorboardsExperiment: Creating an Experiment”
const experiment = yield* GCP.AIPlatform.TensorboardsExperiment("RunGroup", {
parent: board.name,
displayName: "baseline",
});

TensorboardsExperiment: Looking up an existing tensorboards experiment

Section titled “TensorboardsExperiment: Looking up an existing tensorboards experiment”

TensorboardsExperiment.lookup references a tensorboards experiment Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared tensorboards experiment.

const tensorboardsExperiment = GCP.AIPlatform.TensorboardsExperiment.lookup({
experimentId: "my-experiment",
parent: "my-parent",
});

Source: packages/gcp/src/AIPlatform/TensorboardsExperimentsRun.ts

A Vertex AI TensorboardRun, one execution of a training job.

Parent experiment and run id are immutable. Display name, description, and labels update in place.

TensorboardsExperimentsRun: Creating a Run

Section titled “TensorboardsExperimentsRun: Creating a Run”
const run = yield* GCP.AIPlatform.TensorboardsExperimentsRun("Pass", {
parent: experiment.name,
displayName: "pass-1",
});

TensorboardsExperimentsRun: Looking up an existing tensorboards experiments run

Section titled “TensorboardsExperimentsRun: Looking up an existing tensorboards experiments run”

TensorboardsExperimentsRun.lookup references a tensorboards experiments run Alchemy doesn’t manage (created in the console or by another stack). It is read during plan/deploy, never created, updated or deleted, and binds like a declared tensorboards experiments run.

const tensorboardsExperimentsRun = GCP.AIPlatform.TensorboardsExperimentsRun.lookup({
runId: "my-run",
parent: "my-parent",
});

Source: packages/gcp/src/AIPlatform/TensorboardsExperimentsRunsTimeSeries.ts

A Vertex AI TensorboardTimeSeries of scalar, tensor, or blob values.

Time series have no labels field — Alchemy stamps ownership into the description so read, list, and pnpm nuke:gcp can find them. Parent run, id, value type, and plugin name are immutable.

TensorboardsExperimentsRunsTimeSeries: Creating a Time Series

Section titled “TensorboardsExperimentsRunsTimeSeries: Creating a Time Series”
const series = yield* GCP.AIPlatform.TensorboardsExperimentsRunsTimeSeries(
"Loss",
{
parent: run.name,
displayName: "loss",
valueType: "SCALAR",
pluginName: "scalars",
},
);

Source: packages/gcp/src/AIPlatform/TrainingPipeline.ts

A Vertex AI TrainingPipeline that runs a training task and optionally uploads a Model.

Creating a TrainingPipeline starts it immediately. Vertex assigns the resource id; there is no update RPC — changing location or trainingTaskDefinition replaces the pipeline. Labels brand the resource for list / nuke.

TrainingPipeline: Creating a TrainingPipeline

Section titled “TrainingPipeline: Creating a TrainingPipeline”
const pipeline = yield* GCP.AIPlatform.TrainingPipeline("Train", {
location: "us-central1",
displayName: "custom-train",
trainingTaskDefinition:
"gs://google-cloud-aiplatform/schema/trainingjob/definition/custom_task_1.0.0.yaml",
trainingTaskInputs: {
workerPoolSpecs: [
{
machineSpec: { machineType: "n1-standard-4" },
replicaCount: "1",
containerSpec: { imageUri: "gcr.io/my-project/trainer:latest" },
},
],
},
labels: { env: "dev" },
});

Source: packages/gcp/src/AIPlatform/TuningJob.ts

A Vertex AI TuningJob (supervised fine-tune / preference optimization).

Creating a TuningJob starts it immediately. There is no update API, so reconcile is observe-ensure (create if missing). There is no delete RPC — destroy cancels the job. Alchemy ownership labels are merged into labels so list / nuke can find it.

const job = yield* GCP.AIPlatform.TuningJob("Tune", {
baseModel: "gemini-2.0-flash-001",
supervisedTuningSpec: {
trainingDatasetUri: "gs://bucket/train.jsonl",
},
});