Google Gemini embedder
Embeds through Google Gemini via its OpenAI-compatible endpoint. Selected via EMBEDDING_PROVIDER=gemini.
Enable it
bash
EMBEDDING_PROVIDER=gemini
GEMINI_API_KEY=...
EMBEDDING_DIMS=768Configuration
| Variable | Default | Description |
|---|---|---|
EMBEDDING_PROVIDER | openai | Set to gemini. |
GEMINI_API_KEY | none | API key for Gemini. GOOGLE_API_KEY is accepted as a fallback. Calls fail at runtime if neither is set. |
GOOGLE_API_KEY | none | Alternative key read when GEMINI_API_KEY is unset. |
EMBEDDING_DIMS | 768 | Vector dimension; must match the embedding model. |
Notes
- Talks to the OpenAI-compatible base URL
https://generativelanguage.googleapis.com/v1beta/openai. - The default model is
text-embedding-004. - Shares the OpenAI-compatible request loop: 429 and 5xx and network errors retry with backoff, other 4xx fail fast, and a final failure raises for a clean 503.