diff --git a/src/main/java/com/google/genai/Batches.java b/src/main/java/com/google/genai/Batches.java
index 8bcff49f15a..14c0c9dae81 100644
--- a/src/main/java/com/google/genai/Batches.java
+++ b/src/main/java/com/google/genai/Batches.java
@@ -1027,7 +1027,6 @@ ObjectNode embedContentBatchToMldev(
@ExcludeFromGeneratedCoverageReport
ObjectNode embedContentConfigToMldev(JsonNode fromObject, ObjectNode parentObject) {
ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
-
if (Common.getValueByPath(fromObject, new String[] {"taskType"}) != null) {
Common.setValueByPath(
parentObject,
diff --git a/src/main/java/com/google/genai/Caches.java b/src/main/java/com/google/genai/Caches.java
index e760b8cb688..b14cc2d9c9f 100644
--- a/src/main/java/com/google/genai/Caches.java
+++ b/src/main/java/com/google/genai/Caches.java
@@ -135,6 +135,32 @@ ObjectNode blobToMldev(JsonNode fromObject, ObjectNode parentObject) {
return toObject;
}
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode codeExecutionResultToVertex(JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"outcome"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"outcome"},
+ Common.getValueByPath(fromObject, new String[] {"outcome"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"output"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"output"},
+ Common.getValueByPath(fromObject, new String[] {"output"}));
+ }
+
+ if (!Common.isZero(Common.getValueByPath(fromObject, new String[] {"id"}))) {
+ throw new IllegalArgumentException(
+ "id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise"
+ + " Agent Platform mode.");
+ }
+
+ return toObject;
+ }
+
@ExcludeFromGeneratedCoverageReport
ObjectNode contentToMldev(JsonNode fromObject, ObjectNode parentObject) {
ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
@@ -444,6 +470,32 @@ ObjectNode deleteCachedContentResponseFromVertex(JsonNode fromObject, ObjectNode
return toObject;
}
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode executableCodeToVertex(JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"code"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"code"},
+ Common.getValueByPath(fromObject, new String[] {"code"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"language"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"language"},
+ Common.getValueByPath(fromObject, new String[] {"language"}));
+ }
+
+ if (!Common.isZero(Common.getValueByPath(fromObject, new String[] {"id"}))) {
+ throw new IllegalArgumentException(
+ "id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise"
+ + " Agent Platform mode.");
+ }
+
+ return toObject;
+ }
+
@ExcludeFromGeneratedCoverageReport
ObjectNode fileDataToMldev(JsonNode fromObject, ObjectNode parentObject) {
ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
@@ -870,14 +922,20 @@ ObjectNode partToVertex(JsonNode fromObject, ObjectNode parentObject) {
Common.setValueByPath(
toObject,
new String[] {"codeExecutionResult"},
- Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}));
+ codeExecutionResultToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"})),
+ toObject));
}
if (Common.getValueByPath(fromObject, new String[] {"executableCode"}) != null) {
Common.setValueByPath(
toObject,
new String[] {"executableCode"},
- Common.getValueByPath(fromObject, new String[] {"executableCode"}));
+ executableCodeToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"executableCode"})),
+ toObject));
}
if (Common.getValueByPath(fromObject, new String[] {"fileData"}) != null) {
diff --git a/src/main/java/com/google/genai/LiveConverters.java b/src/main/java/com/google/genai/LiveConverters.java
index 2e478a20cf3..f9c891a07f6 100644
--- a/src/main/java/com/google/genai/LiveConverters.java
+++ b/src/main/java/com/google/genai/LiveConverters.java
@@ -119,6 +119,32 @@ ObjectNode blobToMldev(JsonNode fromObject, ObjectNode parentObject) {
return toObject;
}
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode codeExecutionResultToVertex(JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"outcome"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"outcome"},
+ Common.getValueByPath(fromObject, new String[] {"outcome"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"output"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"output"},
+ Common.getValueByPath(fromObject, new String[] {"output"}));
+ }
+
+ if (!Common.isZero(Common.getValueByPath(fromObject, new String[] {"id"}))) {
+ throw new IllegalArgumentException(
+ "id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise"
+ + " Agent Platform mode.");
+ }
+
+ return toObject;
+ }
+
@ExcludeFromGeneratedCoverageReport
ObjectNode contentToMldev(JsonNode fromObject, ObjectNode parentObject) {
ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
@@ -167,6 +193,32 @@ ObjectNode contentToVertex(JsonNode fromObject, ObjectNode parentObject) {
return toObject;
}
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode executableCodeToVertex(JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"code"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"code"},
+ Common.getValueByPath(fromObject, new String[] {"code"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"language"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"language"},
+ Common.getValueByPath(fromObject, new String[] {"language"}));
+ }
+
+ if (!Common.isZero(Common.getValueByPath(fromObject, new String[] {"id"}))) {
+ throw new IllegalArgumentException(
+ "id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise"
+ + " Agent Platform mode.");
+ }
+
+ return toObject;
+ }
+
@ExcludeFromGeneratedCoverageReport
ObjectNode fileDataToMldev(JsonNode fromObject, ObjectNode parentObject) {
ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
@@ -1761,14 +1813,20 @@ ObjectNode partToVertex(JsonNode fromObject, ObjectNode parentObject) {
Common.setValueByPath(
toObject,
new String[] {"codeExecutionResult"},
- Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}));
+ codeExecutionResultToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"})),
+ toObject));
}
if (Common.getValueByPath(fromObject, new String[] {"executableCode"}) != null) {
Common.setValueByPath(
toObject,
new String[] {"executableCode"},
- Common.getValueByPath(fromObject, new String[] {"executableCode"}));
+ executableCodeToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"executableCode"})),
+ toObject));
}
if (Common.getValueByPath(fromObject, new String[] {"fileData"}) != null) {
diff --git a/src/main/java/com/google/genai/Models.java b/src/main/java/com/google/genai/Models.java
index 324156777ca..75299143d9e 100644
--- a/src/main/java/com/google/genai/Models.java
+++ b/src/main/java/com/google/genai/Models.java
@@ -314,6 +314,33 @@ ObjectNode citationMetadataFromMldev(
return toObject;
}
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode codeExecutionResultToVertex(
+ JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"outcome"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"outcome"},
+ Common.getValueByPath(fromObject, new String[] {"outcome"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"output"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"output"},
+ Common.getValueByPath(fromObject, new String[] {"output"}));
+ }
+
+ if (!Common.isZero(Common.getValueByPath(fromObject, new String[] {"id"}))) {
+ throw new IllegalArgumentException(
+ "id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise"
+ + " Agent Platform mode.");
+ }
+
+ return toObject;
+ }
+
@ExcludeFromGeneratedCoverageReport
ObjectNode computeTokensParametersToVertex(
ApiClient apiClient, JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
@@ -929,7 +956,6 @@ ObjectNode editImageResponseFromVertex(
ObjectNode embedContentConfigToMldev(
JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
-
if (Common.getValueByPath(fromObject, new String[] {"taskType"}) != null) {
Common.setValueByPath(
parentObject,
@@ -1320,6 +1346,33 @@ ObjectNode endpointFromVertex(JsonNode fromObject, ObjectNode parentObject, Json
return toObject;
}
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode executableCodeToVertex(
+ JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"code"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"code"},
+ Common.getValueByPath(fromObject, new String[] {"code"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"language"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"language"},
+ Common.getValueByPath(fromObject, new String[] {"language"}));
+ }
+
+ if (!Common.isZero(Common.getValueByPath(fromObject, new String[] {"id"}))) {
+ throw new IllegalArgumentException(
+ "id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise"
+ + " Agent Platform mode.");
+ }
+
+ return toObject;
+ }
+
@ExcludeFromGeneratedCoverageReport
ObjectNode fileDataToMldev(JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
@@ -4269,14 +4322,22 @@ ObjectNode partToVertex(JsonNode fromObject, ObjectNode parentObject, JsonNode r
Common.setValueByPath(
toObject,
new String[] {"codeExecutionResult"},
- Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}));
+ codeExecutionResultToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"})),
+ toObject,
+ rootObject));
}
if (Common.getValueByPath(fromObject, new String[] {"executableCode"}) != null) {
Common.setValueByPath(
toObject,
new String[] {"executableCode"},
- Common.getValueByPath(fromObject, new String[] {"executableCode"}));
+ executableCodeToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"executableCode"})),
+ toObject,
+ rootObject));
}
if (Common.getValueByPath(fromObject, new String[] {"fileData"}) != null) {
diff --git a/src/main/java/com/google/genai/Tunings.java b/src/main/java/com/google/genai/Tunings.java
index fb79ae7ec49..ac8f0ace916 100644
--- a/src/main/java/com/google/genai/Tunings.java
+++ b/src/main/java/com/google/genai/Tunings.java
@@ -667,6 +667,179 @@ ObjectNode createTuningJobParametersPrivateToVertex(
return toObject;
}
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode distillationHyperParametersFromVertex(
+ JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"adapterSize"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"adapterSize"},
+ Common.getValueByPath(fromObject, new String[] {"adapterSize"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"epochCount"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"epochCount"},
+ Common.getValueByPath(fromObject, new String[] {"epochCount"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"learningRateMultiplier"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"learningRateMultiplier"},
+ Common.getValueByPath(fromObject, new String[] {"learningRateMultiplier"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"generationConfig"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"generationConfig"},
+ generationConfigFromVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"generationConfig"})),
+ toObject,
+ rootObject));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"learningRate"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"learningRate"},
+ Common.getValueByPath(fromObject, new String[] {"learningRate"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"batchSize"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"batchSize"},
+ Common.getValueByPath(fromObject, new String[] {"batchSize"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode distillationSamplingSpecFromVertex(
+ JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"baseTeacherModel"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"baseTeacherModel"},
+ Common.getValueByPath(fromObject, new String[] {"baseTeacherModel"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"tunedTeacherModelSource"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"tunedTeacherModelSource"},
+ Common.getValueByPath(fromObject, new String[] {"tunedTeacherModelSource"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"validationDatasetUri"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"validationDatasetUri"},
+ Common.getValueByPath(fromObject, new String[] {"validationDatasetUri"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"promptDatasetUri"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"promptDatasetUri"},
+ Common.getValueByPath(fromObject, new String[] {"promptDatasetUri"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"hyperparameters"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"hyperparameters"},
+ distillationHyperParametersFromVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"hyperparameters"})),
+ toObject,
+ rootObject));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode distillationSpecFromVertex(
+ JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"promptDatasetUri"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"promptDatasetUri"},
+ Common.getValueByPath(fromObject, new String[] {"promptDatasetUri"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"baseTeacherModel"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"baseTeacherModel"},
+ Common.getValueByPath(fromObject, new String[] {"baseTeacherModel"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"hyperParameters"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"hyperParameters"},
+ distillationHyperParametersFromVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"hyperParameters"})),
+ toObject,
+ rootObject));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"pipelineRootDirectory"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"pipelineRootDirectory"},
+ Common.getValueByPath(fromObject, new String[] {"pipelineRootDirectory"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"studentModel"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"studentModel"},
+ Common.getValueByPath(fromObject, new String[] {"studentModel"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"trainingDatasetUri"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"trainingDatasetUri"},
+ Common.getValueByPath(fromObject, new String[] {"trainingDatasetUri"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"tunedTeacherModelSource"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"tunedTeacherModelSource"},
+ Common.getValueByPath(fromObject, new String[] {"tunedTeacherModelSource"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"validationDatasetUri"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"validationDatasetUri"},
+ Common.getValueByPath(fromObject, new String[] {"validationDatasetUri"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"tuningMode"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"tuningMode"},
+ Common.getValueByPath(fromObject, new String[] {"tuningMode"}));
+ }
+
+ return toObject;
+ }
+
@ExcludeFromGeneratedCoverageReport
ObjectNode evaluationConfigFromVertex(
JsonNode fromObject, ObjectNode parentObject, JsonNode rootObject) {
@@ -1482,7 +1655,11 @@ ObjectNode tuningJobFromVertex(
Common.setValueByPath(
toObject,
new String[] {"distillationSpec"},
- Common.getValueByPath(fromObject, new String[] {"distillationSpec"}));
+ distillationSpecFromVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"distillationSpec"})),
+ toObject,
+ rootObject));
}
if (Common.getValueByPath(fromObject, new String[] {"tuningDataStats"}) != null) {
@@ -1594,18 +1771,29 @@ ObjectNode tuningJobFromVertex(
Common.getValueByPath(fromObject, new String[] {"veoTuningSpec"}));
}
- if (Common.getValueByPath(fromObject, new String[] {"distillationSamplingSpec"}) != null) {
+ if (Common.getValueByPath(fromObject, new String[] {"tuningJobMetadata"}) != null) {
Common.setValueByPath(
toObject,
- new String[] {"distillationSamplingSpec"},
- Common.getValueByPath(fromObject, new String[] {"distillationSamplingSpec"}));
+ new String[] {"tuningJobMetadata"},
+ Common.getValueByPath(fromObject, new String[] {"tuningJobMetadata"}));
}
- if (Common.getValueByPath(fromObject, new String[] {"tuningJobMetadata"}) != null) {
+ if (Common.getValueByPath(fromObject, new String[] {"veoLoraTuningSpec"}) != null) {
Common.setValueByPath(
toObject,
- new String[] {"tuningJobMetadata"},
- Common.getValueByPath(fromObject, new String[] {"tuningJobMetadata"}));
+ new String[] {"veoLoraTuningSpec"},
+ Common.getValueByPath(fromObject, new String[] {"veoLoraTuningSpec"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"distillationSamplingSpec"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"distillationSamplingSpec"},
+ distillationSamplingSpecFromVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"distillationSamplingSpec"})),
+ toObject,
+ rootObject));
}
return toObject;
diff --git a/src/main/java/com/google/genai/types/CodeExecutionResult.java b/src/main/java/com/google/genai/types/CodeExecutionResult.java
index 93c86706b1b..154aaf14b5a 100644
--- a/src/main/java/com/google/genai/types/CodeExecutionResult.java
+++ b/src/main/java/com/google/genai/types/CodeExecutionResult.java
@@ -26,11 +26,7 @@
import com.google.genai.JsonSerializable;
import java.util.Optional;
-/**
- * Result of executing the `ExecutableCode`.
- *
- *
Generated only when the `CodeExecution` tool is used.
- */
+/** Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. */
@AutoValue
@JsonDeserialize(builder = CodeExecutionResult.Builder.class)
public abstract class CodeExecutionResult extends JsonSerializable {
@@ -46,8 +42,8 @@ public abstract class CodeExecutionResult extends JsonSerializable {
public abstract Optional output();
/**
- * The identifier of the `ExecutableCode` part this result is for. Only populated if the
- * corresponding `ExecutableCode` has an id.
+ * Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the
+ * corresponding `ExecutableCode` has an id. This field is not supported in Vertex AI.
*/
@JsonProperty("id")
public abstract Optional id();
@@ -130,8 +126,9 @@ public Builder clearOutput() {
/**
* Setter for id.
*
- * id: The identifier of the `ExecutableCode` part this result is for. Only populated if the
- * corresponding `ExecutableCode` has an id.
+ *
id: Optional. The identifier of the `ExecutableCode` part this result is for. Only
+ * populated if the corresponding `ExecutableCode` has an id. This field is not supported in
+ * Vertex AI.
*/
@JsonProperty("id")
public abstract Builder id(String id);
diff --git a/src/main/java/com/google/genai/types/DistillationHyperParameters.java b/src/main/java/com/google/genai/types/DistillationHyperParameters.java
index 8275f6ad40b..cd4ad941f34 100644
--- a/src/main/java/com/google/genai/types/DistillationHyperParameters.java
+++ b/src/main/java/com/google/genai/types/DistillationHyperParameters.java
@@ -27,37 +27,39 @@
import com.google.genai.JsonSerializable;
import java.util.Optional;
-/** Hyperparameters for distillation. */
+/** Distillation hyperparameters for tuning. */
@AutoValue
@InternalApi
@JsonDeserialize(builder = DistillationHyperParameters.Builder.class)
public abstract class DistillationHyperParameters extends JsonSerializable {
- /** Optional. Adapter size for distillation. */
+ /** The size of the adapter. Can be 'small', 'medium', or 'large'. */
@JsonProperty("adapterSize")
public abstract Optional adapterSize();
- /**
- * Optional. Number of complete passes the model makes over the entire training dataset during
- * training.
- */
+ /** Number of complete passes the model makes over the entire training dataset during training. */
@JsonProperty("epochCount")
public abstract Optional epochCount();
- /** Optional. Multiplier for adjusting the default learning rate. */
+ /** Multiplier for adjusting the default learning rate. */
@JsonProperty("learningRateMultiplier")
- public abstract Optional learningRateMultiplier();
+ public abstract Optional learningRateMultiplier();
/**
- * The batch size hyperparameter for tuning. This is only supported for OSS models in Gemini
- * Enterprise Agent Platform.
+ * Generation config for Distillation teacher model sampling. Only the following fields are
+ * supported for distillation teacher samplings: - temperature - top_p - top_k - candidate_count -
+ * thinking_config
*/
- @JsonProperty("batchSize")
- public abstract Optional batchSize();
+ @JsonProperty("generationConfig")
+ public abstract Optional generationConfig();
- /** The learning rate for tuning. OSS models only. */
+ /** The learning rate for distillation tuning. */
@JsonProperty("learningRate")
public abstract Optional learningRate();
+ /** Batch size for tuning. This feature is only available for open source models. */
+ @JsonProperty("batchSize")
+ public abstract Optional batchSize();
+
/** Instantiates a builder for DistillationHyperParameters. */
@ExcludeFromGeneratedCoverageReport
public static Builder builder() {
@@ -79,7 +81,7 @@ private static Builder create() {
/**
* Setter for adapterSize.
*
- * adapterSize: Optional. Adapter size for distillation.
+ *
adapterSize: The size of the adapter. Can be 'small', 'medium', or 'large'.
*/
@JsonProperty("adapterSize")
public abstract Builder adapterSize(AdapterSize adapterSize);
@@ -97,7 +99,7 @@ public Builder clearAdapterSize() {
/**
* Setter for adapterSize given a known enum.
*
- *
adapterSize: Optional. Adapter size for distillation.
+ *
adapterSize: The size of the adapter. Can be 'small', 'medium', or 'large'.
*/
@CanIgnoreReturnValue
public Builder adapterSize(AdapterSize.Known knownType) {
@@ -107,7 +109,7 @@ public Builder adapterSize(AdapterSize.Known knownType) {
/**
* Setter for adapterSize given a string.
*
- *
adapterSize: Optional. Adapter size for distillation.
+ *
adapterSize: The size of the adapter. Can be 'small', 'medium', or 'large'.
*/
@CanIgnoreReturnValue
public Builder adapterSize(String adapterSize) {
@@ -117,8 +119,8 @@ public Builder adapterSize(String adapterSize) {
/**
* Setter for epochCount.
*
- *
epochCount: Optional. Number of complete passes the model makes over the entire training
- * dataset during training.
+ *
epochCount: Number of complete passes the model makes over the entire training dataset
+ * during training.
*/
@JsonProperty("epochCount")
public abstract Builder epochCount(Long epochCount);
@@ -136,13 +138,13 @@ public Builder clearEpochCount() {
/**
* Setter for learningRateMultiplier.
*
- *
learningRateMultiplier: Optional. Multiplier for adjusting the default learning rate.
+ *
learningRateMultiplier: Multiplier for adjusting the default learning rate.
*/
@JsonProperty("learningRateMultiplier")
- public abstract Builder learningRateMultiplier(Double learningRateMultiplier);
+ public abstract Builder learningRateMultiplier(Float learningRateMultiplier);
@ExcludeFromGeneratedCoverageReport
- abstract Builder learningRateMultiplier(Optional learningRateMultiplier);
+ abstract Builder learningRateMultiplier(Optional learningRateMultiplier);
/** Clears the value of learningRateMultiplier field. */
@ExcludeFromGeneratedCoverageReport
@@ -152,28 +154,41 @@ public Builder clearLearningRateMultiplier() {
}
/**
- * Setter for batchSize.
+ * Setter for generationConfig.
*
- * batchSize: The batch size hyperparameter for tuning. This is only supported for OSS models
- * in Gemini Enterprise Agent Platform.
+ *
generationConfig: Generation config for Distillation teacher model sampling. Only the
+ * following fields are supported for distillation teacher samplings: - temperature - top_p -
+ * top_k - candidate_count - thinking_config
*/
- @JsonProperty("batchSize")
- public abstract Builder batchSize(Integer batchSize);
+ @JsonProperty("generationConfig")
+ public abstract Builder generationConfig(GenerationConfig generationConfig);
+
+ /**
+ * Setter for generationConfig builder.
+ *
+ *
generationConfig: Generation config for Distillation teacher model sampling. Only the
+ * following fields are supported for distillation teacher samplings: - temperature - top_p -
+ * top_k - candidate_count - thinking_config
+ */
+ @CanIgnoreReturnValue
+ public Builder generationConfig(GenerationConfig.Builder generationConfigBuilder) {
+ return generationConfig(generationConfigBuilder.build());
+ }
@ExcludeFromGeneratedCoverageReport
- abstract Builder batchSize(Optional batchSize);
+ abstract Builder generationConfig(Optional generationConfig);
- /** Clears the value of batchSize field. */
+ /** Clears the value of generationConfig field. */
@ExcludeFromGeneratedCoverageReport
@CanIgnoreReturnValue
- public Builder clearBatchSize() {
- return batchSize(Optional.empty());
+ public Builder clearGenerationConfig() {
+ return generationConfig(Optional.empty());
}
/**
* Setter for learningRate.
*
- * learningRate: The learning rate for tuning. OSS models only.
+ *
learningRate: The learning rate for distillation tuning.
*/
@JsonProperty("learningRate")
public abstract Builder learningRate(Float learningRate);
@@ -188,6 +203,24 @@ public Builder clearLearningRate() {
return learningRate(Optional.empty());
}
+ /**
+ * Setter for batchSize.
+ *
+ *
batchSize: Batch size for tuning. This feature is only available for open source models.
+ */
+ @JsonProperty("batchSize")
+ public abstract Builder batchSize(Integer batchSize);
+
+ @ExcludeFromGeneratedCoverageReport
+ abstract Builder batchSize(Optional batchSize);
+
+ /** Clears the value of batchSize field. */
+ @ExcludeFromGeneratedCoverageReport
+ @CanIgnoreReturnValue
+ public Builder clearBatchSize() {
+ return batchSize(Optional.empty());
+ }
+
public abstract DistillationHyperParameters build();
}
diff --git a/src/main/java/com/google/genai/types/DistillationSamplingSpec.java b/src/main/java/com/google/genai/types/DistillationSamplingSpec.java
index 94ec3ceaa84..74d7057dd30 100644
--- a/src/main/java/com/google/genai/types/DistillationSamplingSpec.java
+++ b/src/main/java/com/google/genai/types/DistillationSamplingSpec.java
@@ -26,34 +26,42 @@
import com.google.genai.JsonSerializable;
import java.util.Optional;
-/**
- * Spec for creating a distilled dataset in Vertex Dataset. This data type is not supported in
- * Gemini API.
- */
+/** Distillation sampling spec for tuning. */
@AutoValue
@JsonDeserialize(builder = DistillationSamplingSpec.Builder.class)
public abstract class DistillationSamplingSpec extends JsonSerializable {
/**
- * Optional. The base teacher model that is being distilled. See [Supported
+ * The base teacher model that is being distilled. See [Supported
* models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
*/
@JsonProperty("baseTeacherModel")
public abstract Optional baseTeacherModel();
/**
- * Optional. The resource name of the Tuned teacher model. Format:
+ * The resource name of the Tuned teacher model. Format:
* `projects/{project}/locations/{location}/models/{model}`.
*/
@JsonProperty("tunedTeacherModelSource")
public abstract Optional tunedTeacherModelSource();
/**
- * Optional. Cloud Storage path to file containing validation dataset for distillation. The
- * dataset must be formatted as a JSONL file.
+ * Cloud Storage path to file containing validation dataset for distillation. The dataset must be
+ * formatted as a JSONL file.
*/
@JsonProperty("validationDatasetUri")
public abstract Optional validationDatasetUri();
+ /**
+ * Cloud Storage path to file containing prompt dataset for distillation. The dataset must be
+ * formatted as a JSONL file.
+ */
+ @JsonProperty("promptDatasetUri")
+ public abstract Optional promptDatasetUri();
+
+ /** Hyperparameters for distillation tuning. */
+ @JsonProperty("hyperparameters")
+ public abstract Optional hyperparameters();
+
/** Instantiates a builder for DistillationSamplingSpec. */
@ExcludeFromGeneratedCoverageReport
public static Builder builder() {
@@ -75,7 +83,7 @@ private static Builder create() {
/**
* Setter for baseTeacherModel.
*
- * baseTeacherModel: Optional. The base teacher model that is being distilled. See [Supported
+ *
baseTeacherModel: The base teacher model that is being distilled. See [Supported
* models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
*/
@JsonProperty("baseTeacherModel")
@@ -94,7 +102,7 @@ public Builder clearBaseTeacherModel() {
/**
* Setter for tunedTeacherModelSource.
*
- *
tunedTeacherModelSource: Optional. The resource name of the Tuned teacher model. Format:
+ *
tunedTeacherModelSource: The resource name of the Tuned teacher model. Format:
* `projects/{project}/locations/{location}/models/{model}`.
*/
@JsonProperty("tunedTeacherModelSource")
@@ -113,8 +121,8 @@ public Builder clearTunedTeacherModelSource() {
/**
* Setter for validationDatasetUri.
*
- *
validationDatasetUri: Optional. Cloud Storage path to file containing validation dataset
- * for distillation. The dataset must be formatted as a JSONL file.
+ *
validationDatasetUri: Cloud Storage path to file containing validation dataset for
+ * distillation. The dataset must be formatted as a JSONL file.
*/
@JsonProperty("validationDatasetUri")
public abstract Builder validationDatasetUri(String validationDatasetUri);
@@ -129,6 +137,53 @@ public Builder clearValidationDatasetUri() {
return validationDatasetUri(Optional.empty());
}
+ /**
+ * Setter for promptDatasetUri.
+ *
+ *
promptDatasetUri: Cloud Storage path to file containing prompt dataset for distillation.
+ * The dataset must be formatted as a JSONL file.
+ */
+ @JsonProperty("promptDatasetUri")
+ public abstract Builder promptDatasetUri(String promptDatasetUri);
+
+ @ExcludeFromGeneratedCoverageReport
+ abstract Builder promptDatasetUri(Optional promptDatasetUri);
+
+ /** Clears the value of promptDatasetUri field. */
+ @ExcludeFromGeneratedCoverageReport
+ @CanIgnoreReturnValue
+ public Builder clearPromptDatasetUri() {
+ return promptDatasetUri(Optional.empty());
+ }
+
+ /**
+ * Setter for hyperparameters.
+ *
+ * hyperparameters: Hyperparameters for distillation tuning.
+ */
+ @JsonProperty("hyperparameters")
+ public abstract Builder hyperparameters(DistillationHyperParameters hyperparameters);
+
+ /**
+ * Setter for hyperparameters builder.
+ *
+ *
hyperparameters: Hyperparameters for distillation tuning.
+ */
+ @CanIgnoreReturnValue
+ public Builder hyperparameters(DistillationHyperParameters.Builder hyperparametersBuilder) {
+ return hyperparameters(hyperparametersBuilder.build());
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ abstract Builder hyperparameters(Optional hyperparameters);
+
+ /** Clears the value of hyperparameters field. */
+ @ExcludeFromGeneratedCoverageReport
+ @CanIgnoreReturnValue
+ public Builder clearHyperparameters() {
+ return hyperparameters(Optional.empty());
+ }
+
public abstract DistillationSamplingSpec build();
}
diff --git a/src/main/java/com/google/genai/types/DistillationSpec.java b/src/main/java/com/google/genai/types/DistillationSpec.java
index d4780ab5170..9f55b8f88aa 100644
--- a/src/main/java/com/google/genai/types/DistillationSpec.java
+++ b/src/main/java/com/google/genai/types/DistillationSpec.java
@@ -30,7 +30,10 @@
@AutoValue
@JsonDeserialize(builder = DistillationSpec.Builder.class)
public abstract class DistillationSpec extends JsonSerializable {
- /** The GCS URI of the prompt dataset to use during distillation. */
+ /**
+ * Optional. Cloud Storage path to file containing prompt dataset for distillation. The dataset
+ * must be formatted as a JSONL file.
+ */
@JsonProperty("promptDatasetUri")
public abstract Optional promptDatasetUri();
@@ -81,7 +84,10 @@ public abstract class DistillationSpec extends JsonSerializable {
@JsonProperty("validationDatasetUri")
public abstract Optional validationDatasetUri();
- /** Tuning mode for tuning. */
+ /**
+ * Optional. Specifies the tuning mode for distillation (sft part). This feature is only available
+ * for open source models.
+ */
@JsonProperty("tuningMode")
public abstract Optional tuningMode();
@@ -106,7 +112,8 @@ private static Builder create() {
/**
* Setter for promptDatasetUri.
*
- * promptDatasetUri: The GCS URI of the prompt dataset to use during distillation.
+ *
promptDatasetUri: Optional. Cloud Storage path to file containing prompt dataset for
+ * distillation. The dataset must be formatted as a JSONL file.
*/
@JsonProperty("promptDatasetUri")
public abstract Builder promptDatasetUri(String promptDatasetUri);
@@ -267,7 +274,8 @@ public Builder clearValidationDatasetUri() {
/**
* Setter for tuningMode.
*
- *
tuningMode: Tuning mode for tuning.
+ *
tuningMode: Optional. Specifies the tuning mode for distillation (sft part). This feature
+ * is only available for open source models.
*/
@JsonProperty("tuningMode")
public abstract Builder tuningMode(TuningMode tuningMode);
@@ -285,7 +293,8 @@ public Builder clearTuningMode() {
/**
* Setter for tuningMode given a known enum.
*
- *
tuningMode: Tuning mode for tuning.
+ *
tuningMode: Optional. Specifies the tuning mode for distillation (sft part). This feature
+ * is only available for open source models.
*/
@CanIgnoreReturnValue
public Builder tuningMode(TuningMode.Known knownType) {
@@ -295,7 +304,8 @@ public Builder tuningMode(TuningMode.Known knownType) {
/**
* Setter for tuningMode given a string.
*
- *
tuningMode: Tuning mode for tuning.
+ *
tuningMode: Optional. Specifies the tuning mode for distillation (sft part). This feature
+ * is only available for open source models.
*/
@CanIgnoreReturnValue
public Builder tuningMode(String tuningMode) {
diff --git a/src/main/java/com/google/genai/types/EmbedContentConfig.java b/src/main/java/com/google/genai/types/EmbedContentConfig.java
index 1f50e4729dc..2a600f22aec 100644
--- a/src/main/java/com/google/genai/types/EmbedContentConfig.java
+++ b/src/main/java/com/google/genai/types/EmbedContentConfig.java
@@ -30,10 +30,6 @@
@AutoValue
@JsonDeserialize(builder = EmbedContentConfig.Builder.class)
public abstract class EmbedContentConfig extends JsonSerializable {
- /** Used to override HTTP request options. */
- @JsonProperty("httpOptions")
- public abstract Optional httpOptions();
-
/** Type of task for which the embedding will be used. */
@JsonProperty("taskType")
public abstract Optional taskType();
@@ -76,6 +72,10 @@ public abstract class EmbedContentConfig extends JsonSerializable {
@JsonProperty("audioTrackExtraction")
public abstract Optional audioTrackExtraction();
+ /** Used to override HTTP request options. */
+ @JsonProperty("httpOptions")
+ public abstract Optional httpOptions();
+
/** Instantiates a builder for EmbedContentConfig. */
@ExcludeFromGeneratedCoverageReport
public static Builder builder() {
@@ -94,34 +94,6 @@ private static Builder create() {
return new AutoValue_EmbedContentConfig.Builder();
}
- /**
- * Setter for httpOptions.
- *
- * httpOptions: Used to override HTTP request options.
- */
- @JsonProperty("httpOptions")
- public abstract Builder httpOptions(HttpOptions httpOptions);
-
- /**
- * Setter for httpOptions builder.
- *
- *
httpOptions: Used to override HTTP request options.
- */
- @CanIgnoreReturnValue
- public Builder httpOptions(HttpOptions.Builder httpOptionsBuilder) {
- return httpOptions(httpOptionsBuilder.build());
- }
-
- @ExcludeFromGeneratedCoverageReport
- abstract Builder httpOptions(Optional httpOptions);
-
- /** Clears the value of httpOptions field. */
- @ExcludeFromGeneratedCoverageReport
- @CanIgnoreReturnValue
- public Builder clearHttpOptions() {
- return httpOptions(Optional.empty());
- }
-
/**
* Setter for taskType.
*
@@ -254,6 +226,34 @@ public Builder clearAudioTrackExtraction() {
return audioTrackExtraction(Optional.empty());
}
+ /**
+ * Setter for httpOptions.
+ *
+ * httpOptions: Used to override HTTP request options.
+ */
+ @JsonProperty("httpOptions")
+ public abstract Builder httpOptions(HttpOptions httpOptions);
+
+ /**
+ * Setter for httpOptions builder.
+ *
+ *
httpOptions: Used to override HTTP request options.
+ */
+ @CanIgnoreReturnValue
+ public Builder httpOptions(HttpOptions.Builder httpOptionsBuilder) {
+ return httpOptions(httpOptionsBuilder.build());
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ abstract Builder httpOptions(Optional httpOptions);
+
+ /** Clears the value of httpOptions field. */
+ @ExcludeFromGeneratedCoverageReport
+ @CanIgnoreReturnValue
+ public Builder clearHttpOptions() {
+ return httpOptions(Optional.empty());
+ }
+
public abstract EmbedContentConfig build();
}
diff --git a/src/main/java/com/google/genai/types/EvaluationParserConfig.java b/src/main/java/com/google/genai/types/EvaluationParserConfig.java
new file mode 100644
index 00000000000..15ef3c31b85
--- /dev/null
+++ b/src/main/java/com/google/genai/types/EvaluationParserConfig.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Auto-generated code. Do not edit.
+
+package com.google.genai.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.google.auto.value.AutoValue;
+import com.google.errorprone.annotations.CanIgnoreReturnValue;
+import com.google.genai.JsonSerializable;
+import java.util.Optional;
+
+/**
+ * Config for parsing LLM responses. It can be used to parse the LLM response to be evaluated, or
+ * the LLM response from LLM-based metrics/Autoraters. This data type is not supported in Gemini
+ * API.
+ */
+@AutoValue
+@JsonDeserialize(builder = EvaluationParserConfig.Builder.class)
+public abstract class EvaluationParserConfig extends JsonSerializable {
+ /** Optional. Use custom code to parse the LLM response. */
+ @JsonProperty("customCodeParserConfig")
+ public abstract Optional customCodeParserConfig();
+
+ /** Instantiates a builder for EvaluationParserConfig. */
+ @ExcludeFromGeneratedCoverageReport
+ public static Builder builder() {
+ return new AutoValue_EvaluationParserConfig.Builder();
+ }
+
+ /** Creates a builder with the same values as this instance. */
+ public abstract Builder toBuilder();
+
+ /** Builder for EvaluationParserConfig. */
+ @AutoValue.Builder
+ public abstract static class Builder {
+ /** For internal usage. Please use `EvaluationParserConfig.builder()` for instantiation. */
+ @JsonCreator
+ private static Builder create() {
+ return new AutoValue_EvaluationParserConfig.Builder();
+ }
+
+ /**
+ * Setter for customCodeParserConfig.
+ *
+ * customCodeParserConfig: Optional. Use custom code to parse the LLM response.
+ */
+ @JsonProperty("customCodeParserConfig")
+ public abstract Builder customCodeParserConfig(
+ EvaluationParserConfigCustomCodeParserConfig customCodeParserConfig);
+
+ /**
+ * Setter for customCodeParserConfig builder.
+ *
+ *
customCodeParserConfig: Optional. Use custom code to parse the LLM response.
+ */
+ @CanIgnoreReturnValue
+ public Builder customCodeParserConfig(
+ EvaluationParserConfigCustomCodeParserConfig.Builder customCodeParserConfigBuilder) {
+ return customCodeParserConfig(customCodeParserConfigBuilder.build());
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ abstract Builder customCodeParserConfig(
+ Optional customCodeParserConfig);
+
+ /** Clears the value of customCodeParserConfig field. */
+ @ExcludeFromGeneratedCoverageReport
+ @CanIgnoreReturnValue
+ public Builder clearCustomCodeParserConfig() {
+ return customCodeParserConfig(Optional.empty());
+ }
+
+ public abstract EvaluationParserConfig build();
+ }
+
+ /** Deserializes a JSON string to a EvaluationParserConfig object. */
+ @ExcludeFromGeneratedCoverageReport
+ public static EvaluationParserConfig fromJson(String jsonString) {
+ return JsonSerializable.fromJsonString(jsonString, EvaluationParserConfig.class);
+ }
+}
diff --git a/src/main/java/com/google/genai/types/EvaluationParserConfigCustomCodeParserConfig.java b/src/main/java/com/google/genai/types/EvaluationParserConfigCustomCodeParserConfig.java
new file mode 100644
index 00000000000..f7705c96604
--- /dev/null
+++ b/src/main/java/com/google/genai/types/EvaluationParserConfigCustomCodeParserConfig.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Auto-generated code. Do not edit.
+
+package com.google.genai.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.google.auto.value.AutoValue;
+import com.google.errorprone.annotations.CanIgnoreReturnValue;
+import com.google.genai.JsonSerializable;
+import java.util.Optional;
+
+/**
+ * Configuration for parsing the LLM response using custom code. This data type is not supported in
+ * Gemini API.
+ */
+@AutoValue
+@JsonDeserialize(builder = EvaluationParserConfigCustomCodeParserConfig.Builder.class)
+public abstract class EvaluationParserConfigCustomCodeParserConfig extends JsonSerializable {
+ /**
+ * Required. Python function for parsing results. The function should be defined within this
+ * string. The function takes a list of strings (LLM responses) and should return either a list of
+ * dictionaries (for rubrics) or a single dictionary (for a metric result). Example function
+ * signature: def parse(responses: list[str]) -> list[dict[str, Any]] | dict[str, Any]: When
+ * parsing rubrics, return a list of dictionaries, where each dictionary represents a Rubric.
+ * Example for rubrics: [ { "content": {"property": {"description": "The response is factual."}},
+ * "type": "FACTUALITY", "importance": "HIGH" }, { "content": {"property": {"description": "The
+ * response is fluent."}}, "type": "FLUENCY", "importance": "MEDIUM" } ] When parsing critique
+ * results, return a dictionary representing a MetricResult. Example for a metric result: {
+ * "score": 0.8, "explanation": "The model followed most instructions.", "rubric_verdicts": [...]
+ * } ... code for result extraction and aggregation
+ */
+ @JsonProperty("parsingFunction")
+ public abstract Optional parsingFunction();
+
+ /** Instantiates a builder for EvaluationParserConfigCustomCodeParserConfig. */
+ @ExcludeFromGeneratedCoverageReport
+ public static Builder builder() {
+ return new AutoValue_EvaluationParserConfigCustomCodeParserConfig.Builder();
+ }
+
+ /** Creates a builder with the same values as this instance. */
+ public abstract Builder toBuilder();
+
+ /** Builder for EvaluationParserConfigCustomCodeParserConfig. */
+ @AutoValue.Builder
+ public abstract static class Builder {
+ /**
+ * For internal usage. Please use `EvaluationParserConfigCustomCodeParserConfig.builder()` for
+ * instantiation.
+ */
+ @JsonCreator
+ private static Builder create() {
+ return new AutoValue_EvaluationParserConfigCustomCodeParserConfig.Builder();
+ }
+
+ /**
+ * Setter for parsingFunction.
+ *
+ * parsingFunction: Required. Python function for parsing results. The function should be
+ * defined within this string. The function takes a list of strings (LLM responses) and should
+ * return either a list of dictionaries (for rubrics) or a single dictionary (for a metric
+ * result). Example function signature: def parse(responses: list[str]) -> list[dict[str, Any]]
+ * | dict[str, Any]: When parsing rubrics, return a list of dictionaries, where each dictionary
+ * represents a Rubric. Example for rubrics: [ { "content": {"property": {"description": "The
+ * response is factual."}}, "type": "FACTUALITY", "importance": "HIGH" }, { "content":
+ * {"property": {"description": "The response is fluent."}}, "type": "FLUENCY", "importance":
+ * "MEDIUM" } ] When parsing critique results, return a dictionary representing a MetricResult.
+ * Example for a metric result: { "score": 0.8, "explanation": "The model followed most
+ * instructions.", "rubric_verdicts": [...] } ... code for result extraction and aggregation
+ */
+ @JsonProperty("parsingFunction")
+ public abstract Builder parsingFunction(String parsingFunction);
+
+ @ExcludeFromGeneratedCoverageReport
+ abstract Builder parsingFunction(Optional parsingFunction);
+
+ /** Clears the value of parsingFunction field. */
+ @ExcludeFromGeneratedCoverageReport
+ @CanIgnoreReturnValue
+ public Builder clearParsingFunction() {
+ return parsingFunction(Optional.empty());
+ }
+
+ public abstract EvaluationParserConfigCustomCodeParserConfig build();
+ }
+
+ /** Deserializes a JSON string to a EvaluationParserConfigCustomCodeParserConfig object. */
+ @ExcludeFromGeneratedCoverageReport
+ public static EvaluationParserConfigCustomCodeParserConfig fromJson(String jsonString) {
+ return JsonSerializable.fromJsonString(
+ jsonString, EvaluationParserConfigCustomCodeParserConfig.class);
+ }
+}
diff --git a/src/main/java/com/google/genai/types/ExecutableCode.java b/src/main/java/com/google/genai/types/ExecutableCode.java
index 0f2dcd27868..f28d0506cd8 100644
--- a/src/main/java/com/google/genai/types/ExecutableCode.java
+++ b/src/main/java/com/google/genai/types/ExecutableCode.java
@@ -27,10 +27,9 @@
import java.util.Optional;
/**
- * Model-generated code executed server-side, results returned to the model.
- *
- * Only generated when using the `CodeExecution` tool, in which the code will be automatically
- * executed, and a corresponding `CodeExecutionResult` will also be generated.
+ * Code generated by the model that is meant to be executed, and the result returned to the model.
+ * Generated when using the `CodeExecution` tool, in which the code will be automatically executed,
+ * and a corresponding CodeExecutionResult will also be generated.
*/
@AutoValue
@JsonDeserialize(builder = ExecutableCode.Builder.class)
@@ -44,8 +43,8 @@ public abstract class ExecutableCode extends JsonSerializable {
public abstract Optional language();
/**
- * Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult`
- * with the matching `id`.
+ * Optional. Unique identifier of the `ExecutableCode` part. The server returns the
+ * `CodeExecutionResult` with the matching `id`. This field is not supported in Vertex AI.
*/
@JsonProperty("id")
public abstract Optional id();
@@ -127,8 +126,8 @@ public Builder language(String language) {
/**
* Setter for id.
*
- * id: Unique identifier of the `ExecutableCode` part. The server returns the
- * `CodeExecutionResult` with the matching `id`.
+ *
id: Optional. Unique identifier of the `ExecutableCode` part. The server returns the
+ * `CodeExecutionResult` with the matching `id`. This field is not supported in Vertex AI.
*/
@JsonProperty("id")
public abstract Builder id(String id);
diff --git a/src/main/java/com/google/genai/types/FileSearchStore.java b/src/main/java/com/google/genai/types/FileSearchStore.java
index 087dd25a24a..21799ee1200 100644
--- a/src/main/java/com/google/genai/types/FileSearchStore.java
+++ b/src/main/java/com/google/genai/types/FileSearchStore.java
@@ -32,38 +32,49 @@
@JsonDeserialize(builder = FileSearchStore.Builder.class)
public abstract class FileSearchStore extends JsonSerializable {
/**
- * The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123`
+ * Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID (name
+ * excluding the "fileSearchStores/" prefix) that can contain up to 40 characters that are
+ * lowercase alphanumeric or dashes (-). It is output only. The unique name will be derived from
+ * `display_name` along with a 12 character random suffix. Example:
+ * `fileSearchStores/my-awesome-file-search-store-123a456b789c` If `display_name` is not provided,
+ * the name will be randomly generated.
*/
@JsonProperty("name")
public abstract Optional name();
- /** The human-readable display name for the FileSearchStore. */
+ /**
+ * Optional. The human-readable display name for the `FileSearchStore`. The display name must be
+ * no more than 512 characters in length, including spaces. Example: "Docs on Semantic Retriever".
+ */
@JsonProperty("displayName")
public abstract Optional displayName();
- /** The Timestamp of when the FileSearchStore was created. */
+ /** Output only. The Timestamp of when the `FileSearchStore` was created. */
@JsonProperty("createTime")
public abstract Optional createTime();
- /** The Timestamp of when the FileSearchStore was last updated. */
+ /** Output only. The Timestamp of when the `FileSearchStore` was last updated. */
@JsonProperty("updateTime")
public abstract Optional updateTime();
- /** The number of documents in the FileSearchStore that are active and ready for retrieval. */
+ /**
+ * Output only. The number of documents in the `FileSearchStore` that are active and ready for
+ * retrieval.
+ */
@JsonProperty("activeDocumentsCount")
public abstract Optional activeDocumentsCount();
- /** The number of documents in the FileSearchStore that are being processed. */
+ /** Output only. The number of documents in the `FileSearchStore` that are being processed. */
@JsonProperty("pendingDocumentsCount")
public abstract Optional pendingDocumentsCount();
- /** The number of documents in the FileSearchStore that have failed processing. */
+ /** Output only. The number of documents in the `FileSearchStore` that have failed processing. */
@JsonProperty("failedDocumentsCount")
public abstract Optional failedDocumentsCount();
/**
- * The size of raw bytes ingested into the FileSearchStore. This is the total size of all the
- * documents in the FileSearchStore.
+ * Output only. The size of raw bytes ingested into the `FileSearchStore`. This is the total size
+ * of all the documents in the `FileSearchStore`.
*/
@JsonProperty("sizeBytes")
public abstract Optional sizeBytes();
@@ -93,8 +104,12 @@ private static Builder create() {
/**
* Setter for name.
*
- * name: The resource name of the FileSearchStore. Example:
- * `fileSearchStores/my-file-search-store-123`
+ *
name: Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID
+ * (name excluding the "fileSearchStores/" prefix) that can contain up to 40 characters that are
+ * lowercase alphanumeric or dashes (-). It is output only. The unique name will be derived from
+ * `display_name` along with a 12 character random suffix. Example:
+ * `fileSearchStores/my-awesome-file-search-store-123a456b789c` If `display_name` is not
+ * provided, the name will be randomly generated.
*/
@JsonProperty("name")
public abstract Builder name(String name);
@@ -112,7 +127,9 @@ public Builder clearName() {
/**
* Setter for displayName.
*
- *
displayName: The human-readable display name for the FileSearchStore.
+ *
displayName: Optional. The human-readable display name for the `FileSearchStore`. The
+ * display name must be no more than 512 characters in length, including spaces. Example: "Docs
+ * on Semantic Retriever".
*/
@JsonProperty("displayName")
public abstract Builder displayName(String displayName);
@@ -130,7 +147,7 @@ public Builder clearDisplayName() {
/**
* Setter for createTime.
*
- *
createTime: The Timestamp of when the FileSearchStore was created.
+ *
createTime: Output only. The Timestamp of when the `FileSearchStore` was created.
*/
@JsonProperty("createTime")
public abstract Builder createTime(Instant createTime);
@@ -148,7 +165,7 @@ public Builder clearCreateTime() {
/**
* Setter for updateTime.
*
- *
updateTime: The Timestamp of when the FileSearchStore was last updated.
+ *
updateTime: Output only. The Timestamp of when the `FileSearchStore` was last updated.
*/
@JsonProperty("updateTime")
public abstract Builder updateTime(Instant updateTime);
@@ -166,8 +183,8 @@ public Builder clearUpdateTime() {
/**
* Setter for activeDocumentsCount.
*
- *
activeDocumentsCount: The number of documents in the FileSearchStore that are active and
- * ready for retrieval.
+ *
activeDocumentsCount: Output only. The number of documents in the `FileSearchStore` that
+ * are active and ready for retrieval.
*/
@JsonProperty("activeDocumentsCount")
public abstract Builder activeDocumentsCount(Long activeDocumentsCount);
@@ -185,8 +202,8 @@ public Builder clearActiveDocumentsCount() {
/**
* Setter for pendingDocumentsCount.
*
- *
pendingDocumentsCount: The number of documents in the FileSearchStore that are being
- * processed.
+ *
pendingDocumentsCount: Output only. The number of documents in the `FileSearchStore` that
+ * are being processed.
*/
@JsonProperty("pendingDocumentsCount")
public abstract Builder pendingDocumentsCount(Long pendingDocumentsCount);
@@ -204,8 +221,8 @@ public Builder clearPendingDocumentsCount() {
/**
* Setter for failedDocumentsCount.
*
- *
failedDocumentsCount: The number of documents in the FileSearchStore that have failed
- * processing.
+ *
failedDocumentsCount: Output only. The number of documents in the `FileSearchStore` that
+ * have failed processing.
*/
@JsonProperty("failedDocumentsCount")
public abstract Builder failedDocumentsCount(Long failedDocumentsCount);
@@ -223,8 +240,8 @@ public Builder clearFailedDocumentsCount() {
/**
* Setter for sizeBytes.
*
- *
sizeBytes: The size of raw bytes ingested into the FileSearchStore. This is the total size
- * of all the documents in the FileSearchStore.
+ *
sizeBytes: Output only. The size of raw bytes ingested into the `FileSearchStore`. This is
+ * the total size of all the documents in the `FileSearchStore`.
*/
@JsonProperty("sizeBytes")
public abstract Builder sizeBytes(Long sizeBytes);
diff --git a/src/main/java/com/google/genai/types/FunctionCall.java b/src/main/java/com/google/genai/types/FunctionCall.java
index be59f41872e..2e763946034 100644
--- a/src/main/java/com/google/genai/types/FunctionCall.java
+++ b/src/main/java/com/google/genai/types/FunctionCall.java
@@ -44,12 +44,12 @@ public abstract class FunctionCall extends JsonSerializable {
/**
* Optional. The function parameters and values in JSON object format. See
- * [FunctionDeclaration.parameters] for parameter details.
+ * FunctionDeclaration.parameters for parameter details.
*/
@JsonProperty("args")
public abstract Optional