Releases: googleapis/python-genai
Releases · googleapis/python-genai
v1.23.0
v1.22.0
1.22.0 (2025-06-25)
Features
- 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)
Bug Fixes
- Keep chunk content history when thought summaries are enabled in the stream response (91e7246)
- The send_client_content function with Blob input. (8491e4c)
Documentation
v1.21.1
v1.21.0
1.21.0 (2025-06-18)
Features
- Add retries to http client (aed2f48)
- Enable json schema for controlled output and function declaration. (624c8e7)
- Support extra_body in HttpOptions (273c9b8)
Bug Fixes
- Update aiohttp client's SSL handling and configure trust_env by default to match httpx (462dd3e)
Documentation
v1.20.0
1.20.0 (2025-06-11)
Features
- 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)
Bug Fixes
- chats: Relax the constraint on chat turns (046fa87)
- Make function calls asynchronous in subsequent AFC calls (3e429a0)
Documentation
- Generate docs for 1.19.0 (4df9230)
v1.19.0
1.19.0 (2025-06-04)
Features
- 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_KEY
as environment variable for setting API key. (ae2392c)
Bug Fixes
- Enable FunctionDeclaration parser when future is imported (589b520)
v1.18.0
1.18.0 (2025-05-30)
Features
- Adding
thought_signature
field to thePart
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
v1.17.0
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)
v1.16.1
v1.16.0
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)