Skip to content

Fix tests#102

Open
markmcd wants to merge 9 commits into
google-gemini:mainfrom
markmcd:ci-fixes
Open

Fix tests#102
markmcd wants to merge 9 commits into
google-gemini:mainfrom
markmcd:ci-fixes

Conversation

@markmcd
Copy link
Copy Markdown
Member

@markmcd markmcd commented Apr 30, 2026

Fix tests across all languages

  • Use GEMINI_API_KEY instead of GOOGLE_API_KEY everywhere (except Java, which has it mapped)
  • JDK 21 -> 24
  • Python unittest framework
  • Increase Go test timeout so it runs

Also removing the "environment" setup, it's too much overhead. Using maintainer-approval button to kick off tests instead.

There are some failing tests that should be corrected in #101.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the model ID to gemini-2.5-flash and removes the explicit environment variable check for GEMINI_API_KEY in javascript/grounding.js. Feedback indicates that removing this validation reduces the robustness of the example and could lead to inconsistent behavior or confusing error messages if the required environment variable is missing.

I am having trouble creating individual review comments. Click here to see my feedback.

javascript/grounding.js (21-23)

medium

Removing the explicit environment variable check reduces the robustness of the example and potentially contradicts the stated goal of standardizing on GEMINI_API_KEY. Without this validation, if GEMINI_API_KEY is missing, the SDK may fall back to looking for GOOGLE_API_KEY in the environment or attempt to use Application Default Credentials, leading to inconsistent behavior and confusing error messages for users. Maintaining a clear 'API key not set' error is a best practice for developer experience in example code.

@markmcd
Copy link
Copy Markdown
Member Author

markmcd commented Apr 30, 2026

Ignore the failed environmental errors in this PR, I'm shutting that down. Actual tests are tracked in: https://github.com/google-gemini/api-examples/actions/runs/25146625460 and some have genuine failures that are being fixed in #101.

…y don't fail on MAX_TOKENS"

This reverts commit 66d6d06.
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.

1 participant