setDefaultBaseUrls

public static void setDefaultBaseUrls(Optional<String> geminiBaseUrl, Optional<String> vertexBaseUrl)

Overrides the base URLs for the Gemini API and/or Vertex AI API.

Note: This function should be called before initializing the SDK. If the base URLs are set after initializing the SDK, the base URLs will not be updated.

Precedence rule for base URL:

1. Base URL set via HttpOptions.

2. Base URL set via the latest call to setDefaultBaseUrls.

3. Base URL set via environment variables GOOGLE_GEMINI_BASE_URL or GOOGLE_VERTEX_BASE_URL.