Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
GoogleLLM
Gemini chat models from Google, called with your own Google API key or through Vertex AI. A good fit for fast, low-cost conversational agents with tool calling and optional thinking. Authenticates with GOOGLE_API_KEY or GOOGLE_APPLICATION_CREDENTIALS from your environment, or an explicitapi_key.
Fields
Gemini model name, e.g. “gemini-3.5-flash-lite” or “gemini-2.5-flash”. Defaults to ‘gemini-3.5-flash-lite’.
Sampling randomness, 0.0 to 2.0; higher is more varied. Ignored by Gemini 3.5 and newer models. Defaults to 0.7.
Whether the model may call tools: “auto” lets it decide, “required” forces a tool call, “none” disables tools. Defaults to ‘auto’.
Maximum number of tokens the model may generate in one response. Defaults to 8192.
Nucleus sampling: only tokens within this cumulative probability, 0.0 to 1.0, are considered. Ignored by Gemini 3.5 and newer models. Defaults to None (not set).
Only the K most likely tokens are considered at each step. Ignored by Gemini 3.5 and newer models. Defaults to None (not set).
Penalizes tokens that have already appeared, nudging the model toward new topics. Positive values reduce repetition. Defaults to None (not set).
Penalizes tokens in proportion to how often they have appeared. Positive values reduce repeated wording. Defaults to None (not set).
Set to True to call Gemini through Google Cloud Vertex AI instead of the public Gemini API. Defaults to False.
Vertex AI settings such as {“project”: “my-project”, “location”: “us-central1”}. Only used when vertexai is True. Defaults to None (not set).
Token budget for internal reasoning on Gemini 2.5 models; 0 turns thinking off. Set to None to omit the thinking setting entirely. Defaults to 0.
Random seed for more repeatable outputs across identical requests. Defaults to None (not set).
List of Gemini safety settings (category and threshold) controlling which content is blocked. Defaults to None (not set).
Low-level HTTP options for the Google client, such as timeout, API version or base URL. Defaults to None (not set).
Reasoning effort for Gemini 3 and newer models: “minimal”, “low”, “medium” or “high”. “minimal” acts as “low” on Gemini 3.7+. Defaults to None (not set).