Repository navigation
chore(py): release Python SDK v0.12.0 - #6430
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request bumps the version of multiple genkit-related Python packages from 0.11.0 to 0.12.0 across their respective pyproject.toml files and updates the uv.lock file accordingly. There are no review comments, and I have no feedback to provide.
apascal07
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Genkit Python SDK v0.12.0 Release Notes
Genkit Python SDK v0.12.0 is here. This release is about A2UI surfaces, Deep Research (plus Antigravity and Lyria), a stronger OpenAI plugin, and
generate()handing back aModelResponseonce a turn has started.What's New
A2UI surfaces (#6312)
Surfaces()watchesgeneratefor```a2uifences and rewrites them intoapplication/a2ui+jsondata parts. On the next turn those parts become text again, so the model can see the surface it already drew and the button the user clicked.Surfaces()uses the bundled catalog.load_catalog(ai, catalog)plusSurfaces(catalog=catalog.id)uses yours. An unregistered catalog id, orvalidate='strict'on a surface that does not match, fails the turn:finish_reasonisfailedand.messageisNone.Deep Research, Antigravity, and Lyria (#6240, #6241)
Deep Research is a job, like Veo.
generate_operationstarts it.check_operationis how you find out when the report is ready. A finished report can take several minutes.Also on
GoogleAI:deep-research-max-preview-04-2026anddeep-research-pro-preview-12-2025.Antigravity and Lyria are ordinary
generatecalls on the same plugin. These three are Google AI only. Vertex does not resolve these ids.lyria-3-pro-previewis the other Lyria id.OpenAI plugin, including
gpt-6-astra(#6306)gpt-6-astrais in the catalog. It advertises media, a system role, and JSON. It does not advertise tools.Streaming now emits content, reasoning, and tool-call deltas that arrive in the same chunk (#6282). Responses carry finish reason, finish message, and refusals (#6259).
rawandcustommetadata are set on the response (#6261). A completion with no choices no longer crashes (#6258). Embeddings requested as base64 validate (#6346). Reasoning models getmax_tokensmapped (#6324). A non-streaming call no longer sends stream options (#6297). Embedder andlist_actionsHTTP errors arrive asGenkitError(#6225).generate()raises only when a turn never starts (#6255)If
generate()stops before a turn starts, it raises. Once the model has been called, you get aModelResponse, including when that turn dies. This is extremely helpful when you want to retry from the rounds that already finished.A turn never starts, and
generate()raises, for an unknown model, tool, or format; two tools with the same name;max_turns < 0; or a config class that does not belong to the model.Once the model has been called, the reason sits on
response.errorand.messagesis what you can send again. Text that is not aRecipestaysfinish_reasonstop,.outputisNone,.textis the raw reply, anderror.reasonisINVALID_OUTPUT. In v0.11.0 that case wasfinish_reasonfailed.A turn that dies is
failed, and.messageisNone: the model named a tool that is not registered (TOOL_NOT_FOUND), or a plugin refused the output. Hittingmax_turnsisaborted, and the unanswered tool request is dropped.raise PublicError('NOT_FOUND', 'No order 123')inside a tool publishes that sentence onresponse.error.message. A bare exception readsinternal error.abort_signalreturns anabortedresponse, including when you set it before the first model call.asyncio.wait_forandtask.cancel()still raise.Typed stream chunks (#6212)
generate_stream(..., output_schema=Country)used to give you a dict you indexed by hand. After this, eachchunk.outputis aCountry. This is extremely helpful when you want to paint a title as soon as that field exists.Before the JSON object starts,
chunk.outputisNone. Once it has started, you get aCountry. Fields that have not arrived areNone. A string cut mid-token is the prefix ("Ja"). Constraints and validators are skipped on chunks.(await sr.response).outputis the finished, validated object. A dict schema, or no schema, still gives you a dict.define_prompt(..., output_schema=Country).stream()works the same way.Existing API Changes
Agents are on
genkit.exp(#6313)Agents moved to the experimental namespace. They will graduate to stable over time.
One
Part(#6243)The part API is one
Part. Walking the messages on a model response, you tell the kinds apart by which field is set.Part.from_text('hello')andPart(text='hello')build one.Part(root=...)raises.Fixes & Polish
response(value, parts=[png])so the model sees JSON plus media. Calling the tool yourself now returnsMultipartToolResponse;out.outputis the value you used to get back (feat(py): implement multipart tool response #6172).context={'secrets': {'api_key': tenant_key}}is the Gemini key for that call. A key onconfigor the top-level context raisesINVALID_ARGUMENT(feat(py): support per-tenant API keys in Gemini models via context.secrets #6236).ai.define_resource()is gone (chore(py): remove resources from api surface and all related logic #6201).wrap_generatehook that swaps the model is resolved after the hook, so the swap is the model that runs (fix(py): honor wrap_generate model swaps by resolving after the hook #6238).pip install genkiton Python 3.9 prints how to upgrade (chore(py): clear upgrade message for Python <= 3.9 installs instead of resolving a pre-transfer package #6210).