Skip to content

Python: Build(deps-dev): update google-genai requirement from <2.30,>=1.51 to >=1.51,<3.1 in /python - #14769

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/python/google-genai-gte-1.51-and-lt-3.1
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/python/google-genai-gte-1.51-and-lt-3.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 9, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on google-genai to permit the latest version.

Release notes

Sourced from google-genai's releases.

v3.0.0

3.0.0 (2026-11-05)

⚠ BREAKING CHANGES

  • Default Gemini Developer API version is now v1 (was v1beta) (2d0f947)

    • Clients targeting the Gemini Developer API now default to API version v1 instead of v1beta.
    • No effect on Gemini Enterprise (Vertex AI) defaults: Clients with vertexai=True / enterprise=True are unaffected by this default change and continue to default to v1beta1.
    • Some model aliases are not available on v1, notably: gemini-flash-latest, gemini-flash-lite-latest and gemini-pro-latest. They exist only on v1beta. To keep using them, use a specific model version, or switch back to v1beta as shown below.
    • How to configure or restore the previous default via environment variable: Set GOOGLE_GENAI_API_VERSION (works for both Gemini Developer API and Enterprise / Vertex AI clients when no version is set in code):
      # Restores the beta default ('v1beta' on Gemini Developer API, 'v1beta1' on Enterprise / Vertex AI)
      export GOOGLE_GENAI_API_VERSION=beta
      Or set an explicit API version string on either platform (e.g. 'v1', 'v1beta', 'v1beta1')
      export GOOGLE_GENAI_API_VERSION=v1beta

    • How to set the API version in code: Pass api_version in HttpOptions (takes precedence over GOOGLE_GENAI_API_VERSION):
      from google import genai
      from google.genai import types
      client = genai.Client(
      http_options=types.HttpOptions(api_version='v1beta')
      )

  • Default HTTP client is now httpx2 (was httpx), and httpx is no longer installed by default (51285c8)

    • httpx is no longer installed by default. httpx2 is now the required dependency and default HTTP client.
    • How to restore the previous httpx default via environment variable: Because httpx2 is installed by default, installing google-genai[httpx] alone only makes import httpx available; to switch the SDK's default client back to httpx without code changes, both install the httpx extra and set GOOGLE_GENAI_HTTP_CLIENT=httpx:
      pip install "google-genai[httpx]"
      export GOOGLE_GENAI_HTTP_CLIENT=httpx
    • How to pass an httpx client in code: After installing google-genai[httpx], you can pass httpx.Client / httpx.AsyncClient directly via HttpOptions:
      import httpx
      from google import genai
      from google.genai import types
      client = genai.Client(
      http_options=types.HttpOptions(
      httpx_client=httpx.Client(),
      httpx_async_client=httpx.AsyncClient(),
      )
      )

    • Migrating existing httpx code to httpx2: In most cases, updating your imports with import httpx2 as httpx is sufficient.
    • SSL certificate verification: By default, httpx2 uses the OS certificate trust store (via truststore / httpx2.create_ssl_context()) instead of certifi when SSL_CERT_FILE and SSL_CERT_DIR are not set.
    • When httpx vs. httpx2 types matter: Package-specific objects passed in HttpOptions(client_args=..., async_client_args=...) (such as Timeout, Limits, MockTransport / BaseTransport, or custom Auth subclasses) and unwrapped transport exceptions caught from client.models, client.files, etc. (TimeoutException, ConnectError, HTTPError) must match the active HTTP client. (When GOOGLE_GENAI_HTTP_CLIENT is unset or auto, passing httpx objects in HttpOptions will also auto-select the httpx backend if google-genai[httpx] is installed.)

... (truncated)

Changelog

Sourced from google-genai's changelog.

3.0.0 (2026-11-06)

