pypi / google-genai
google-genai
What changed in google-genai 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
1 breaking1 security9 new APIs and options2 behavior and defaults11 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initgoogle-genai 224 changes
Breaking changes 1
Unsupported 2.5 and 1.6 models are removed from Interactions model options.
Security 1
Matches the mTLS endpoint to each transport's SSL context, including plain aiohttp.
New APIs and options 9
Adds gemini-4-argon to the Model enum, making it available as a model choice.
Generate content and generate content stream can automatically resume continuation tokens; this behavior is disabled by default.
New fields provide billable token counts.
Interactions adds a CONTINUATION_REQUIRED status.
The Interactions interaction.status_update event now includes a continuation token.
Streaming continuation usage metadata is accumulated and exposes initial_prompt_token_count.
InteractionStatusUpdate events now include usage.
RealtimeInputConfig gains interimTranscriptTimestampEnabled.
Transcription gains startOffset and endOffset fields.
Behavior and default changes 2
The chats module now automatically resumes continuation tokens.
Default HTTP timeouts are raised so long-running requests are not killed client-side.
Fixes and other changes 11
Clears continuation state and preserves prompt feedback when a continuation hop returns no candidates.
Retries dropped hops, stops on prompt_feedback, and preserves real errors in generate_content.
Fixes parsing of function declarations that use union types.
Fixes grounding metadata merging during automatic continuation in generate content and generate content stream.
Concatenates output_text across multi-step model responses in a turn.
Incomplete continuation stream turns are no longer recorded in curated chat history.
The env schema now maps keys to EnvVar or string.
The httpx and websocket transports now use the mTLS endpoint.
A stale checkpoint token is discarded when the finish reason is non-resumable.
Intermediate CONTINUATION finish_reason values are cleared during streaming continuation.
Streaming generation resumes from the latest checkpoint continuation token after mid-stream errors or cutoffs.