Gemini
Gemini (Google)
Section titled “Gemini (Google)”Gemini 2.5 Pro and Flash give you large-context reasoning and strong vision — useful for analyzing long files, images, and PDFs.
What you need
Section titled “What you need”- A Google API key from Google AI Studio.
- Gemini API access enabled on your Google Cloud or AI Studio project.
Available models
Section titled “Available models”| Model | Good for | Context |
|---|---|---|
| Gemini 2.5 Pro | Long-context analysis, multi-file understanding, reasoning. | 2M tokens |
| Gemini 2.5 Flash | Fast chat, cheap completions, drafts. | 1M tokens |
| Gemini 2.5 Flash-Lite | High-volume, low-cost classification. | 1M tokens |
Configuration
Section titled “Configuration”- Open Settings → Providers → Gemini.
- Paste your Google API key. It’s stored in encrypted
safeStorage. - 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.
Verifying it works
Section titled “Verifying it works”- Open the chat.
- Select a Gemini 2.5 model.
- Attach a large file (
@a file bigger than 100KB) and ask for a summary. - You should see a streaming response and, in the cost bar, input tokens well above 25k.
Troubleshooting
Section titled “Troubleshooting”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.