Agent interface as every other provider. Gemini’s massive context windows (up to 2M tokens) and strong multimodal support make it a natural fit for long-document analysis, video understanding, and image-heavy workflows.
Installation
Environment Setup
.env file:
Quick Start
The minimum needed to run a Gemini agent:Model Names
Gemini models are prefixed withgemini/ for LiteLLM routing:
| Model | model_name | Best for |
|---|---|---|
| Gemini 2.5 Pro | "gemini/gemini-2.5-pro" | Frontier reasoning, long-document analysis, 2M context |
| Gemini 2.5 Flash | "gemini/gemini-2.5-flash" | Balanced speed + quality, default for production |
| Gemini 2.5 Flash-Lite | "gemini/gemini-2.5-flash-lite" | High-volume triage, lowest cost |
| Gemini 2.0 Flash | "gemini/gemini-2.0-flash" | Legacy production workloads |