Skip to content

Releases: googleapis/python-genai

v1.12.1

24 Apr 16:31
e378ca9
Compare
Choose a tag to compare

1.12.1 (2025-04-24)

Bug Fixes

  • Fix required import of Pillow (f23772d)
  • Remove del in client (83394b8)

v1.12.0

23 Apr 21:11
54f6515
Compare
Choose a tag to compare

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)

v1.11.0

16 Apr 21:15
79bfaf6
Compare
Choose a tag to compare

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)

v1.10.0

09 Apr 03:23
369385c
Compare
Choose a tag to compare

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

v1.9.0

01 Apr 01:44
bfa0a8d
Compare
Choose a tag to compare

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

v1.8.0

26 Mar 17:32
44aff06
Compare
Choose a tag to compare

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)

v1.7.0

18 Mar 21:14
2efd6f2
Compare
Choose a tag to compare

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)

v1.6.0

13 Mar 22:29
ee9c87f
Compare
Choose a tag to compare

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)

v1.5.0

07 Mar 00:25
6712fa5
Compare
Choose a tag to compare

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)

v1.4.0

05 Mar 01:15
4b685bc
Compare
Choose a tag to compare

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)