Vibeleaderboard
← All Intel
Intel / repo

python-genai v2.32.0

Source
github.com
Author
release-please[bot]
Date

Context

The headline feature in python-genai 2.32.0, Google's Python SDK for Gemini, is for the Live API, which keeps a long-running session open for real-time conversation. Until now, a session's system instruction and tools were fixed when it began. The new send_context_update method lets an application change either one mid-session; only the fields passed are updated, an empty list clears the tools, and the docstring says updates are processed in order with the session's other inputs. That makes it possible, for example, to give a voice a new set of tools when the conversation moves to a different task, without starting over.

The docstring also gives a cost warning: the system instruction and tools sit at the start of what the model reads, so changing them invalidates the prefix cache, and Google advises updating them only when strictly necessary because of a possible performance impact. A separate fix in the same release matters to Live API users who return images from tools. As described in issue 3022, send_tool_response crashed with a JSON serialisation error when a function response contained raw image bytes, so the response was never sent. The SDK now base64-encodes those bytes. Other changes include a new generation_output_config option and a fix for responses with JSON objects in loosely typed fields.

Terms in this piece · Glossary
  • streaming — Sending a model's response token by token as it is generated, so the reader sees text immediately instead of waiting for the whole answer.
  • context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
  • AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
Recommended reads
Comments

Checking sign-in…

Loading comments…