llama-index-llms-google-genai
llama-index llms google genai integration
Decision gist · record as of 2026-08-14
Yes, if you are building with LlamaIndex and want to use Gemini as your LLM backend. Install friction is low, the license is permissive, maintenance is active, and no vulnerabilities are known. The main prerequisite is a valid Google API key and familiarity with LlamaIndex's LLM abstraction layer.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires GOOGLE_API_KEY environment variable set with a valid Google API key.
- Low friction install with a pure Python wheel and three straightforward runtime dependencies.
- Active maintenance status with recent releases.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most production and proprietary projects.
last release 2026-07-08 (37 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 189,310 downloads/mo, #9,931 on PyPI
Alternatives
Verify before relying
pip install llama-index-llms-google-genai
from llama_index.llms.google_genai import GoogleGenAI
llm = GoogleGenAI(model="gemini-3-flash-preview")
resp = llm.complete("Write a poem about a magic backpack")
print(resp)- Whether all Gemini model variants are supported or only specific versions like gemini-3-flash-preview.
- Rate limits or quota constraints imposed by Google GenAI API on requests.
- Whether image handling via Pillow is for input preprocessing, output rendering, or both.
What it is and what it does
This package bridges Google's Gemini language models into the LlamaIndex framework, letting you use Gemini as a drop-in LLM backend for RAG pipelines and AI applications. It wraps the google-genai client library and exposes standard LlamaIndex LLM methods: complete() for simple text generation, chat() for multi-turn conversations, and stream_complete()/stream_chat() for real-time token streaming. The package handles API authentication via environment variable and supports both synchronous and asynchronous execution patterns.
The integration depends on llama-index-core for the base LLM interface contract, google-genai for the underlying API client, and Pillow for image handling. It targets Python 3.10 and above and is actively maintained. No known security vulnerabilities are recorded. The package is positioned as a thin adapter layer rather than a feature-rich wrapper, so you interact with Gemini's capabilities as exposed by the google-genai library.
Use it for
- Build RAG applications that retrieve documents and send them to Gemini for synthesis via LlamaIndex's standard LLM interface.
- Implement multi-turn chatbots with conversation history using the chat() method and ChatMessage objects.
- Stream long-form content generation (stories, documentation) to users in real-time without waiting for full completion.
- Prototype AI features quickly by swapping Gemini in place of other LLM backends in existing LlamaIndex code.
- Run async LLM calls in concurrent applications using acomplete() and astream_complete() methods.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building with LlamaIndex and want to use Gemini as your LLM backend.
Install friction is low, the license is permissive, maintenance is active, and no vulnerabilities are known. The main prerequisite is a valid Google API key and familiarity with LlamaIndex's LLM abstraction layer.
Install
llama-index-llms-google-genai on PyPI
Before you install
Low friction install with a pure Python wheel and three straightforward runtime dependencies. Active maintenance status with recent releases.
Requires GOOGLE_API_KEY environment variable set with a valid Google API key.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most production and proprietary projects.
Quickstart
pip install llama-index-llms-google-genai
from llama_index.llms.google_genai import GoogleGenAI
llm = GoogleGenAI(model="gemini-3-flash-preview")
resp = llm.complete("Write a poem about a magic backpack")
print(resp)
Verify before relying
- Whether all Gemini model variants are supported or only specific versions like gemini-3-flash-preview.
- Rate limits or quota constraints imposed by Google GenAI API on requests.
- Whether image handling via Pillow is for input preprocessing, output rendering, or both.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesgoogle-genaillama-index-corepillow |
| Maintenance | Actively maintained 37 days since the last release |
| First released | |
| Downloads | 189,310 / month, #9,931 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: llama_index_llms_google_genai-0.9.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “llm wrapper google genai”
- llama-index-llms-google-genaiIntegrates Google's Gemini models into LlamaIndex applications,…
- opentelemetry-instrumentation-google-genaiAdds OpenTelemetry instrumentation to the Google GenAI SDK,…
- openinference-instrumentation-google-genaiAutomatically instruments Google GenAI SDK calls to emit…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also llama-index-llms-openai · llama-index-llms-gemini · llama-index-llms-ollama · llama-index-llms-vertex · llama-index-llms-litellm · llama-index-llms-azure-openai · llama-index-embeddings-google-genai · llama-index-llms-langchain · llama-index-llms-ibm · llama-index-llms-bedrock