vertexBaseUrl) {
+ Client.geminiBaseUrl = geminiBaseUrl;
+ Client.vertexBaseUrl = vertexBaseUrl;
+ }
+
+ /**
+ * Returns the base URL for the Gemini API or Vertex AI API based on the following priority.
+ *
+ * 1. Base URL set via HttpOptions.
+ *
+ *
2. Base URL set via the latest call to setDefaultBaseUrls.
+ *
+ *
3. Base URL set via environment variables.
+ */
+ static Optional inferBaseUrl(
+ boolean vertexAI,
+ Optional httpOptions,
+ Optional