Releases: googleapis/python-genai
Releases · googleapis/python-genai
v1.12.1
v1.12.0
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
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
v1.10.0
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
- Release 1.10.0 (c136e41)
v1.9.0
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
Documentation
- Docstring improvements (77f5356)
v1.8.0
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 tosend_message()
to correctly adhere to type annotation. To migrate code previously passingcontent = types.Content(...)
tosend_message()
, passcontent.parts
instead.(7fb2c7e)
Documentation
- Log warning to users that Part.from_video_metadata will be deprecated. (2d12f54)
v1.7.0
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 tosend_message()
to correctly adhere to type annotation. To migrate code previously passingcontent = types.Content(...)
tosend_message()
, passcontent.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
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
v1.5.0
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
v1.4.0
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)