Skip to content

Conversation

@daavoo
Copy link
Contributor

@daavoo daavoo commented Sep 8, 2025

In #401 we stopped overriding Provider.__init__ and thus we started to rely again on the default Provider._verify_and_set_api_key.

We need to provide a custom implementation that checks for both API key options instead of the plain string with a /.

  • Added test_gemini_initialization_with_env_var_api_key and test_vertexai_initialization_with_env_var_api_key.

In #401 we stopped overriding `Provider.__init__` and thus we started to rely again on the default `Provider._verify_and_set_api_key`.

We need to provide a custom implementation that checks for both API key options instead of the plain string with a `/`.

- Added `test_gemini_initialization_with_env_var_api_key` and `test_vertexai_initialization_with_env_var_api_key`.
@daavoo daavoo linked an issue Sep 8, 2025 that may be closed by this pull request
@daavoo daavoo requested a review from njbrake September 8, 2025 09:17
@daavoo daavoo self-assigned this Sep 8, 2025
@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/any_llm/providers/gemini/gemini.py 100.00% <100.00%> (+20.00%) ⬆️

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

njbrake
njbrake previously approved these changes Sep 8, 2025
Copy link
Contributor

@njbrake njbrake left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix 🙏

@daavoo
Copy link
Contributor Author

daavoo commented Sep 8, 2025

@daavoo daavoo merged commit 7696995 into main Sep 8, 2025
10 checks passed
@daavoo daavoo deleted the 404-bug-gemini-not-working branch September 8, 2025 09:23
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.

[BUG] Gemini not working

3 participants