Skip to content

Gemini

Gemini 2.5 Pro and Flash give you large-context reasoning and strong vision — useful for analyzing long files, images, and PDFs.

  • A Google API key from Google AI Studio.
  • Gemini API access enabled on your Google Cloud or AI Studio project.
ModelGood forContext
Gemini 2.5 ProLong-context analysis, multi-file understanding, reasoning.2M tokens
Gemini 2.5 FlashFast chat, cheap completions, drafts.1M tokens
Gemini 2.5 Flash-LiteHigh-volume, low-cost classification.1M tokens
  1. Open Settings → Providers → Gemini.
  2. Paste your Google API key. It’s stored in encrypted safeStorage.
  3. Optionally pick a default model.

The Gemini CLI (if installed) is detected automatically and becomes available as a sub-agent target. Gemini has the second-highest priority in CLI detection, after ptah-cli.

Non-secret agent-orchestration settings live in ~/.ptah/settings.json:

{
"agentOrchestration.disabledClis": []
}

Add "gemini" to the array to prevent Gemini from being used as a sub-agent.

  1. Open the chat.
  2. Select a Gemini 2.5 model.
  3. Attach a large file (@ a file bigger than 100KB) and ask for a summary.
  4. You should see a streaming response and, in the cost bar, input tokens well above 25k.
  • API_KEY_INVALID — regenerate the key in AI Studio.
  • PERMISSION_DENIED — enable the Generative Language API in the Google Cloud project tied to your key.
  • RESOURCE_EXHAUSTED — free-tier quota hit. Upgrade to a paid AI Studio plan.
  • Gemini CLI not detected — install the Gemini CLI, ensure it’s on your PATH, and restart Ptah.