Google Gemini
Use Gemini 2.5 Flash, Gemini 3 Pro, and other Google models with cagent.
Setup
# Set your API key
export GOOGLE_API_KEY="AI..."
Configuration
Inline
agents:
root:
model: google/gemini-2.5-flash
Named Model
models:
gemini:
provider: google
model: gemini-2.5-flash
temperature: 0.5
Available Models
| Model | Best For |
|---|---|
gemini-3-pro |
Most capable Gemini model |
gemini-3-flash |
Fast, efficient, good balance |
gemini-2.5-flash |
Fast inference, cost-effective |
gemini-2.5-pro |
Strong reasoning, large context |
Thinking Budget
Gemini supports two approaches depending on the model version:
⚠️ Different thinking formats
Gemini 2.5 uses **token-based** budgets (integers). Gemini 3 uses **level-based** budgets (strings like low, high). Make sure you use the right format for your model version.
Gemini 2.5 (Token-based)
models:
gemini-no-thinking:
provider: google
model: gemini-2.5-flash
thinking_budget: 0 # disable thinking
gemini-dynamic:
provider: google
model: gemini-2.5-flash
thinking_budget: -1 # dynamic (model decides) — default
gemini-fixed:
provider: google
model: gemini-2.5-flash
thinking_budget: 8192 # fixed token budget
Gemini 3 (Level-based)
models:
gemini-3-pro:
provider: google
model: gemini-3-pro
thinking_budget: high # default for Pro: low | high
gemini-3-flash:
provider: google
model: gemini-3-flash
thinking_budget: medium # default for Flash: minimal | low | medium | high