Repository navigation
chore(py): release Python SDK v0.11.0 - #6281
Merged
Merged
Conversation
apascal07
approved these changes
Sep 3, 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.11.0 Release Notes
Genkit Python SDK v0.11.0 is here. This release is about
generate()keeping the reply when something goes wrong after the model has already answered, Veo as a background job you poll, and provider failures arriving as oneGenkitErroryou can actually branch on.What's New
generate()returns the leftover instead of throwing (#6100, #6271)generate()used to throw when the model refused, hit max tool turns, or wrote something that was not the schema you asked for. That discarded the reply. After this, you get theModelResponseback. This is extremely helpful when you want to retry from the tool rounds that already succeeded.Matching JSON is still
stop, and.outputis theRecipe. A leftover that is not a Recipe comes back asfinish_reason=failed; the leftover stays on.text. A safety refusal staysblocked. Hitting max tool turns isaborted. A tool name that is not registered isfailed..messagesonly keeps completed rounds (model message plus every tool response). An unanswered tool request is dropped, including the model message that opened it, because no provider will accept that history.response.messageisNonein those cases.generate()still throws when there was no turn: empty messages, an unknown output format or model, or an output schema that is not JSON Schema. A tool that raises still raises.Veo and background models (#6129, #6130, #6131, #6237)
Video is a job, not a round-trip.
generate_operationstarts it and hands back a ticket;check_operationis how you find out when the video is ready.generate()on a Veo model returns aModelResponsewhose.operationis the ticket and whose.messageisNone. It does not poll.GoogleAI.veo_model/VertexAI.veo_modelstamp the plugin namespace. On Vertex, a finished operation unpacksuri/ GCS / inline bytes into a playablemedia.url. If safety filters drop every sample, that comes back as an error instead of an empty success.check_operationandcancel_operationtake a liveOperation. Reload a persist dump withOperation.model_validate(dumped)first.One
GenkitErrorfrom every provider (#6098)A Gemini 400, an OpenAI 429, an Ollama mid-stream failure, and an Anthropic 529 used to leak as whatever that SDK raises. Retry then retried a bad request, and your
excepthad to know three exception types.After this, plugins wrap provider HTTP errors as
GenkitError. You write one branch.Retryalready skipsINVALID_ARGUMENTand waits outUNAVAILABLE/RESOURCE_EXHAUSTED, so a lot of that code goes away.Status names, not raw HTTP codes:
INVALID_ARGUMENT(retry skips)Retry-After: 60→RESOURCE_EXHAUSTED(wait 60s, then retry)UNAVAILABLE(retry)UNAVAILABLE(overloaded)NOT_FOUND(Fallbackcan try the next model)The reflection wire shows the provider text (
original_message), not the SDKrepr. Veostart()andcheck()polling are wrapped the same way.Typed model refs (#6104, #6105, #6074, #6138)
model=now takes a name or aModelRef. The constructor is what picks the config type, so a Gemini temperature and a Claudemax_output_tokenscannot silently ride onto the wrong model. Same slot onGenkit(),generate,generate_stream,generate_operation,define_prompt, and agents.A pasted
vertexai/…ormodels/…prefix is stripped and this plugin's namespace is stamped. Family constructors refuse ids they do not own (GoogleAI.gemini_model('veo-3.1-generate-001')tells you to useveo_model). Bedrock and Ollama still take a string name; they do not have a ref constructor yet.A typed config object has to belong to the model this call is about to hit. A dict,
None, or omittingconfigis left alone.Veneer
config=isModelConfigDict, so autocomplete works atgenerate()(#5989).Debug logs in the Dev UI (#6099)
Under
genkit start,generate()leaves named breadcrumbs on the span in the trace viewer's Logs panel:generate request resolved,calling model,executing tool requests,model responded. The terminal still honoursGENKIT_LOG, so you can keep the shared TTY quiet and still see the trail next to the span.Fixes & Polish
generate()or dumpshttpxtracebacks onto the sharedgenkit startTTY (fix(py): stop telemetry export from stalling generate() and dumping the shared TTY #5978).Access-Control-Allow-Origin(fix(py): remove wildcard CORS policy from reflection server #6198).gpt-image-1no longer sendsresponse_format(the endpoint rejects it). DALL-E still defaults tob64_json(fix(py/plugins/openai): omit response_format for gpt-image-1 #6167).include_usage) (fix(py/plugins/openai): populate token usage and request include_usage for streams #6229).gpt-5.1-codex,o3-pro, …) are gone from the OpenAI chat catalog. This plugin speaks Chat Completions (fix(py): remove Responses-API-only models from the OpenAI chat catalog and listing #6223).config={'translate': True}and routes to the translations API.gpt-4o-transcriberejectstranslateasINVALID_ARGUMENT(fix(py/openai): add Whisper translation support #6168).Existing API Changes
generate()no longer throws after the model has already replied. Code that caught a schema-mismatch, blocked, max-turns, or unknown-tool exception will not see it. Branch on the response:Provider HTTP failures are
GenkitError, not the raw SDK exception. Code that caughtAPIError/BadRequestError/APIStatusErrorfrom a plugin call will not see those types. Branch onerr.status:generate()on a Veo (or any background) model returns a ticket..messageisNone. Usegenerate_operation/check_operationto poll:check_operation/cancel_operationtake a liveOperation. A persist dump isOperation.model_validate(...)first. Passing the dump, a boxedModelResponse, or astrisINVALID_ARGUMENT:A typed config class that does not belong to the model is
INVALID_ARGUMENTat generate / prompt / agent definition time:Responses-only OpenAI ids no longer resolve from the chat catalog:
Decisions
generate()no longer throws after a model reply, Veo/background is a new surface, and typed config rejection is a new INVALID_ARGUMENT.py/bin/bump_version 0.11.0only.