Google Gemini
Google Gemini
Google’s Gemini family. Particularly strong on grounded reasoning and long context.
Setting the key
Gemini is one of the backends for Lettuce’s LLM-powered features (enhance, the answer RAG tool, the semantic lint advisor). It does not provide embeddings — semantic_search and embedding-based retrieval require a separate OpenAI-compatible embeddings endpoint. Select Gemini and store its key either in the GUI under Settings → AI providers, or via environment variables for the CLI.
Get an AI Studio key (AIza...) from Google AI Studio, then either paste it into Settings → AI providers (it is stored in the macOS Keychain), or export it for the CLI:
export LETTUCE_LLM_PROVIDER=gemini
export GEMINI_API_KEY=AIza... # or GOOGLE_API_KEY
Lettuce talks to the public Generative Language API (generativelanguage.googleapis.com) and sends the key in the x-goog-api-key header.
Models
The default model is gemini-3.6-flash. Override it in Settings → AI providers, or with an environment variable:
export LETTUCE_ENHANCE_MODEL=gemini-3.8-flash
| Model | Notes |
|---|---|
gemini-3.6-flash |
default: fast, cheap |
gemini-3.8-flash |
newest Flash, strongest |
gemini-3.5-flash-lite |
cheapest |
Google shut down gemini-2.0-flash on 1 June 2026 and shuts down gemini-2.5-pro and gemini-2.5-flash on 1 December 2026. A saved one of those is read as its replacement (gemini-3.6-flash, gemini-3.8-flash and gemini-3.5-flash-lite respectively).
Structured output
Lettuce’s enhancement features ask the model for structured JSON. The GeminiClient maps each tool’s JSON Schema into Gemini’s responseSchema subset (uppercase type, no additionalProperties) and requests responseMimeType: application/json, so you get clean structured results back without any extra configuration.
Differences
Gemini’s responses are sometimes less structured than Claude’s; the enforced
responseSchemakeeps them in line.Long context is useful for whole-folder enhancement passes in a single shot.
Cost
Pay-per-token, billed via Google Cloud / AI Studio. Lettuce does not track or display Gemini usage; check your spend in the Google Cloud / AI Studio console.