Skip to content

Conversation

@njbrake
Copy link
Contributor

@njbrake njbrake commented Sep 5, 2025

Description

We had the "google" provider grouping both gemini and vertex ai. This PR splits them into being separate providers

PR Type

🆕 New Feature 💅 Refactor ## Relevant issues

Checklist

  • I have added unit tests that prove my fix/feature works
  • New and existing tests pass locally
  • Documentation was updated where necessary
  • I have read and followed the contribution guidelines```

@njbrake njbrake linked an issue Sep 5, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 82.97872% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/any_llm/providers/gemini/gemini.py 80.00% 2 Missing and 1 partial ⚠️
src/any_llm/providers/vertexai/vertexai.py 82.35% 2 Missing and 1 partial ⚠️
src/any_llm/providers/gemini/base.py 75.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/any_llm/provider.py 85.71% <100.00%> (+19.56%) ⬆️
src/any_llm/providers/gemini/__init__.py 100.00% <100.00%> (ø)
src/any_llm/providers/gemini/utils.py 54.25% <100.00%> (ø)
src/any_llm/providers/vertexai/__init__.py 100.00% <100.00%> (ø)
src/any_llm/providers/gemini/base.py 71.59% <75.00%> (ø)
src/any_llm/providers/gemini/gemini.py 80.00% <80.00%> (ø)
src/any_llm/providers/vertexai/vertexai.py 82.35% <82.35%> (ø)

... and 77 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 requested a review from daavoo September 5, 2025 14:25
@njbrake
Copy link
Contributor Author

njbrake commented Sep 5, 2025

Integration tests: https://github.com/mozilla-ai/any-llm/actions/runs/17496041001

We are flying blind for VertexAI because we don't have the API keys for that yet. But we do have them for Gemini so at least that part is tested in the integration test.

This PR should also make it easier to help users debug, since then we'll know right away whether they're using vertex or gemini

@njbrake njbrake merged commit 6fe1be8 into main Sep 5, 2025
10 of 11 checks passed
@njbrake njbrake deleted the 191-split-google-provider-into-gemini-and-vertex branch September 5, 2025 14:43
daavoo added a commit that referenced this pull request 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`.
daavoo added a commit that referenced this pull request 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`.
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.

Split "google" provider into "gemini" and "vertex"

2 participants