Deprecate GOOGLE_APPLICATION_CREDENTIALS in favor of GOOGLE_API_KEY#232
Conversation
GOOGLE_APPLICATION_CREDENTIALS is not referenced in any Python code — the backend and evaluation modules already use GOOGLE_API_KEY exclusively. Remove stale references from env templates, CI workflow, docs, and the seed-credentials Makefile target. Also removes unused GOOGLE_PROJECT_ID and GOOGLE_CLOUD_LOCATION. Signed-off-by: Harsh Kumar Patwa <harshkumarpatwa@gmail.com> Signed-off-by: Harsh Kumar <harshkumar3446@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR removes stale references to GOOGLE_APPLICATION_CREDENTIALS (and related GCP env vars) across backend + evaluation tooling/docs, aligning the repo on GOOGLE_API_KEY as the single credential used for Gemini access.
Changes:
- Remove
GOOGLE_APPLICATION_CREDENTIALS,GOOGLE_PROJECT_ID, andGOOGLE_CLOUD_LOCATIONfrom env templates and CI environment-population steps. - Update evaluation “script based evaluation” sample env + README to reference
GOOGLE_API_KEYinstead of a JSON credentials path. - Remove the
seed-credentialsMakefile target and the CI step that copiedsecret.jsoninto project folders.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| evaluation/script_based_evaluation/README.md | Switches credential docs to GOOGLE_API_KEY (but still has stale references elsewhere; see comments). |
| evaluation/script_based_evaluation/.env.sample | Replaces GOOGLE_APPLICATION_CREDENTIALS placeholder with GOOGLE_API_KEY. |
| backend/README.md | Removes service-account JSON setup; documents only GOOGLE_API_KEY for Gemini. |
| backend/.env.example | Drops unused Google project/location/credentials-path env vars. |
| Makefile | Removes GOOGLE_SECRET_JSON and seed-credentials target. |
| .github/workflows/ci-secret.yaml | Removes sed replacements and credential-copy step tied to the deleted env vars/target. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Create a `.env` file in the root directory with the following variables: | ||
| ```plaintext | ||
| GOOGLE_APPLICATION_CREDENTIALS=path/to/secret.json | ||
| GOOGLE_API_KEY=your_google_api_key | ||
| OPENAI_API_KEY=your_openai_api_key # Required if testing against OpenAI models | ||
| ``` |
There was a problem hiding this comment.
The README still contains stale credential/CLI guidance that conflicts with switching to GOOGLE_API_KEY only: it mentions “Google Vertex AI” in the intro and later example commands/flags reference secret.json / --creds-path, but script_based_evaluation/main.py doesn’t accept those args and the models use GOOGLE_API_KEY directly. Please update/remove those sections so the setup instructions are consistent throughout this README.
| ```plaintext | ||
| GOOGLE_APPLICATION_CREDENTIALS=path/to/secret.json | ||
| GOOGLE_API_KEY=your_google_api_key | ||
| OPENAI_API_KEY=your_openai_api_key # Required if testing against OpenAI models |
There was a problem hiding this comment.
OPENAI_API_KEY is documented here as only required when testing OpenAI models, but script_based_evaluation/main.py currently exits if OPENAI_API_KEY is missing even when you might only want to run Gemini-based evaluators. Either update the README to reflect that OPENAI_API_KEY is always required, or adjust the script so OpenAI is only initialized/required when OpenAI models are selected.
| OPENAI_API_KEY=your_openai_api_key # Required if testing against OpenAI models | |
| OPENAI_API_KEY=your_openai_api_key # Required by the evaluation scripts |
| ### Setting Up Google API Key | ||
|
|
||
| - `GOOGLE_API_KEY` | ||
|
|
||
| This key is used to access the various google cloud functions. | ||
| This key is used to access the Google Gemini API. |
There was a problem hiding this comment.
The linked issue (#155) text says “Deprecate GOOGLE_APPLICATION_CREDENTIALS in favor of GEMINI_API_KEY”, but this PR standardizes on GOOGLE_API_KEY (and the codebase appears to use GOOGLE_API_KEY only). To avoid confusion for contributors, consider updating the docs/issue reference to use the same env var name consistently (either GOOGLE_API_KEY everywhere or rename in code/docs if GEMINI_API_KEY is the intended target).
Remove references to --creds-path flag and secret.json that no longer exist in the evaluation scripts. Signed-off-by: Harsh Kumar Patwa <harshkumarpatwa@gmail.com> Signed-off-by: Harsh Kumar <harshkumar3446@gmail.com>
Fixes #155
Summary
GOOGLE_APPLICATION_CREDENTIALSis not referenced in any backend or evaluation Python code — everything already usesGOOGLE_API_KEY.env.example, CI workflow, docs, and theseed-credentialsMakefile targetGOOGLE_PROJECT_IDandGOOGLE_CLOUD_LOCATIONenv varsChanges
backend/.env.example— removedGOOGLE_APPLICATION_CREDENTIALS,GOOGLE_PROJECT_ID,GOOGLE_CLOUD_LOCATIONevaluation/script_based_evaluation/.env.sample— replacedGOOGLE_APPLICATION_CREDENTIALSwithGOOGLE_API_KEYevaluation/script_based_evaluation/README.md— updated credentials docsbackend/README.md— removedGOOGLE_APPLICATION_CREDENTIALSsetup section.github/workflows/ci-secret.yaml— removed stale sed replacements andseed-credentialsstepMakefile— removedseed-credentialstarget andGOOGLE_SECRET_JSONvariableNote
GOOGLE_CREDENTIALS_JSON(used by human evaluation for Google Forms/Sheets) is a separate credential and is intentionally left untouched.