Skip to content

Deprecate GOOGLE_APPLICATION_CREDENTIALS in favor of GOOGLE_API_KEY#232

Open
harsh-kumar-patwa wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
harsh-kumar-patwa:deprecate-google-application-credentials
Open

Deprecate GOOGLE_APPLICATION_CREDENTIALS in favor of GOOGLE_API_KEY#232
harsh-kumar-patwa wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
harsh-kumar-patwa:deprecate-google-application-credentials

Conversation

@harsh-kumar-patwa
Copy link

Fixes #155

Summary

  • GOOGLE_APPLICATION_CREDENTIALS is not referenced in any backend or evaluation Python code — everything already uses GOOGLE_API_KEY
  • Removed stale references from .env.example, CI workflow, docs, and the seed-credentials Makefile target
  • Also removed unused GOOGLE_PROJECT_ID and GOOGLE_CLOUD_LOCATION env vars

Changes

  • backend/.env.example — removed GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_PROJECT_ID, GOOGLE_CLOUD_LOCATION
  • evaluation/script_based_evaluation/.env.sample — replaced GOOGLE_APPLICATION_CREDENTIALS with GOOGLE_API_KEY
  • evaluation/script_based_evaluation/README.md — updated credentials docs
  • backend/README.md — removed GOOGLE_APPLICATION_CREDENTIALS setup section
  • .github/workflows/ci-secret.yaml — removed stale sed replacements and seed-credentials step
  • Makefile — removed seed-credentials target and GOOGLE_SECRET_JSON variable

Note

GOOGLE_CREDENTIALS_JSON (used by human evaluation for Google Forms/Sheets) is a separate credential and is intentionally left untouched.

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>
Copilot AI review requested due to automatic review settings March 3, 2026 12:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and GOOGLE_CLOUD_LOCATION from env templates and CI environment-population steps.
  • Update evaluation “script based evaluation” sample env + README to reference GOOGLE_API_KEY instead of a JSON credentials path.
  • Remove the seed-credentials Makefile target and the CI step that copied secret.json into 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.

Comment on lines 19 to 23
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
```
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
```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
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +21
### 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.
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate GOOGLE_APPLICATION_CREDENTIALS

2 participants