⚠ BREAKING CHANGES

  • Default Gemini Developer API version is now v1 (was v1beta) (2d0f947)

    • Clients targeting the Gemini Developer API now default to API version v1 instead of v1beta.
    • No effect on Gemini Enterprise (Vertex AI) defaults: Clients with vertexai=True / enterprise=True are unaffected by this default change and continue to default to v1beta1.
    • How to configure or restore the previous default via environment variable: Set GOOGLE_GENAI_API_VERSION (works for both Gemini Developer API and Enterprise / Vertex AI clients when no version is set in code):
      # Restores the beta default ('v1beta' on Gemini Developer API, 'v1beta1' on Enterprise / Vertex AI)
      export GOOGLE_GENAI_API_VERSION=beta
      Or set an explicit API version string on either platform (e.g. 'v1', 'v1beta', 'v1beta1')
      export GOOGLE_GENAI_API_VERSION=v1beta

    • How to set the API version in code: Pass api_version in HttpOptions (takes precedence over GOOGLE_GENAI_API_VERSION):
      from google import genai
      from google.genai import types
      client = genai.Client(
      http_options=types.HttpOptions(api_version='v1beta')
      )

  • Default HTTP client is now httpx2 (was httpx), and httpx is no longer installed by default (51285c8)

    • httpx is no longer installed by default. httpx2 is now the required dependency and default HTTP client.
    • How to restore the previous httpx default via environment variable: Because httpx2 is installed by default, installing google-genai[httpx] alone only makes import httpx available; to switch the SDK's default client back to httpx without code changes, both install the httpx extra and set GOOGLE_GENAI_HTTP_CLIENT=httpx:
      pip install "google-genai[httpx]"
      export GOOGLE_GENAI_HTTP_CLIENT=httpx
    • How to pass an httpx client in code: After installing google-genai[httpx], you can pass httpx.Client / httpx.AsyncClient directly via HttpOptions:
      import httpx
      from google import genai
      from google.genai import types
      client = genai.Client(
      http_options=types.HttpOptions(
      httpx_client=httpx.Client(),
      httpx_async_client=httpx.AsyncClient(),
      )
      )

    • Migrating existing httpx code to httpx2: In most cases, updating your imports with import httpx2 as httpx is sufficient.
    • SSL certificate verification: By default, httpx2 uses the OS certificate trust store (via truststore / httpx2.create_ssl_context()) instead of certifi when SSL_CERT_FILE and SSL_CERT_DIR are not set.
    • When httpx vs. httpx2 types matter: Package-specific objects passed in HttpOptions(client_args=..., async_client_args=...) (such as Timeout, Limits, MockTransport / BaseTransport, or custom Auth subclasses) and unwrapped transport exceptions caught from client.models, client.files, etc. (TimeoutException, ConnectError, HTTPError) must match the active HTTP client. (When GOOGLE_GENAI_HTTP_CLIENT is unset or auto, passing httpx objects in HttpOptions will also auto-select the httpx backend if google-genai[httpx] is installed.)

... (truncated)

Commits
  • afb10e8 chore(main): release 3.0.0 (#3249)
  • 077c579 chore: switch example model from gemini-flash-latest to gemini-3.8-flash
  • 0e34831 docs: update remaining documentation links from ai.google.dev to aistudio.goo...
  • 4b7a3fb chore: update Speakeasy OpenAPI generator to v2.959.1
  • 5e0a7f7 build: split the local-tokenizer extra so SentencePiece models skip PyTorch
  • 6eb8523 feat: Add MALFORMED_RESPONSE to FinishReason
  • 0f688a6 fix(interactions): retries = attempts - 1
  • a216d95 feat(interactions)!: support multimodal content in CodeExecutionResultStep.re...
  • 5647e1e feat: update discovery doc
  • e66b909 chore: update Speakeasy OpenAPI generator to v2.959.0
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [google-genai](https://github.com/googleapis/python-genai) to permit the latest version.
- [Release notes](https://github.com/googleapis/python-genai/releases)
- [Changelog](https://github.com/googleapis/python-genai/blob/main/CHANGELOG.md)
- [Commits](googleapis/python-genai@v1.51.0...v3.0.0)

---
updated-dependencies:
- dependency-name: google-genai
  dependency-version: 3.0.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot requested a review from a team as a code owner November 9, 2026 22:13
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file. Used by Dependabot. python Pull requests for the Python Semantic Kernel labels Nov 9, 2026
Copilot AI balanced review requested due to automatic review settings November 9, 2026 22:13
@dependabot
dependabot Bot deployed to github-app-auth November 9, 2026 22:13 Active
@github-actions github-actions Bot changed the title Build(deps-dev): update google-genai requirement from <2.30,>=1.51 to >=1.51,<3.1 in /python Python: Build(deps-dev): update google-genai requirement from <2.30,>=1.51 to >=1.51,<3.1 in /python Nov 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Allowing SDK 3.x without preserving v1beta for non-Vertex clients breaks existing Google AI configurations using aliases such as gemini-flash-latest, so the dependency must remain below 3 until those paths explicitly preserve v1beta, including with telemetry disabled.

1 open issue
What changed in this PR

This PR widens the Google GenAI dependency range for Semantic Kernel’s optional Python Google integration, permitting SDK 3.0.

Changes:

  • Raises the google-genai upper bound from <2.30 to <3.1, retaining the >=1.51 minimum.
  • Leaves connector implementation code unchanged.
File Description
python/​pyproject.toml Expands the allowed google-genai versions in the google optional dependencies.

Review effort: Balanced

Comment thread python/pyproject.toml
google = [
"google-cloud-aiplatform>=1.114,<1.134",
"google-genai >= 1.51,< 2.30"
"google-genai >= 1.51,< 3.1"

This branch was successfully deployed

1 active deployment
github-app-auth — d745c198 Deployed Nov 9, 2026 by dependabot[bot] via add_label #29651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file. Used by Dependabot. python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant