From 42ba213e88ca3edd1054acc5bc0cd6fae5f7480b Mon Sep 17 00:00:00 2001 From: William Fawcett Date: Wed, 29 Apr 2026 20:44:45 +0100 Subject: [PATCH] docs: canonicalise GEMINI_API_KEY as the documented env var The two env vars were aliases for the same key, but `.env.example` and the README listed them side-by-side as if they were different options, which suggested users had to choose one (or both). Now: - `.env.example` shows only `GEMINI_API_KEY`, with a comment that `GOOGLE_API_KEY` is also accepted (it's the SDK's own default name). - README's Gemini env-var table collapses to a single `GEMINI_API_KEY` row, with the same fallback note alongside. No code change: `genai.py:11` still reads either, so anyone whose shell already exports `GOOGLE_API_KEY` keeps working. --- .env.example | 5 +++-- README.md | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index a2f3ebf..7992677 100644 --- a/.env.example +++ b/.env.example @@ -7,9 +7,10 @@ # Gemini (pick ONE of the two paths below) # ---------------------------------------------------------------------- -# Path A — Gemini Developer API key +# Path A: Gemini Developer API key. # GEMINI_API_KEY= -# GOOGLE_API_KEY= +# (``GOOGLE_API_KEY`` is also accepted as a fallback for +# compatibility with Google's official SDK convention.) # Path B — Vertex AI project (requires ``gcloud auth # application-default login`` to have been run) diff --git a/README.md b/README.md index 5321bc8..8f78f15 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,10 @@ Either set an API key: | Variable | Required | Purpose | | --- | --- | --- | -| `GEMINI_API_KEY` or `GOOGLE_API_KEY` | yes (one of the two) | Gemini API key | +| `GEMINI_API_KEY` | yes | Gemini API key | + +`GOOGLE_API_KEY` is also accepted as a fallback for compatibility +with Google's official SDK convention. …or use a Vertex AI project (after running `gcloud auth application-default login`):