releases.shpreview
Google Gemini/python-genai

python-genai

$npx @buildinternet/releases show python-genai
Mon
Wed
Fri
MayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases15Avg5/moVersionsv1.61.0 → v1.74.0
May 30, 2025

1.18.0 (2025-05-30)

Features

  • Adding thought_signature field to the Part to 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)

Bug Fixes

  • Ignore struct types when performing forward compatibility field filtering (7024011)

⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

  • Removed live_ephemeral_connect, ephemeral auth tokens can now be used as API keys (db1d7ee)
  • Rename LiveEphemeralParameters to LiveConnectConstraints. (6719faf)
May 28, 2025

1.17.0 (2025-05-28)

⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

  • Remove unsupported Lyria enum for music generation mode

Features

  • 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)

Documentation

Miscellaneous Chores

  • Remove unsupported Lyria enum for music generation mode (98ff507)
May 20, 2025

1.16.1 (2025-05-20)

Bug Fixes

  • Fix broken tool use in generate content. (bad81ad)
May 19, 2025

1.16.0 (2025-05-19)

Features

  • Add time range filter to 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)

Bug Fixes

  • 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)

Documentation

  • Add docs for enum fields (2634e01)
  • Regenerate docs for 1.15.0 (a3fc532)

Miscellaneous Chores

  • Fix Lyria method name for JS, update parameters type (0a5d68d)
  • Release 1.16.0 (181d5b7)
May 13, 2025

1.15.0 (2025-05-13)

Features

  • Support display_name for Blob class when calling Vertex AI (266da4a)
  • Support tuning checkpoints (26a87ea)
  • Typo fixes in a few files. (b9c9e32)

Bug Fixes

  • Improve thread safety for sync requests (fixes #775) (d88b8d4)

Documentation

  • Improve docs for response_mime_type and response_schema. Relate to #297 (832b715)
  • Regenerate docs for 1.14.0 (32808f3)
May 7, 2025

1.14.0 (2025-05-07)

Features

  • Add Tool.enterprise_web_search field (731c5a3)
  • Add support for Grounding with Google Maps (1efc057)
  • Enable input transcription for Gemini API. (157b16b)

Bug Fixes

  • 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)

Documentation

  • Regenerate docs for 1.13.0 (5269212)
Apr 30, 2025

1.13.0 (2025-04-30)

Features

  • 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)

Bug Fixes

  • Do not raise error for default field in Schema for Gemini API calls (1d3d1c9)
  • Set propertyOrdering when schema is specified as dict or types.Schema. (48eebe0)

Documentation

  • Add a link for where to find the Google Cloud project id, API key and location (916bd6e)
Apr 24, 2025

1.12.1 (2025-04-24)

Bug Fixes

  • Fix required import of Pillow (f23772d)
  • Remove del in client (83394b8)
Apr 23, 2025

1.12.0 (2025-04-23)

Features

  • 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 default field in Schema when users call Gemini API (1e56add)

Documentation

  • Regenerate docs for 1.11.0 (473bf4b)
Apr 16, 2025

1.11.0 (2025-04-16)

Features

  • 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)

Bug Fixes

  • 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)
Apr 9, 2025

1.10.0 (2025-04-09)

⚠ BREAKING CHANGES

  • remove Part.from_video_metadata

Features

  • 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)

Bug Fixes

  • Remove Part.from_video_metadata (c0947ab)
  • Upload file should support timeout (in milliseconds) configuration from http_options per request or from client (5f3e895)

Miscellaneous Chores

Apr 1, 2025

1.9.0 (2025-04-01)

Features

  • Add specialized send methods 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)

Bug Fixes

  • Make response arg in APIError class constructor optional. #572 (7b3f4a4)

Documentation

Mar 26, 2025

1.8.0 (2025-03-26)

Features

  • 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)

Bug Fixes

  • 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.Content is passed to send_message() to correctly adhere to type annotation. To migrate code previously passing content = types.Content(...) to send_message(), pass content.parts instead.(7fb2c7e)

Documentation

  • Log warning to users that Part.from_video_metadata will be deprecated. (2d12f54)
Mar 18, 2025

1.7.0 (2025-03-18)

Features

  • Bump up the websockets version (b996c4b)
  • Leverage httpx connection pooling and avoid instantiation of httpx.Client or httpx.AsyncClient for each call (2ac5129)

Bug Fixes

  • chats: Fix duplicate history when appending AFC history (e4b1d8a)
  • chats: Raise error when types.Content is passed to send_message() to correctly adhere to type annotation. To migrate code previously passing content = types.Content(...) to send_message(), pass content.parts instead.
  • 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)

Documentation

  • Use consistent terminology for Gemini Developer API and Vertex AI (7f1cc22)
Mar 13, 2025

1.6.0 (2025-03-13)

Features

  • Add base steps to EditImageConfig (9ddfbcd)
  • Enable union type for Schema when calling Gemini API, enable required field when doing automatic function calling for Gemini API. (891d736)
  • Migrate sync client to use httpx (d0bf03b)
  • Support returned safety attributes for generate_images (98b5709)

Bug Fixes

  • Correctly import typing.typeguard in python 3.9 (4dcaf99)
  • Fix the missing learning_rate_multiplier in CreateTuningJobConfig conversion. (0bd0a5e)
  • Fix video.show() to display video (dab1a4f)
  • Remove unsupported parameter negative_prompt from Gemini API generate_images (5f3333e)
  • Resolve issue where pre-release versions of dependencies are installed (6559a1a)

Documentation

  • Add docstring: the sha256_hash is encoded in base64. (d710627)
  • Update docs with agreed-upon fixes (f523a7c)
Mar 7, 2025

1.5.0 (2025-03-07)

Features

  • 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)

Bug Fixes

  • Fix incorrect unit for timeout_in_seconds in HttpOptions. (a9be9a2)
  • Fix Video.show() when uri and video_bytes are provided (3477c40)
Mar 5, 2025

1.4.0 (2025-03-05)

Features

  • 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)

Bug Fixes

  • 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)
Feb 24, 2025

1.3.0 (2025-02-24)

Features

  • 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)

Bug Fixes

  • 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)

Documentation

  • 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)
Feb 12, 2025

1.2.0 (2025-02-12)

Features

  • Enable Media resolution for Gemini API. (6cdf61d)
  • Support property_ordering in response_schema (fixes #236) (01b15e3)

Bug Fixes

  • 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)

Documentation

  • 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)
Feb 10, 2025

1.1.0 (2025-02-10)

Features

  • 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.tune for Gemini API no longer blocks until the tuning operation is resolved (fcf8888)

Bug Fixes

  • 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)

Documentation

  • 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)
Latest
v1.74.0
Tracking Since
Dec 23, 2024
Last checked May 1, 2026