Skip to content

chore(deps): update dependency google-genai to v3 - #14765

Open
renovate-bot wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
renovate-bot:renovate/google-genai-3.x
Open

renovate-bot wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
renovate-bot:renovate/google-genai-3.x

Conversation

@renovate-bot

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
google-genai ==2.29.0 → ==3.0.0 age confidence
google-genai ==1.7.0 → ==3.0.0 age confidence
google-genai ==1.43.0 → ==3.0.0 age confidence
google-genai ==1.47.0 → ==3.0.0 age confidence
google-genai ==2.16.0 → ==3.0.0 age confidence
google-genai ==2.12.1 → ==3.0.0 age confidence
google-genai ==1.60.0 → ==3.0.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

googleapis/python-genai (google-genai)

v3.0.0

Compare Source

⚠ 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.)
Features
  • Add source_text to AudioTranscriptionConfig and SmartTranscriptionMode. (1ac3c91)
  • Add MALFORMED_RESPONSE to FinishReason (6eb8523), refs #​2937
  • cli: Use gemini-3.5-transcribe as default model for transcribe command (b18fd3c)
  • Default Gemini API version to v1 instead of v1beta across SDKs (2d0f947)
  • Disable GenerateVideos for Gemini API, update tests/READMEs (8ddc655)
  • interactions: Add Office and OpenDocument MIME types (753cc1c)
  • interactions: Support multimodal content in CodeExecutionResultStep.result (a216d95)
  • Support GOOGLE_GENAI_API_VERSION environment variable across SDKs (2d0f947)
  • Switch default HTTP client to httpx2 and use OS trust store by default (51285c8)
  • Update discovery doc (5647e1e)
Bug Fixes
  • interactions: Retries = attempts - 1 (0f688a6)
  • Preserve unknown fields and open-union variants in Interactions models (2eaf2d8)
  • Respect configured and default API version for Gemini API file uploads across SDKs (ddc45d0)
Documentation
  • Update embedding examples from gemini-embedding-2-preview to gemini-embedding-2 (d97752a)
  • Update remaining documentation links from ai.google.dev to aistudio.google.com. (0e34831)

v2.34.0

Compare Source

Features
  • Add support for continuation_token and requires_continuation status (daac53e)
  • Add support for Python 3.15. (cb1408b)
  • Add video upscale task parameter (0456043)
  • Drop support for Python 3.10 (2677298)
  • interactions: Add automatic_continuation to interactions.create in the Python SDK (c85d5ae)
  • interactions: Declare continuation_ids on Interaction (4bdde3a)
  • Support base_url, api_version and headers in LiveConnectConfig.http_options (c0e9c54)
  • Support video understanding in Gemini Developer API (34b58fd)
Bug Fixes
  • interactions: Align SDK User-Agent and x-goog-api-client headers (358d249)
  • Resolve PEP 563 string annotations when invoking AFC tools (4650ea1), refs #​3156
  • Stop per-request Authorization and X-Server-Timeout from leaking into client default headers (0584c96), refs #​3158

v2.33.0

Compare Source

Features
  • Add store to GenerateContentConfig (Gemini Developer API only) and labels to LiveConnectConfig. (16a29c9)
  • Add support for Python 3.15. (e1c4fc7)
  • Add support for Python 3.15. (1a64450)
  • client: Support httpx2 with GOOGLE_GENAI_HTTP_CLIENT configuration (87ddba1)
  • Include AudioContent, DocumentContent, and VideoContent in FunctionResultSubContent (adbc79c)
Bug Fixes
  • client: Skip mTLS URL rewriting for multi-regional .rep.googleapis.com endpoints and honor GOOGLE_API_USE_MTLS_ENDPOINT in Google Auth sessions (4e44c84)
  • Honor an explicit zero in HttpRetryOptions delay fields (419dd89), refs #​2026
  • Honor HttpRetryOptions for aiohttp connection errors in async requests (ee639c6), refs #​3160
Documentation
  • Update unenforced JSON Schema keywords on Interactions schema fields. (c97ae02)

v2.32.0

Compare Source

