1.74.0 (2026-04-29)
- [Interactions] Add FileCitation.{custom_metadata,media_id,page_number} (aed41ec)
- Add
output_infotoBatchJob(7b77ab8) - Add gemini-3.1-flash-tts-preview model to options (8bdc1c3)
- Add ImageResizeMode for GenerateVideos (317d2af)
- Add new Gemini Deep Research agent models (16fffbd)
- Add one_of support to JSONSchema for Agent Platform (8c00c52)
- Add Vertex Dataset input and output options for batch jobs (d880f92)
- interaction-api: Add grounding tool usage breakdown to Interaction Usage. (b24fb5a)
- Introduce
enterpriseto Client constructor andGOOGLE_GENAI_USE_ENTERPRISE(693fd9a) - Replace the more ambiguous rate field with sample_rate. (88d9b4a)
- Catch google-auth wrapped errors (48ac850)
- Removing Python 3.9 support due to EOL (8bc2b10)
- retry: Retry on httpx.TimeoutException with HttpRetryOptions (#2345) (0598bab)
- Streaming method doesn't handle multi-line SSE (f8a2e7e)
- Typing in
AsyncClient.__aexit__,__exit__. (a74dc65)
- Add instruction for custom endpoint (dd79904)
- Fix broken link for rate limits (d22ea99)
- Regenerate docs for 1.73.1 (2fb714b)
- Remove duplicate line in genai client docstring. (b1c6026)
- Replace Vertex AI with Gemini Enterprise Agent Platform (7c1ecd5)
- Update doc string to replace
Vertex AIwithGemini Enterprise Agent Platform, update method error message to replaceVertex AIwithGemini Enterprise Agent Platform (previously known as Vertex AI), update converter error message to replaceVertex AIwithGemini Enterprise Agent Platform(413f0f9) - Update Gemini Enterprise Agent Platform home page url (b02cb95)
- Update README.md with correct Pydantic link (fa97cc6)
- Update README.md with correct Pydantic link (fa97cc6)
1.73.1 (2026-04-14)
- Refactor Webhook types in GenAI SDKs for easier useage (3f36ca1)
- Rename
webhooks.retrievetowebhooks.get. (649f4b0)
- Update python docs for 1.73.0 (acd3767)
1.73.0 (2026-04-13)
- Add DeepResearchAgentConfig fields (ec8ca87)
- Add webhook and webhookConfig for js and python sdk (ccec350)
- Add webhook_config to batches.create() and models.generate_videos() (772d2fc)
- Wire the webhook into python and js client. (841bf22)
- Refine Pyink blank line insertion logic and fix range-based formatting regressions. (b91bda5)
1.72.0 (2026-04-09)
- Add "eu" as a supported service location for Vertex AI platform. (888a731)
- Add Live Avatar new fields (ad1777e)
- Add support for new audio MIME types: opus, alaw, and mulaw (74eb373)
- Add the delete method for the Agent Engine Task Store Service (d821082)
- Update python docs for 1.71.0 (e82f9fc)
1.71.0 (2026-04-08)
- Introduce TYPE_L16 audio content and optional fields. (07e932f)
- Remove deprecated product recontext model samples from docstrings (aca7dcf)
1.70.0 (2026-03-31)
- Support dedicated TextAnnotationDelta for streaming tool responses (5c820f2)
- Fix service_tier enums. (855e431)
1.69.0 (2026-03-27)
- Add consent_audio and voice_consent_signature and AsyncSession.setup_complete (69a02c4)
- Add custom_metadata to FileSearchResult. (aed1559)
- Add labels field to Veo configs (208a173)
- Add mime type for Audio content (674b837)
- Add model_status to GenerateContentResponse (Gemini API only) (ce86f2b)
- Add part_metadata in Part (Gemini API only) (ce86f2b)
- Add service tier for interactions. (b07002e)
- Add service tier to GenerateContent. (12b404b)
- Add support for more image and audio MIME types in Interactions content (8ec977c)
- Add supported models to the ModelOptions (1ccad7b)
- Autoenable mTLS in environment with bound token (Agent Engine with AgentAuthority) through google-auth migration (except custom client args, custom client or custom ClientSession) (a95d08a)
- genai: Add TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO to TurnCoverage (1ba8e2e)
- Support hyperparameters in distillation tuning (ad38e3a)
- Support rendered_parts in GroundingSupport (ce86f2b)
- Support us region routing (8e3e00c)
- Update python docs for 1.68. (07ae1b1)
1.68.0 (2026-03-17)
- [Interactions] Breaking change to Interactions API to refactor TextContent annotations to use specific citation types (6c3379f)
- [Interactions] Breaking change for Interactions, rename ContentDelta unions. (1b03909)
- [Interactions] Breaking change to Interactions API to rename rendered_content to search_suggestions (0e21c4e)
- [Interactions] Add and update 'signature' fields for tool call/result content types. (d896373)
- [Interactions] Support Google Maps in Interactions (68f247c)
- Support include_server_side_tool_invocations for genai. (546440c)
- deps: Correct typing-extensions constraint (1.67 Issue)[https://github.com/googleapis/python-genai/releases/tag/v1.67.0] (9a4fd39)
- Python 3.10-3.11 breakage caused by #2131 (9a4fd39)
- Treat
attempts=0asattempts=1in retry options to ensure no retries (2856c0a)
- Regenerate docs for 1.67.0 (ff7469a)
1.67.0 (2026-03-12)
- Add inference_generation_config to EvaluationConfig for Tuning (1fdb4b8)
- Add live history_config with initial_history_in_client_content (a80babd)
- Add support for referencing registered metrics by resource name in evaluation run API (41b348e)
- Enable language code for audio transcription config in Live API for Vertex AI (c04be0d)
- Forward http_options in async_request_streamed to enable retry support (8b3be87)
- Forward http_options in async_request_streamed to enable retry support (#2097) (8b10efb)
1.66.0 (2026-03-03)
- Add gemini-3.1-flash-image-preview model (dd52cc2)
- Support signature for all Interaction tool types (abb388e)
- Update data types from discovery doc. (15666c0)
1.65.0 (2026-02-26)
- Add gemini-3.1-pro-preview to list of models in Interactions (fe86870)
- Add Image Grounding support to GoogleSearch tool (0035182)
- Enable server side MCP and disable all other AFC when server side MCP is configured. (4dd7b16)
- Support more image sizes and resolutions (8b2a4e0)
- Change interactions media mime type to enum (breaking change for experimental feature) (e0f3378)
- Handle non-list response_stream in HttpResponse.json property (006042d)
- Handle non-list response_stream in HttpResponse.json property (#1903) (61aec34)
- Make aiohttp an optional dependency, bump aiohttp version upperbound, and ensure HttpOptions.async_client_args propagates to custom aiohttp.ClientSession request args for proxy etc. (b28d144), closes #2090 #2051 #1950
- Regenerate docs for 1.64.0 (a023141)
- Update README and codegen_instructions for structured outputs (4d5a978)
1.64.0 (2026-02-18)
- Add UnifiedMetric support to Vertex Tuning evaluation config (9a9908a)
- Support multimodal embedding for Gemini Embedding 2.0 and support MaaS models in Models.embed_content() (Vertex AI API) (af40cc6)
1.63.0 (2026-02-11)
- Add INCOMPLETE status to Interaction. (1a84605)
- Support encryption_spec in tuning job creation configuration for GenAI SDK (057d6f0)
- Base_url and global location parsing (2c40555)
- Remove build warning due to extra comma: assertion on a tuple is always true (1cc2c2d)
- Remove debug print statement. (60c0a2f)
- Remove unused import of
websockets(3b82b5f)
- Add docstrings to C# and Python SDK Operations methods. (f2e85a3)
- Regenerate docs for 1.62.0 (455ec26)
1.62.0 (2026-02-04)
- Update data types from discovery doc. (089ba97)
1.61.0 (2026-01-30)
- Add
include_inputquery parameter to Get Interaction endpoint. (a0240d9) - Add registerFiles for you can use gcs files with mldev. (965395b)
- Support distillation tuning (9e49d71)
- Support OSS Tuning in GenAI SDK (51748a7)
- Add metadata in batch inlined response (08c47aa)
1.60.0 (2026-01-21)
- Add ModelArmorConfig support for prompt and response sanitization via the Model Armor service (8d1091a)
- Update data types from discovery doc. (4209289)
- Update data types from discovery doc. (7db2c2d)
- Regenerate docs for 1.59.0 (351e490)
- Update docs to include interactions and file_search_stores module (a21841c)
1.59.0 (2026-01-15)
- Set the environment variable GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES to 'false' within BaseApiClient to disable bound token sharing. (79ac880)
- Support 4:5 and 5:4 aspect ratio in Interactions (1ddd9f1)
- Regenerate docs for 1.58.0 (39a8b06)
1.58.0 (2026-01-14)
- Add FileSearchCallContent to Interactions (a882dea)
- Add ImageConfig to GenerationConfig for image generation in Interactions (b61163f)
- Support passing the custom aiohttp.ClientSession through HttpOptions.aiohttp_client (750648f), closes #1662
- Voice activity support (b7b1c2e)
- Serialize Pillow images losslessly by default (8d7c74d)
- Regenerate docs for 1.57.0 (65018b6)
1.57.0 (2026-01-07)
- [Python] add RegisterFiles so gcs files can be used with genai. (68fa075)
- Add gemini-3-pro-preview support for local tokenizer (48f8256)
- Add PersonGeneration to ImageConfig for Vertex Gempix (c66e0ce)
- Remove validation for empty text parts on Chat, this will support keeping the history in chat when the API yields back such a part. (215c852)
- Regenerate docs for 1.56.0 (b4c063e)
- Update
codegen_instructions.mdfor Gemini 3 Flash (22500b5) - Update Virtual Try-On model id in samples and docstrings (5bf4d62)
1.56.0 (2025-12-16)
- Add minimal and medium thinking levels. (96d644c)
- Add support for Struct in ToolResult Content. (8fd4886)
- Add ultra high resolution to the media resolution in Parts. (356c320)
- Add ULTRA_HIGH MediaResolution and new ThinkingLevel enums (336b823)
- Define and use DocumentMimeType for DocumentContent (dc7f00f)
- Support multi speaker for Vertex AI (ecb00c2)
- Api version handling for interactions. (436ca2e)
- Add documentation for the new Interactions API (Preview). (e28a69c)
- Update and restructure codegen_instructions (00422de)
- Update docs for 1.55 (1cc43e7)
1.55.0 (2025-12-11)
- Add the Interactions API (836a3)
- Add enableEnhancedCivicAnswers feature in GenerateContentConfig (15d1ea9)
- Add IMAGE_RECITATION and IMAGE_OTHER enum values to FinishReason (8bb4b9a)
- Add voice activity detection signal. (feae46d)
- Replicated voice config bytes handling (c9f8668)
- Regenerate docs for 1.54.0 (8bac8d2)
1.54.0 (2025-12-08)
- Support ReplicatedVoiceConfig (07c74dd)
- Apply timeout to the total request duration in aiohttp (a4f4205)
- Make APIError class picklable (fixes #1144) (e3d5712)
- Regenerate docs for 1.53.0 (3a2b970)
1.53.0 (2025-12-03)
- Add empty response for tunings.cancel() (97cc7e4)
- Convert 'citationSources' key in CitationMetadata to 'citations' when present (fixes #1222) (2f28b02)
- Fix google.auth.transport.requests import error in Live API (a842721)
- Improve docs for google.genai.types (5b50adc)
- Recommend using response_json_schema in error messages and docstrings. (c0b175a)
- Updating codegen instructions to use gemini 3 pro and nano banana pro (060f015)
1.52.0 (2025-11-21)
- Add support for configuring resource scope when using base_url (a3e0859)
TypeError: issubclass() arg 1 must be a classwhen usingList[str]forcontents(c624d7e)- Create new aiohttp Client Session if loop is closed (1dc35ea)
1.51.0 (2025-11-18)
- Add a pre-validation hook to warn about Pydantic model type mismatches. (f7af6ef)
- Add display name to FunctionResponseBlob (52906d5)
- Add display name to FunctionResponseFileData (7c39f70)
- Add generate_content_config.thinking_level (30b00db)
- Add image output options to ImageConfig for Vertex (014aaad)
- Add part.media_resolution (30b00db)
- Support Function call argument streaming for all languages (9b2ca50)
- Only log warnings once for accessors in GenerateContentResponse and LiveServerMessage (eec841e)
- Remove gemini 2 below model reference (c42ddff)
- Update sample code to use gemini 2 or above (d48bbba)
- Update Veo and Imagen model id in README (5c69122)
1.50.1 (2025-11-13)
- Do not use ADC if passing a base_url, no project, no location (a00b67a)
- Ensure the custom httpx client and async client won't be closed automatically (9a9fa3c)
1.50.0 (2025-11-12)
- Use pytest-xdist for test parallelization (6ff82fc)
- Add missing fields to the model types (4b855e6)
- Don't generate warnings from response.text property because of thought_signature. (dd9360d)
- Fix base_steps parameter for recontext_image (d94077b)
- Fix file_search_stores.documents pagination (8d40d48)
- Fix models.list() filter parameter (7fa1e41)
- Handle SSE error message types properly in streaming (72afa50)
- Roll back a breaking change to the import system (8674003)
- Log Schema.json_schema and Schema.from_json_schema only once (517300c)
- Regenerate docs for 1.49.0 (74b680a)
1.49.0 (2025-11-05)
- Add complete stats to BatchJob (b211466)
- Add FileSearch tool and associated FileSearchStore management APIs (2e2a78d)
- Add FileSearch tool and associated FileSearchStore management APIs (7370d24)
- Add image_size to ImageConfig (Early Access Program) (81c027c)
- Make genai.Part constructible from PartUnionDict. (7526e4d)
- Log deprecation waring to Schema.from_json_schema method and Schema.json_schema method (856789a)
- Regenerate docs for 1.48.0 (004d238)
- Update log message in Schema.json_schema and Schema.from_json_schema methods (5bf69e5)
1.48.0 (2025-11-03)
- Append the current model chunk to contents in async streaming (7c5cf56)
- Disable AFC when there are incompatible tool presented. (ce13aef)
- Offload sync python tool calls to a thread when used from async context. (f2a0782)
- Only show warning log for non-text or multi-candidate fields when response.text is accessed directly (bf82505)
1.47.0 (2025-10-29)
- Add safety_filter_level and person_generation for Imagen upscaling (6196b1b)
- Add support for preference optimization tuning in the SDK. (4540f9d)
- Pass file name to the backend when uploading with a file path (4fa2edd)
- Support default global location when not using api key with vertexai backend (6340ce0)
- Support retries in API requests (ac70ecd)
- Check environment Vertex AI api key for credential precedence (9bd758c)
- Correct pydantic version range (bytes fields are broken with pydantic<=2.8). (d24cb56)
- Make
__del__methods more robust in_api_clientandclient. (64cab58) - Setting custom httpx async client will ensure using httpx client even if aiohttp is installed (7bd1bde)
- Support custom_base_url for Live and other APIs when project/location are unset and even when project/location are set in the environment, and avoid Automatic Default Credentials (7bd1bde)
- Add docstring for classes and fields that are not supported in Gemini or Vertex API (4a6c6af)
- Add docstring for enum classes that are not supported in Gemini or Vertex API (909f26b)
- Add documentation for the retry behavior (ff12b46)
- Update Codegen Instructions to include newer models and use consistent formatting. (f0b0a94)
- Update README.md and index.rst to use consistent spacing for Python Samples (2e5aa1f)
1.46.0 (2025-10-21)
- Add enable_enhanced_civic_answers in GenerationConfig (6c1dae7)
- Support custom httpx clients (694a6bd)
- Support jailbreak in HarmCategory and BlockedReason (011e218)
- Remove bytes for Gemini Developer API before sending a video for Veo Video Extension async (9ccc6ce)
1.45.0 (2025-10-15)
- Add support for Python 3.14. (f0083a2)
- Keys in Live API tool responses are incorrectly re-cased (57a4765)
1.44.0 (2025-10-15)
- Support fully override base_url and raw model name when none of the project, locations, api_key are configured (160997e)
- Support video extension for Veo on Gemini Developer API (341ea77)
- Avoid potential dual import confusion in type assert (9cc4a72)
- Refresh docs. (9c8147b)
1.43.0 (2025-10-10)
- Enable Google Maps tool for Genai. (dc77a1d)
- Support enableWidget feature in GoogleMaps (1737f72)
- Support Gemini batch inline request's metadata and add test coverage to safety setting (7dcc969)
- Regenerate updated Python docs (e6989a3)
1.42.0 (2025-10-08)
- Add labels field to Imagen configs (cdba4c9)
- Add utility methods for creating
FunctionResponsePartand creating FunctionResponsePartwithFunctionResponseParts(72c92d8) - Enable Ingredients to Video and Advanced Controls for Veo on Gemini Developer API (Early Access Program) (9c02a07)
- Avoid potential dual import for content type assertion (83d7973)
- Increase
READ_BUFFER_SIZEin_api_client.pyfor streaming large chunks in new model (981bba7) - Make t_part and t_content conform to their type annotations: they now handle FileDict correctly and t_contents handles PartUnionDict correctly. (0933632)
1.41.0 (2025-10-02)
- Fix validation for image_config (efaa574)
- Regenerate updated Python docs (53e7bd8)
1.40.0 (2025-10-01)
- Add
ImageConfigtoGenerateContentConfig(88088df) - Expose session id in Live API (1692f23)
- Rename ComputerUse tool (early access) (aaac8d8)
- Resolve potential mem leak on deletion of Client when using async (538c755)
- Resolve unclosed client session warning. (043a392)
1.39.1 (2025-09-26)
- Unbreak client closed errors when using vertexai session service (a0882bd)
- Regenerate updated Python docs (4343332)
1.39.0 (2025-09-25)
- Add FunctionResponsePart & ToolComputerUse.excludedPredefinedFunctions (aa7e3c2)
- Allow custom headers in file upload requests. (1aad1e9)
- Support explicitly closing the client and context manager (f982dfb)
- Support Imagen 4 Ingredients on Vertex (1fe3bec)
- Expose
JOB_STATE_RUNNINGandJOB_STATE_EXPIREDfor Gemini Batches states (739f72d) - Fix AFC logging (249f1af)
- Fix Max Depth repr for containers (dict, list, ...) (6ef3db8)
- Initialization of
pre_tuned_model_checkpoint_idfrom tuning config. (1d3d28a) - Remove unclosed client session message when sharing aiohttp ClientSession (8cee513)
1.38.0 (2025-09-16)
- Add 'turn_complete_reason' and 'waiting_for_input' fields. (c1f57a5)
- Skip aiohttp related tests when package is not installed (50badf6)
- Regenerate docs for 1.37.0 (1631b2e)
1.37.0 (2025-09-16)
- Add
VideoGenerationMaskModeenum for Veo 2 Editing (3d73cc5)
- Handle single-element list responses in error details. (2629fb4)
- Reuse aiohttp ClientSession for sharing connection pool (d866313)
- Add uv package installation command to README (09a8bee)
1.36.0 (2025-09-10)
- Add labels to create tuning job config (a6a2988)
- Fix the return type of generate_content_stream. (28c735f)
- Fix the return type of generate_content_stream. (ebc7180)
- Regenerate docs for 1.35.0 (aa2f97b)
1.35.0 (2025-09-09)
- Support Veo 2 Editing on Vertex (effb53a)
- Enable
idfield inFunctionCallfor Vertex AI. (717c1b0)
1.34.0 (2025-09-09)
- [Python] Implement async embedding batches for MLDev. (468d529)
- Generate the function_call class's converters (77d1d40)
1.33.0 (2025-09-02)
- Add resolution field for Gemini Developer API Veo 3 generation (cd2620c)
- Add the response body for generateContent (e032208)
- Defer
asyncio.Lockinitialization in_api_client.py. (c6a6c70) - Return genai.types.Image, not PIL.Image (67611ed)
1.32.0 (2025-08-27)
- Add
sdkHttpResponse.headersto *Delete responses. (0101d47) - Add add_watermark field for recontext_image (Virtual Try-On, Product Recontext) (0428877)
- Add GenerateContentResponse.parts, Part.as_image(), and Blob.as_image() (75c0955)
- Add output_gcs_uri to Imagen upscale_image (3fecf29)
- Add VALIDATED mode into FunctionCallingConfigMode (f6bf934)
- Add VideoGenerationReferenceType enum for generate_videos (cd53aff)
- Support GenerateVideosSource for Veo GenerateVideos (a6c2bb7)
- Support tunings.cancel in the genai SDK for Python, Java, JS, and Go (ffd8b06)
- Fix typo in README (0cef3e6)
- Prompt and schema fix for json schema sample (6efd242)
- Regenerate docs for 1.31.0 (51903d4)
- Update TokensInfo docstring (921afa1)
- Updating Imagen 4 code snippet (630262b)
- Updating Veo model to Veo 3 and adding instruction to edit images using the native image-out model (codegen instructions). (b34a5c6)
1.31.0 (2025-08-18)
- Support Imagen image segmentation on Vertex (a3c46f5)
- Support Veo 2 Reference Images to Video Generation on Vertex (3712351)
- Fix the bug to support Gemini Batch inlined requests system instruction (3abf441)
1.30.0 (2025-08-13)
- Add evaluation support to Vertex tuning (95293eb)
- Enable continuous fine-tuning on a pre-tuned model in the SDK. (72dc46b)
- Support document name in grounding metadata (5f6746d)
- Support exclude_domains in Google Search and Enterprise Web Search (7e4ec28)
- Prevent NameError from being thrown when has_aiohttp is False (13a487d)
- Docs for 1.29 (3e39e63)
- Document that property descriptions are not automatically-handled. (d7cb114)
- Fix example format. (da225f3)
1.29.0 (2025-08-06)
- Add image_size field for Gemini Developer API Imagen 4 generation (f1852e6)
- Add Lyria enum for music generation mode for vocalization (30c0676)
- Allow methods in batch to return headers in sdk_http_response by default (80fb4e3)
- Enable more types in FunctionDeclaration schema (76e9b13)
- Enable responseId for Gemini Developer API (a57f7d9)
- Support image recontext on Vertex (8a45746)
- Support new enum types for UrlRetrievalStatus (13815b8)
- Harden the response parsing logic in generate_content_stream (c4466d3)
1.28.0 (2025-07-30)
- Add images quick accessor to GenerateImagesResponse (2e43d91)
- Allow methods in models to return headers in sdk_http_response by default. (fa6675a)
- Allow methods in tuning to return headers in sdk_http_response by default (dd19971)
- Define StringDict type alias for better readability (0f4613f)
- Increase buffer size to read response body from HTTP client (ae2d790)
- Support retry configuration at request level (417e655)
- Allow empty proj/location and api key when overriding base_url (79f7bfc)
- Retry async when seeing aiohttp ClientConnectorError, ClientOSError, ServerDisconnectedError (b0d18de)
1.27.0 (2025-07-22)
- Add image_size field for Vertex Imagen 4 generation (df52660)
- Return headers for list method in all modules. (dd3df9b)
- Copy improvements and minor changes to instructions. (235ee99)
- Update batches and tunings doc (97a3494)
- Update extra_body docstring (633eca3)
1.26.0 (2025-07-16)
- Add
addWatermarkparameter to the edit image configuration. (a5b1545) - Adding codegen instructions to guide LLMs to generate code with the Google GenAI SDK (d82634b)
- live: Enhance security by moving api key from query parameters to header (d78add3)
- Update generated video resolution config docstring (d06254c)
1.25.0 (2025-07-09)
- Add new languages for Imagen 4 prompt language (cbd643e)
- Make t_schema in Gemini API reusable from Genai Procesors. (922eaf5)
- Improve code dependency to make
typesmore self-contained (7d0a7d8) - python: Fix response.parse when response_json_schema is provided. (babb01f)
- Add extra_body example to README.md (0b077bf)
- Mention both API-key environment variables. (50fff0c)
- Regenerate docs for 1.24.0 (fe7ed6d)
1.24.0 (2025-07-01)
- Force httpx if the client was instantiated with an httpx.AsyncBaseTransport (4851590)
- Retry on exception instead of a status code (fc78107)
- Add I2V and V2V generate_videos examples in Python README file (858f738)
- Regenerate docs for 1.23.0 (4273da2)
1.23.0 (2025-06-27)
- Enable Vertex Multimodal Dataset as input to supervised fine-tuning. (15cf810)
- Broken async stream when using aiohttp (231b4c1)
- Add hint for base64 string (70eb9c1)
- Add mcp example in README (81d3831)
- Regenerate docs for 1.22.0 (6f7f223)
1.22.0 (2025-06-25)
- Add compressionQuality enum for generate_videos (b132387)
- Add enhance_input_image and image_preservation_factor fields for upscale_image (cdcd4f5)
- Allow users to access headers for generateContent method and generateContentStream (80c8964)
- Expose the responseJsonSchema in GenerateContentConfig (714452f)
- Improve repr for pydantic objects. (80ab054)
- Support Batches create/get/list/cancel in Gemini Developer API (5ab8a56)
- Support IntEnums when processing JSON schemas (6cc2bdb)
- Keep chunk content history when thought summaries are enabled in the stream response (91e7246)
- The send_client_content function with Blob input. (8491e4c)
1.21.1 (2025-06-19)
- Re-raise exception during retries (d6a223c)
- Regenerate docs for 1.21.0 (feaf5fe)
1.21.0 (2025-06-18)
- Add retries to http client (aed2f48)
- Enable json schema for controlled output and function declaration. (624c8e7)
- Support extra_body in HttpOptions (273c9b8)
- Update aiohttp client's SSL handling and configure trust_env by default to match httpx (462dd3e)
- Add instructions to use the aiohttp options for faster async performance and client_args/async_client_args in HttpOptions (0820ed6)
- Add proxy instruction (f90af49)
- Regenerate docs for 1.20.0 (66f198a)
1.20.0 (2025-06-11)
- Add datastore_spec field for VertexAISearch (a26d998)
- Add support for Veo frame interpolation and video extension (1648dda)
- Add Video.from_file() support in Python SDK (7eb5b07)
- RAG - Introducing context storing for Gemini Live API. (c00c4a9)
- Use aiohttp in async APIs to lower latency if aiohttp is installed, otherwise use default httpx in async APIs (2f448bc)
- chats: Relax the constraint on chat turns (046fa87)
- Make function calls asynchronous in subsequent AFC calls (3e429a0)
- Generate docs for 1.19.0 (4df9230)
1.19.0 (2025-06-04)
- Add enhance_prompt field for Gemini Developer API generate_videos (92ca562)
- Add FunctionResponse.from_mcp_response() convenience function for parsing MCP responses to send to subsequent model calls. (e1b980d)
- Enable url_context for Vertex (99551c9)
- python: Support
GEMINI_API_KEYas environment variable for setting API key. (ae2392c)
- Enable FunctionDeclaration parser when future is imported (589b520)
1.18.0 (2025-05-30)
- Adding
thought_signaturefield to thePartto store the signature for thoughts. (303f906) - Include UNEXPECTED_TOOL_CALL enum value to FinishReason for Vertex AI APIs. (ccbc66e)
- Support ephemeral auth tokens as API keys for live connections in Python. (db1d7ee)
- Ignore struct types when performing forward compatibility field filtering (7024011)
- Removed
live_ephemeral_connect, ephemeral auth tokens can now be used as API keys (db1d7ee) - Rename LiveEphemeralParameters to LiveConnectConstraints. (6719faf)
1.17.0 (2025-05-28)
- Remove unsupported Lyria enum for music generation mode
- Add generate_audio field for private testing of video generation (c2bccf3)
- Send automatic function calling None responses as NULL to the model (8446e3d)
- Support API keys for live in VertexAI mode (5b5a750)
- Support new fields in FileData, GenerationConfig, GroundingChunkRetrievedContext, RetrievalConfig, Schema, TuningJob, VertexAISearch, (b07c549)
- Remove unsupported Lyria enum for music generation mode (98ff507)
1.16.1 (2025-05-20)
- Fix broken tool use in generate content. (bad81ad)
1.16.0 (2025-05-19)
- Add
time range filterto Google Search Tool (b79c414) - Add basic support for async function calling. (6258dad)
- Add Files module with Files.upload, .get and .delete (f4dd629)
- Add live proactivity_audio and enable_affective_dialog (778d6a2)
- Add Lyria Realtime music generation support for Python (e746417)
- Add Lyria Realtime Music Types (18d2407)
- Add MCP telemetry usage to Python SDK. (0bc6ab5)
- Add multi-speaker voice config (1d73827)
- Add support for lat/long in search. (50ddf98)
- Add support for MCP in Python SDK. (dcd7819)
- Add support for MCP in Python SDK. (3f531c3)
- Add telemetry headers for synchronous calls with MCP (638c7f4)
- Add Video FPS, and enable start/end_offset for MLDev (bfaa1df)
- Raises an error when there are duplicate tool names. (301c699)
- Support customer-managed encryption key in cached content (e951337)
- Support ephemeral token creation in Python (141d540)
- Support models.get/delete/update in Java (aeaadf8)
- Support Url Context Retrieval tool (cbd1ea6)
- Support using ephemeral token in Live session connection in Python (141d540)
- Clone config when parsing for MCP tools (5feeb60)
- Fix imports if mcp is not installed (e46eb05)
- Live tools (032d1fe)
- Prevent MCP label from being appended multiple times if they already exist (974ba07)
- Typo in error message. (9a45bfd)
- Update parse_config_for_mcp_tools to remove the deep copy of the config and filter tools (d4dd2bb)
- Use inspect.cleandoc on function docstrings in generate_function_declaration. (bc664d9)
1.15.0 (2025-05-13)
- Support display_name for Blob class when calling Vertex AI (266da4a)
- Support tuning checkpoints (26a87ea)
- Typo fixes in a few files. (b9c9e32)
- Improve docs for response_mime_type and response_schema. Relate to #297 (832b715)
- Regenerate docs for 1.14.0 (32808f3)
1.14.0 (2025-05-07)
- Add
Tool.enterprise_web_searchfield (731c5a3) - Add support for Grounding with Google Maps (1efc057)
- Enable input transcription for Gemini API. (157b16b)
- Add retry logic for missing x-goog-upload-status header for python (5bb70fc)
- Fix resource warning raised by unclosed httpx client (a3a6d34)
- Raise ValueError when 'x-goog-upload-status' header is not present in file upload response (dfdea36)
- Regenerate docs for 1.13.0 (5269212)
1.13.0 (2025-04-30)
- Add models.delete and models.update to manage tuned models (53a3282)
- Add support for live grounding metadata (b904cba)
- Make min_property, max_property, min_length, max_length, example, patter fields available for Schema class when calling Gemini API (52919cb)
- Support setting the default base URL in clients via set_default_base_urls() (2b82d72)
- Support using the passed credentials in AsyncLive::connect (#738) (568cfd2)
- Do not raise error for
defaultfield in Schema for Gemini API calls (1d3d1c9) - Set
propertyOrderingwhen schema is specified asdictortypes.Schema. (48eebe0)
- Add a link for where to find the Google Cloud project id, API key and location (916bd6e)
1.12.0 (2025-04-23)
- Add additional realtime input fields (bef6385)
- Add py.typed so MyPy interprets this as a typed library (b137b4d)
- Automatically determine mime_type for Part.from_uri (b9d3be1)
- Generate _live_converters.py (d526a08)
- Introduce from_json_schema classmethod to Schema class to allow conversion from JSONSchema class object to Schema class object (899fa1a)
- Support
defaultfield in Schema when users call Gemini API (1e56add)
- Regenerate docs for 1.11.0 (473bf4b)
1.11.0 (2025-04-16)
- Add support for model_selection_config to GenerateContentConfig (fdb0662)
- Introduce json_schema quick accessor in Schema class to convert Google's Schema class into JSONSchema class. (6e55222)
- Support audio transcription in Vertex Live API (9678aba)
- Support configuring the underlying httpx client by allowing the caller to pass client arguments via HttpOptions. (5130e0a)
- Support RealtimeInputConfig, and language_code in SpeechConfig in python (807f098)
- Support user passing in async function to async generate_content and async generate_content_stream for automatic function calling (33d190a)
- Update VertexRagStore (c4558e5)
- Get SSL_CERT_FILE or SSL_CERT_DIR environment variables for proper SSL handshake in API client. They are not automatically retrieved in httpx (5782a5f)
- Update tests to use the pro 2.5 model gemini-2.5-pro-preview-03-25 (fde4a8a)
1.10.0 (2025-04-09)
- remove Part.from_video_metadata
- Add adapter size 2 for Gemini 2.0 Tuning (959df89)
- Add domain to Web GroundingChunk (9a75d48)
- Add session resumption. (6e80ae7)
- Add thinking_budget to ThinkingConfig for Gemini Thinking Models (71863e0)
- Add traffic type to GenerateContentResponseUsageMetadata (925f983)
- Add transcription support for MLDev (c0a1b5c)
- Add types for configurable speech detection (ae4ecee)
- Add types to support continuous sessions with a sliding window (7099e1e)
- Add UsageMetadata to LiveServerMessage (018846a)
- Added support for Context Window Compression (e5c646c)
- Populate X-Server-Timeout header when a request timeout is set. (2af7b67)
- Remove experimental warnings for generate_videos and operations (fa6007a)
- Remove experimental warnings from live api. (007d1b1)
- Support media resolution (ef64f8a)
- Remove Part.from_video_metadata (c0947ab)
- Upload file should support timeout (in milliseconds) configuration from http_options per request or from client (5f3e895)
- Release 1.10.0 (c136e41)
1.9.0 (2025-04-01)
- Add specialized
sendmethods to the live api (9c4e4dc) - Expose generation_complete, input/output_transcription & input/output_audio_transcription to SDK for Vertex Live API (e5685ad)
- Merge GenerationConfig into LiveConnectConfig (d22535e)
- Docstring improvements (77f5356)
1.8.0 (2025-03-26)
- Add engine to VertexAISearch (21f0394)
- Add IMAGE_SAFTY enum value to FinishReason (3a65fb0)
- Add MediaModalities for ModalityTokenCount (fb2509c)
- Add Veo 2 generate_videos support in Go SDK (55b2923)
- Allow title property to be sent to Gemini API. Gemini API now supports the title property, so it's ok to pass this onto both Vertex and Gemini API. (f2f92a7)
- chats: Allow user to create chat session with list of ContentDict (43c5379), closes #467
- Move set event loop into try except logic when setting auth lock (d04b6a6)
- Save prompt safety attributes in dedicated field for generate_images (e5bbb0e)
- Support new UsageMetadata fields (122cdc8)
- Improve logging for response.parsed (fixes #455) (64012dd)
- Schema transformer logic fix. (f64bcba)
- Set event loop before asyncio.Lock() to ensure threading safety (be2d9c6)
- Surface complete error details from backend (38f5beb)
- chats: Raise error when
types.Contentis passed tosend_message()to correctly adhere to type annotation. To migrate code previously passingcontent = types.Content(...)tosend_message(), passcontent.partsinstead.
- Log warning to users that Part.from_video_metadata will be deprecated. (2d12f54)
1.7.0 (2025-03-18)
- Bump up the websockets version for proxy support (b996c4b)
- Leverage httpx connection pooling and avoid instantiation of httpx.Client or httpx.AsyncClient for each call (2ac5129)
- chats: Fix duplicate history when appending AFC history (e4b1d8a)
- chats: Raise error when
types.Contentis passed tosend_message()to correctly adhere to type annotation. To migrate code previously passingcontent = types.Content(...)tosend_message(), passcontent.partsinstead. - Fix incorrect casing of upload status and url headers in Files API. httpx.Response returns 'x-goog-upload-status', but we were checking for 'X-Goog-Upload-Status'. Also clean up upload_file and download_file requests. (2ac5129)
- Use consistent terminology for Gemini Developer API and Vertex AI (7f1cc22)
1.5.0 (2025-03-07)
- Determine mime_type from local images (5e84ddc)
- Enable generate_videos for Gemini Developer API (4a242f6)
- Enable image to video for generate_videos (787354b)
- Expand files.download to work on Video and GeneratedVideo objects (8d4d6fd)
- Support asynchronously upload and download files using httpx (498c01d)
- Fix incorrect unit for
timeout_in_secondsin HttpOptions. (a9be9a2) - Fix Video.show() when uri and video_bytes are provided (3477c40)
1.4.0 (2025-03-05)
- Add response_id and create_time to GenerateContentResponse (b46ed36)
- Allow non-content types in generate_content (cbaaf4a)
- Enable Live API initial connect to accept functions directly, in addition to just FunctionDeclaration (91b1d3e)
- Enable minItem, maxItem, nullable for Schema type when calling Gemini API. (867ce70)
- Implement get history to return comprehensive or curated chat history (92deda1)
- Support aspect ratio for edit_image (5423a58)
- Allow user do batch generate content when passing a list of strings (cbaaf4a)
- Fix chats.send_message_stream curated history (bcf2be0)
- Log warn instead of raise error for GenerateContentResponse.text quick accessor when there are mixed part types (55a0638)
- Remove the keyword parameter requirement for UserContent and ModelContent (0cc292f)
1.3.0 (2025-02-24)
- Add generate_videos (Veo 2) support for Python (e9e2be7)
- Add sdk logger instance (fixes #278) (cf281b5)
- Introduce response.executable_code and response.code_execution_result quick accessors for GenerateContentResponse class (3725ddf)
- Introduce UserContent and ModelContent to facilitate easier content creation (c8cfef8)
- Native async client support using httpx (c38da8d)
- Provide a public property for determining the module backend. (8e561de)
- Enable sending empty input to Live API as turn complete (99a5510)
- Fix automatic function calling warning message logic. (b99da95)
- Fix duplicate get_function_response_parts in (async) generate_content_stream and ensure chunk isn't empty before get_function_response_parts (d4193e6)
- Properly handle empty json response with headers for list models (859ebc3)
- Add docs for error handling (#317) (6e1cb82)
- Add instruction on how to disable automatic function calling. (f8b12d5)
- Regenerate docs for 1.2.0 (30a3493)
- Remove negative_prompt from image samples (fixes #339) (81e18f0)
- Update docs for models modules (d96bba2)
1.2.0 (2025-02-12)
- Enable Media resolution for Gemini API. (6cdf61d)
- Support property_ordering in response_schema (fixes #236) (01b15e3)
- Default to list base models for async models list (d3226b7)
- Remove Type import from types.py that get's shadowed by API Type type. (fixes #310) (78f58c3)
- Use typing_extensions.TypedDict for TypedDict types (fixes #189) (996562a)
- Client initialization using environmental variables. (e4c2ffc)
- Fix File.expiration_time description (fixes #318) (729f619)
- Fix files.upload docs to use 'file' instead of 'path' (fixes #306) (2b35d0c)
1.1.0 (2025-02-10)
- Add support for typing.Literal in response_schema (fixes #264) (384c4eb)
- Allow converting a function into FunctionDeclaration with api option (408e28f)
- Support generate content config for each chat turn (ca19100)
- Tuning -
Tuning.tunefor Gemini API no longer blocks until the tuning operation is resolved (fcf8888)
- Remove duplicate function invocations and ensure automatic function calling can be disabled in generate_content_stream (0958fbe)
- Response_schema generation for pydantic fields with type Optional[list] and Optional[MyBaseModel] now work correctly (fixes #246) (8330561)
- Support dict response_schema with 'any_of' key (75f5056)
- Common - Do not fail when server returns unknown enum values on Python <3.11 (843d86d)
- Add docs on how to structure
contents(fixes #274) (da356cb) - Regenerate docs for 1.0 (fbee816)
- Update model names in README, fix function calling example (11c0274)
1.0.0 (2025-02-05)
- Remove deprecated field:
deprecated_response_payload
- Add labels for GenerateContent requests (3e3b82d)
- Add Union support to response_schema (eedf4f1)
- Support automatic function calling in models.generate_content_stream and send_message_stream, sync and async mode (7c9f8b5)
- Avoid false test failure by skipping incompatible test case for python 3.13 (7f10e55)
- Default to list base models (instead of tuned models) (ef48f0d)
- Handle pydantic model type recognition gracefully for python 3.9 and 3.10 (4a38fdf)
- Raise error when Gemini API response_schema has 'default' or 'anyof' fields (c50bca0)
- Remove redundant contents in Automatic Function Calling history (5510595)
- Remove unsupported parameter from Gemini API (f8addb5)
- Remove experimental classification from description. (b14ac57)
- Remove thoughts examples and update tests (af3b339)
- Update documentation on how to set api version using genai client (6fd4425)
- Update instruction on function calling experience in
ANYmode. (451cf98)
- Remove deprecated field:
deprecated_response_payload(197fa46)
0.8.0 (2025-01-30)
- Rename files.upload argument to "file" instead of "path".
- Add enhanced_prompt to GeneratedImage class (76c810b)
- Added Operation and PredictOperation (internal module) (309dd26)
- Support global endpoint natively in Vertex (f4530b0)
- Support unknown enum values (da448b3)
- Streaming in Vertex AI Express (ff78b7b)
- Correct generate content with uploaded file example (8cea052)
- Rename files.upload argument to "file" instead of "path". (f68aa1f)
0.7.0 (2025-01-28)
- Remove skip_project_and_location_in_path from async models.list
- remove "tuning.distill"
- Change asynchronous streaming output to an awaitable async iterator for client.aio.models.generate_content_stream and client.aio.chat.send_message_stream
- Remove pillow as a required dependency
- rename batches.list method signature.
- make Part, FunctionDeclaration, Image, and GenerateContentResponse classmethods argument keyword only
- Remove skip_project_and_location_in_path from HttpOption
- Renamed FunctionDeclaration class functions to reflect the fact that they work off of the
Callabletype not just functions. - Moved the HttpOptions class into types.py, by making it autogenerated. This causes the following breaking change:
- rename generate_image() to generate_images(), rename GenerateImageConfig to GenerateImagesConfig, rename GenerateImageResponse to GenerateImagesResponse, rename GenerateImageParameters to GenerateImagesParameters
- [genai-modules][models] Add HttpOptions to all method configs for models. (76fdde7)
- Add support for enhance_prompt to model.generate_image (d09e14e)
- Added support for the new HttpOptions class in the per request options overrides. (ad57025)
- Change asynchronous streaming output to an awaitable async iterator for client.aio.models.generate_content_stream and client.aio.chat.send_message_stream (0c124eb)
- Enable enum support in the GenerateContentConfig.response_schema (fe82e10)
- Handle a wider variety of response_schemas - primitives and nested lists. (24fffea)
- Images - Added Image.mime_type (71a8f1d)
- Make Part, FunctionDeclaration, Image, and GenerateContentResponse classmethods argument keyword only (b58f4e0)
- Remove skip_project_and_location_in_path from async models.list (d788626)
- Remove skip_project_and_location_in_path from HttpOption (a1c0435)
- Support GenerateContentResponse.parsed to return Enum (e214211)
- Validate enum value for different backend endpoint. (97bb958)
- Add required key to nested fields in function declaration schemas (c7dba47)
- Fix pydantic list support in Python 3.9 and 3.10 (fixes #52) (81150b3)
- Handle nullable types in pydantic classes (fixes #62) (773e1c0)
- Support parameterized generics Union type in automatic function calling parameters (fixes #22) (04475ab)
- Add examples & tests for thinking model (59e2763)
- Correct usage (0c546de)
- Document experimental state of the live module. (115ac47)
- Fix Blob type docstring. (7f38e55)
- Remove repeated docstring for interrupted in docs (230cfbc)
- Remove the word "class" in docstring and sync Live types docstring up-to-date (7fa3ef3)
- Update supported model parameter format for generate_content (a5c3a1c)
- Moved the HttpOptions class into types.py, by making it autogenerated. This causes the following breaking change: (ad57025)
- Remove "tuning.distill" (ca8cd5e)
- Remove pillow as a required dependency (8ccdf2e)
- Rename batches.list method signature. (aa7c071)
- Rename generate_image() to generate_images(), rename GenerateImageConfig to GenerateImagesConfig, rename GenerateImageResponse to GenerateImagesResponse, rename GenerateImageParameters to GenerateImagesParameters (65d7bf5)
- Renamed FunctionDeclaration class functions to reflect the fact that they work off of the
Callabletype not just functions. (0e4a003)
0.6.0 (2025-01-21)
- Add support for audio_timestamp to types.GenerateContentConfig (fixes #132) (116395b)
- Add support for case insensitive enum types. (fixes #11) (252f302)
- Add support for class methods in the Tools for the GenerateContent Function (5afa6bb)
- Add ThinkingConfig to generate content config. (c23c42c)
- Implement client.files.download (a034b77)
- Support BytesIO when uploading files (4b490dc)
- Support lists in response_schema (8ed933d)
- Usability change to simplify generate content with uploaded files (5c372ae)
- Fix count_tokens system_instruction and tools config (056eaba)
- Fix models.list() with empty tuned models (75409f1)
- Fixed the
bytestype handling (thebase64.urlsafe_bencodeerror) (1bc161d) - Project and location are required when using client in Vertex AI mode. (d5859fa)
- Add project description to README. (384f413)
- Update formatting in README.md (d33fb37)
- Update models.list doc and code examples to include list base models (f2e0c43)
- Tool use example in docs (87fe5b0)
- Tool use example in README.md (87fe5b0)
0.5.0 (2025-01-13)
- Support API keys for VertexAI mode generate_content (0e4b0e5)
- Support list models to return base models (0f713f1)
- Support parsing 'interrupted' field in Live Python SDK. (eab2c4a)
- Use
ser_json_byteval_json_bytesin bytes type public interface (1176e43)
- Update header type (62c45f9)
- Correct description of path parameter that only path-like object is supported (336498b)
0.4.0 (2025-01-08)
- Make Imagen upscale_factor a required argument, make upscale config optional
- ApiClient - support timeout in HttpOptions (b22286f)
- Enable response_logprobs and logprobs for Google AI (5586f3d)
- Support function_calls quick accessor in GenerateContentResponse class (81b8a23)
- Change string type to int type (5c15243)
- FunctionCallCancellation ids type. (b0e46b7)
- Gracefully catch error if streamed json does not meet schema validation (fixes #14) (f494432)
- Update RealtimeClientLiveMessage realtime content parameter field. (4340939)
- Add readme example for Chats module (830f0f5)
- Fix typo in code document (f9243e8)
- Fix typo in CONTRIBUTING.md (3e42644)
- Make Imagen upscale_factor a required argument, make upscale config optional (b06629f)
0.3.0 (2024-12-17)
- contents must be passed to CreateCachedContentConfig instead as a parameter to create_cached_content.
- Add support for Pydantic default value in Automatic Function Calling.
- Add support for thought.
- Add support for streaming chat.