Genkit Python SDK v0.12.0 Enhances AI Model Integration and Response Handling
Genkit Python SDK v0.12.0 introduces A2UI surfaces, integrates new Google AI models like Deep Research and Lyria, and strengthens the OpenAI plugin with support for `gpt-6-astra`. This release refines `generate()` error handling to return `ModelResponse` even when a turn fails, enabling better retry mechanisms for multi-turn interactions. Additionally, it streamlines the `Part` API for message content and moves agents to an experimental namespace. These updates are designed to help developers build more interactive and robust generative AI applications.
- →ai.define_resource() is gone (#6201)
- →A wrap_generate hook that swaps the model is resolved after the hook, so the swap is the model that runs (#6238)
- →Dynamic action provider children show up in the registry, and those fetches are safe from more than one loop or thread (#6378, #6379)
- →Google model discovery is async (#6298). The TTS fallback model no longer claims constrained output (#6301)
- →pip install genkit on Python 3.9 prints how to upgrade (#6210)
Fixes (7) ›
A tool can return response(value, parts=[png]) so the model sees JSON plus media. Calling the tool yourself now returns MultipartToolResponse; out.output is the value you used to get back (#6172)
context={'secrets': {'api_key': tenant_key}} is the Gemini key for that call. A key on config or the top-level context raises INVALID_ARGUMENT (#6236)
- ai.define_resource() is gone (#6201)
- A wrap_generate hook that swaps the model is resolved after the hook, so the swap is the model that runs (#6238)
- Dynamic action provider children show up in the registry, and those fetches are safe from more than one loop or thread (#6378, #6379)
- Google model discovery is async (#6298). The TTS fallback model no longer claims constrained output (#6301)
- pip install genkit on Python 3.9 prints how to upgrade (#6210)
https://github.com/genkit-ai/genkit/releases/tag/py/v0.12.0
Related releases
- Gemini model gemini-2.5-flash-image reaches end of life in 7 days endoflife.date ·
- Gemini 3.8 Live Introduces Real-Time Live Avatar for Enterprise Gemini Blog ·
- Gemini expands Connected Apps integrations with new wave of services Gemini Blog ·
- Gemini 3.8 Flash and Flash-Lite TTS Models Offer Advanced Voice Generation Gemini Blog ·
- Gemini model gemini-omni-flash-preview reaches end of life in 7 days endoflife.date ·
- Python GenAI SDK v2.25.0 enhances Voice and Speech APIs Gemini Python SDK Releases ·