From ae1a3502285cd6bf2ee841719d812a7b3f60bf75 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Tue, 24 Feb 2026 00:27:24 -0500 Subject: [PATCH] docs: update dotenv and Gemini image generation documentation for clarity - Revised notes on the `GEMINI_VERTEX_ENABLED` option to clarify fallback behavior when no API key is set. - Updated instructions for configuring the service account JSON file, specifying default paths and fallback mechanisms. - Enhanced descriptions of image generation and storage integration for better user understanding. --- content/docs/configuration/dotenv.mdx | 3 +-- .../docs/configuration/tools/gemini_image_gen.mdx | 14 ++++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/content/docs/configuration/dotenv.mdx b/content/docs/configuration/dotenv.mdx index 75474ec..f680c82 100644 --- a/content/docs/configuration/dotenv.mdx +++ b/content/docs/configuration/dotenv.mdx @@ -426,12 +426,11 @@ Gemini Image Generation is a tool for Agents that supports both the Gemini API a -> **Note:** When using Vertex AI (`GEMINI_VERTEX_ENABLED=true`), you must also configure `GOOGLE_SERVICE_KEY_FILE` with a service account that has the `Vertex AI User` role. No API key is required. +> **Note:** When no API key is configured, the tool automatically falls back to Vertex AI using the service account from `GOOGLE_SERVICE_KEY_FILE`. The service account must have the `Vertex AI User` role. ### OpenAI diff --git a/content/docs/configuration/tools/gemini_image_gen.mdx b/content/docs/configuration/tools/gemini_image_gen.mdx index f4b799d..577240e 100644 --- a/content/docs/configuration/tools/gemini_image_gen.mdx +++ b/content/docs/configuration/tools/gemini_image_gen.mdx @@ -23,16 +23,18 @@ GEMINI_API_KEY=your_api_key_here 1. Create a service account in Google Cloud Console with Vertex AI permissions 2. Download the service account JSON key file -3. Configure the environment variables: +3. Place the JSON file in the project (e.g., `api/data/auth.json`) or set the path: ```bash -# Path to your service account JSON file +# Path to your service account JSON file (default: api/data/auth.json) GOOGLE_SERVICE_KEY_FILE=/path/to/service-account.json # Optional: Set the location (default: global) GOOGLE_CLOUD_LOCATION=us-central1 ``` +When no `GEMINI_API_KEY` or `GOOGLE_KEY` is configured, the tool automatically falls back to Vertex AI using the service account file. + ## Configuration Options ### Model Selection @@ -62,7 +64,6 @@ GEMINI_IMAGE_MODEL=gemini-3-pro-image-preview - **Image Context Support**: Use existing images as context/inspiration for new generations - **Image Editing**: Generate new images based on modifications to existing ones - **Safety Filtering**: Built-in content safety with user-friendly error messages -- **Multi-Storage Support**: Compatible with local, S3, Azure, and Firebase storage strategies ### Parameters @@ -137,14 +138,11 @@ Gemini includes built-in safety filters. If your image is blocked: ### Storage Integration -Generated images are automatically saved using your configured file strategy: - -- **Local**: Saved to `client/public/images/{userId}/` -- **S3/Azure/Firebase**: Uploaded to your configured cloud storage +Generated images are automatically saved using your configured file strategy (local, S3, Azure, or Firebase). This is handled by the framework — the tool returns image data and the agent callback system persists it as a message attachment. ### Image Format -- Output format: PNG +- Output format defaults to PNG, configurable via the app's `imageOutputType` setting - Images include unique identifiers for reference in subsequent requests ## Rate Limits