gemini Genkit Releases · · 0.12.0

Genkit Python SDK v0.12.0 Enhances AI Model Integration and Response Handling

sdkaipreviewengineermedia
patch

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)
Read the original announcement →

https://github.com/genkit-ai/genkit/releases/tag/py/v0.12.0

Related releases