Skip to main content
The Google provider gives you access to Gemini models, Google’s multimodal AI models with strong performance across various tasks.

Setup

Set your API key as an environment variable:

Usage

Available Models

Provider Options

Customize Google-specific parameters:

Available Options

Thinking Config (Reasoning Models)

For normalized reasoning-depth control, use reasoning={"budget": ...}:
For provider-specific Gemini thinking options, use raw provider_options:
If you want Gemini thought text to arrive as reasoning events during streaming, include_thoughts must be enabled. See Thinking for the streaming callback model.

Safety Settings

Configure content safety thresholds. You can use either dict or list format:
Available thresholds: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE

Tool Calling

Gemini models support tool calling:

Streaming