Vibeleaderboard
← All Intel
Intel / repo

python-genai v2.34.0

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

Context

python-genai is Google's official Python library for Gemini models on the Gemini Developer API and Vertex AI. Version 2.34.0 (release notes) mostly changes the Interactions API, Google's interface that stores each conversation turn or task as an interaction on the server. Its biggest change concerns very long outputs. A request that is not run in the background can produce only a capped number of output . This release adds a continuation_token, which a capped output returns alongside a requires_continuation status, and you pass that token back unchanged to continue. Google's long-decode documentation still lists this kind of client-side continuation as coming soon for the Interactions API, and for now points to background execution, where the server itself continues long outputs in 64K-token hops. The library's support may therefore arrive before the server's.

The library can also do the continuing for you. According to the commit that added automatic_continuation, the option defaults to on, so a plain create() call sends the follow-up requests itself and returns the whole output as one result; setting it to False returns only the first server response. behaves differently. Events from every hop arrive on the same stream, and the commit tells developers to treat an interaction.completed event whose status is requires_continuation as intermediate. A stream handler that treats the first completed event as the end will stop after one hop, so stream handlers are the place to check after upgrading.

Two other changes decide who should upgrade. The release drops support for Python 3.10, so projects still on 3.10 cannot move to it. It also fixes a bug that saved per-request Authorization and X-Server-Timeout headers into the client's default headers. The bug report describes the effect on Vertex AI: if an ordinary REST call ran before the Interactions API was first used, Interactions requests kept sending that first access token for the life of the process and began failing with 401 errors once it expired, after about an hour. Long-running servers are the ones that hit this. The JavaScript library's matching release carries the same continuation changes but does not list this header fix.

Key takeaways · AI-distilled
  • python-genai 2.34.0 drops support for Python 3.10 and adds support for Python 3.15.
  • Interactions gain continuation support: a continuation_token and requires_continuation status, automatic_continuation on interactions.create, and continuation_ids declared on Interaction.
  • The SDK now supports video understanding in the Gemini Developer API and adds a video upscale task parameter.
  • A fix stops per-request Authorization and X-Server-Timeout headers from leaking into the client's default headers.
Terms in this piece · Glossary
  • 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.
  • token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
  • 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.
More from release-please[bot]
Recommended reads
Comments

Checking sign-in…

Loading comments…