Skip to content

Google Gemini

The Gemini provider lives in crates/lime-provider-gemini/ and uses Google’s Generative Language API (streamGenerateContent over SSE).

Authentication

Terminal window
lime login --provider gemini --with-api-key

Or via environment:

Terminal window
export GEMINI_API_KEY="AIza…"
# or, as a fallback Lime also reads:
export GOOGLE_API_KEY="AIza…"

GEMINI_API_KEY takes priority when both are set.

Built-in catalog

SlugDisplayContextCapabilities
gemini-2.5-proGemini 2.5 Pro1MVision, parallel tools, dynamic thinking, param_preset: reasoning_only
gemini-2.5-flashGemini 2.5 Flash1MVision, parallel tools, dynamic thinking, param_preset: reasoning_only
gemini-2.5-flash-liteGemini 2.5 Flash-Lite1MVision, parallel tools, thinking opt-in, param_preset: reasoning_only
gemini-3.1-pro-previewGemini 3.1 Pro (preview)1MVision, parallel tools, param_preset: reasoning_only
gemini-3-flash-previewGemini 3 Flash (preview)1MVision, parallel tools, param_preset: reasoning_only
gemini-3.1-flash-lite-previewGemini 3.1 Flash-Lite (preview)1MVision, parallel tools, param_preset: reasoning_only

Aliases

Friendly aliases resolve to canonical slugs:

AliasResolves to
pro, gemini-progemini-2.5-pro
flash, gemini-flashgemini-2.5-flash
flash-lite, gemini-flash-litegemini-2.5-flash-lite
pro-3, gemini-3-pro, gemini-3.1-progemini-3.1-pro-preview
flash-3, gemini-3-flashgemini-3-flash-preview
flash-lite-3, gemini-3.1-flash-litegemini-3.1-flash-lite-preview

Any full wire id is accepted as-is, so date-stamped previews like gemini-2.5-pro-preview-03-25 work without registering a custom slug.

What’s special

  • Streaming via SSE. The provider speaks Google’s streamGenerateContent SSE format end-to-end.
  • Thinking. On Gemini 2.5+ models, the thinking_config field is populated automatically when the catalog declares thinking support. Earlier models silently ignore the field. Thinking state lives on the server; it is not round-tripped through the session log.
  • --reasoning-effort maps onto Google’s thinking budget when applicable; otherwise it is ignored.

Common usage

The provider is inferred from the model slug — pass --model and Lime routes to the Gemini provider automatically:

Terminal window
lime --model pro
lime --model gemini-2.5-flash
lime --model gemini-2.5-pro-preview-03-25

--provider gemini is only accepted inside lime login, lime logout, and lime model add — not at the top level. For a custom slug that should resolve to Gemini, register it with lime model add --provider gemini.