Gemini
Creates a Gemini instance using a Google AI API key for authentication.
Parameters
name
The name of the specific Gemini model to use (e.g., "gemini-3.1-flash-lite-preview").
apiKey
The Google AI API key. If not provided, falls back to GOOGLE_API_KEY or GEMINI_API_KEY environment variables on GenAI SDK level.
Creates a Gemini instance using Vertex AI credentials for authentication.
Parameters
name
The name of the specific Gemini model to use (e.g., "gemini-3.1-flash-lite-preview").
vertexCredentials
The Vertex AI credentials to use.
constructor(client: <Error class: unknown class>, name: String, models: Gemini.GeminiModels = RealGeminiModels(client.models))
Parameters
client
The Client instance from the GenAI SDK used for making API calls.
name
The name of the specific Gemini model to use (e.g., "gemini-3.1-flash-lite-preview").