Features
  • Add base_voice to PromptedVoice in GAOS SDK (5488643)
  • Add generation_output_config to GenerateContentConfig (5c008e1)
  • Add Live API in-session context updates (send_context_update) and types across GenAI SDKs. (364889a)
  • sdks: Enable fixes.openSingleValueEnumsOct2026 across all SDKs (78f6d34)
  • Update discovery doc (6cd176e)
Bug Fixes
  • Base64-encode inline bytes in Live send_tool_response (a7bbff6), refs #​3022
  • Don't crash parsing responses with JSON objects in Any-typed fields (4c1abcc)
  • interactions: Sync InteractionSseEventInteractionStatus enum with InteractionStatus (ba854b2)
Documentation
  • Publish the API reference on each release (1d12358)
  • Transition docs workflow to GitHub Actions (3b1256a)

v2.31.0

Compare Source

Features
  • interactions: Add gemini-4-argon to Model enum (8554b07)
Bug Fixes
  • Clear continuation state and preserve prompt feedback when continuation hop returns no candidates (a0d809c)
  • Fix the function declaration parser for union types. Fixes #​3060 (be32e9e)
  • Fix the grounding metadata merging for automatic continuation in generate content and generate content stream (f1499bb)
  • Make continuation streams retry dropped hops, stop on prompt_feedback, and keep real errors in generate_content (339a929)
  • Match the mTLS endpoint to each transport's SSL context, including plain aiohttp (f8a4693)

v2.30.1

Compare Source

Bug Fixes
  • Concatenate output_text across multi-step model responses in a turn (180c345)

v2.30.0

Compare Source

Features
  • Accumulate streaming continuation usage metadata and expose initial_prompt_token_count (b27f3cd)
  • Add continuation_token to the Interactions interaction.status_update event. (02db4c5)
  • Add a CONTINUATION_REQUIRED Interaction status (bf9d6d7)
  • Add billable token counts fields (6a6501c)
  • Add startOffset/endOffset to Transcription and interimTranscriptTimestampEnabled to RealtimeInputConfig (c644a94)
  • Add usage in InteractionStatusUpdate events (56c3a1a)
  • Allow automatic resumption of continuation token for in generate content and generate content stream. Default behavior for this feature is disabled (83e43ea)
  • cli: Update Speakeasy generator to v2.948.0, bump CLI to v0.4.2, and apply CLI overlay fixes (cdcd3dd)
  • Enable automatic continuation token resumption for chats module. (9ebf714)
Bug Fixes
  • Clear intermediate CONTINUATION finish_reason in streaming continuation (8a641d8)
  • Do not record incomplete continuation stream turns in curated chat history (b382e01)
  • gemini-api-cli: Remove unsupported 2.5 and 1.6 models from Interactions model options and CLI examples (fe5fb10)
  • genai: Deduplicate Flash and Omni descriptions in ModelOption (33efaad)
  • interactions: Restore super().model_construct in Interaction model validator (ccd5dd3)
  • python: Discard stale checkpoint token on non-resumable finish reason (f44e8ee)
  • Raise default HTTP timeouts so long-running requests aren't killed client-side (b006b4b)
  • Resume streaming generation from the latest checkpoint continuation token on mid-stream errors or cutoffs (90bb32b)
  • Update EnvironmentConfig.env schema to map keys to EnvVar or string. (3108d8c)
  • Use the mTLS endpoint on the httpx and websocket transports (97d5821)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot
renovate-bot requested review from a team as code owners November 6, 2026 05:46
@trusted-contributions-gcf trusted-contributions-gcf Bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Nov 6, 2026
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: people-and-planet-ai labels Nov 6, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the google-genai dependency version to 3.0.0 across multiple requirements.txt files in various subdirectories. There are no review comments, and I have no feedback to provide.

@iennae iennae 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.

need to validate because

Google Gen AI Python SDK provides an interface for developers to integrate Google's generative models into their Python applications. It supports the [Gemini Developer API](https://ai.google.dev/gemini-api/docs) and [Gemini Enterprise Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform) APIs.

Warning

Updates to Automatic Function Calling (AFC) in upcoming SDK version: We are changing AFC behavior in the next major version. Specifically, users will not be able to invoke AFC from direct calls to Models.generate_content or its stream and async variants. Instead, users should invoke AFC from Chats modules.

from the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: people-and-planet-ai owlbot:run Add this label to trigger the Owlbot post processor. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants