unstale

npm / @google/genai

@google/genai

What changed in @google/genai 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

18 breaking2 security6 deprecations178 new APIs and options1 performance10 behavior and defaults26 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

@google/genai 2164 changes

Breaking changes 12

  • Unsupported 2.5 and 1.6 models are removed from Interactions model options.

    2.29.0release notes

  • Removes an unused field from FunctionResultDelta.

    2.22.0release notes

  • Changes speech_config to a structured object.

    2.17.0release notes

  • HttpOptions.timeout is now a per-attempt deadline in the JS GenAI SDK.

    2.16.0release notes

  • Removes cached_content from interactions.

    2.11.0release notes

  • Removes frequency_penalty from interactions.

    2.11.0release notes

  • Removes presence_penalty from interactions.

    2.11.0release notes

  • Renames usage to total_usage in StreamMetadata.

    2.9.0release notes

  • Fixed the steps field so it is not optional.

    2.1.0release notes

  • The response_format field names were updated to snake_case, so developers should use the corrected names.

    2.0.1release notes

  • An SSE event is renamed to interaction.completed.

    2.0.0release notes

  • An SSE event is renamed to interaction.created.

    2.0.0release notes

Security 1

  • Adds prompt injection detection for the Gemini API Computer Use feature.

    2.6.0release notes

Deprecations 6

  • Marks REQUIRES_ACTION in the live connection status enum as deprecated.

    2.18.0release notes

  • Adds deprecation warnings when edit_images uses prompt, text, or image arguments; it will be removed in the next major version.

    2.14.0release notes

  • Adds deprecation warnings when generate_images uses prompt, text, or image arguments; it will be removed in the next major version.

    2.14.0release notes

  • Adds deprecation warnings when generate_videos uses prompt, text, or image arguments; it will be removed in the next major version.

    2.14.0release notes

  • Adds deprecation warnings for LiveConnectConfig.GenerationConfig, which will be removed in the next major version.

    2.14.0release notes

  • The legacy response_format is deprecated for interactions.

    2.0.0release notes

New APIs and options 119

  • Adds gemini-4-argon to the Model enum, making it available as a model choice.

    2.30.0release notes

  • Billable token count fields are now available.

    2.29.0release notes

  • Interactions can now report a CONTINUATION_REQUIRED status.

    2.29.0release notes

  • The Interactions interaction.status_update event now includes a continuation token.

    2.29.0release notes

  • Transcription now includes an endOffset field.

    2.29.0release notes

  • Streaming continuation usage metadata accumulates and exposes the initial prompt token count.

    2.29.0release notes

  • InteractionStatusUpdate events now include usage.

    2.29.0release notes

  • RealtimeInputConfig now supports interimTranscriptTimestampEnabled.

    2.29.0release notes

  • Transcription now includes a startOffset field.

    2.29.0release notes

  • Environment network config now supports setting allowlist to "disabled".

    2.28.0release notes

  • Interactions supports continuation_token.

    2.27.0release notes

  • The Interactions Model enum adds lyria-3.5, gemini-omni-1.1-flash, and gemini-omni-flash-preview.

    2.27.0release notes

  • GenerateContent supports continuation_token.

    2.26.0release notes

  • Adds from_environment support for the environments dedicated module.

    2.25.0release notes

  • Adds gcs_metrics_uri for exporting tuning job metrics.

    2.25.0release notes

  • Adds the Gemini 3.8 Flash Lite TTS model to the SDK.

    2.25.0release notes

  • Adds the Gemini 3.8 Flash TTS model to the SDK.

    2.25.0release notes

  • Adds support for labels in LiveClientSetup.

    2.25.0release notes

  • Adds support for labels in Gemini API GenerateContent.

    2.25.0release notes

  • Supports field.value_field syntax for map add_union_value annotations.

    2.24.0release notes

  • Adds sample_audio to Voice in the GAOS SDK.

    2.24.0release notes

  • Exposes SpeechAnnotation in the public GenAI SDKs.

    2.24.0release notes

  • Exposes SpeechMetadata in the public GenAI SDKs.

    2.24.0release notes

  • Adds the Voices API resource to the GAOS SDK.

    2.24.0release notes

  • The credential APIs resource is wired into the SDK, making the resource available to developers.

    2.23.0release notes

  • Adds environments files upload and download support to the TypeScript SDK.

    2.23.0release notes

  • Adds support for custom fetch in HttpOptions.

    2.23.0release notes

  • Adds RetrievalCallStep to the interactions schema and SDKs.

    2.23.0release notes

  • Adds RetrievalResultStep to the interactions schema and SDKs.

    2.23.0release notes

  • Adds from_environment support for copying environment values.

    2.22.0release notes

  • The SDK adds the Gemini 3.8 Flash model.

    2.21.0release notes

  • Support was added for the audio/webm MIME type.

    2.20.0release notes

  • ProcessingCallStep is now exposed in the Interactions SDK.

    2.20.0release notes

  • ProcessingResultStep is now exposed in the Interactions SDK.

    2.20.0release notes

  • SDK support for translation_config was added for GEAP.

    2.20.0release notes

  • Video Understanding support was added to the Interactions API.

    2.20.0release notes

  • Adds AudioTranscriptionConfigMode for configuring audio transcription.

    2.19.0release notes

  • Adds support for environment files.

    2.19.0release notes

  • Adds a helper for downloading scotty files.

    2.19.0release notes

  • Adds TYPE_JPEG2000 to the VideoContent.MimeType enum.

    2.19.0release notes

  • Adds a mode enum with VERBATIM and SMART values to AudioTranscriptionConfig.

    2.18.0release notes

  • Adds BidiGenerateContentSetup.

    2.18.0release notes

  • Adds extension task parameters.

    2.18.0release notes

  • Adds IDLE as a state in the live connection status enum.

    2.18.0release notes

  • Adds step_count to ReinforcementTuningHyperParameters.

    2.18.0release notes

  • Adds enable_data_retention to ToolParallelAiSearch.

    2.18.0release notes

  • Adds a mode enum with VERBATIM and SMART values to TranscriptionConfig.

    2.18.0release notes

  • Adds video resolution parameters.

    2.18.0release notes

  • Adds support for gemini-3.7-flash.

    2.17.1release notes

  • Adds interaction_status to LiveServerContent.

    2.17.0release notes

  • Adds TOO_MANY_TOOL_CALLS to the FinishReason enum.

    2.16.0release notes

  • Adds the Gemini Robotics ER 2 Preview model.

    2.16.0release notes

  • Adds a top-level errors array to the Interaction resource (iAPI).

    2.16.0release notes

  • Adds an environment resource and wires its service into the SDK.

    2.15.0release notes

  • GoogleMaps Tool supports the places and routing grounding types.

    2.15.0release notes

  • The JS GenAI SDK API Client supports per-request retry options.

    2.15.0release notes

  • Adds a flat language_codes field to AudioTranscriptionConfig.

    2.14.0release notes

  • Allows using an API key together with project and location for enterprise mode.

    2.14.0release notes

  • Adds audio_transcription_config to GenerationConfig for audio transcription.

    2.14.0release notes

  • Adds audio_transcription to Part for audio transcription.

    2.14.0release notes

  • A new custom_vocabulary field is available in the Live API.

    2.13.0release notes

  • A model selector is added.

    2.13.0release notes

  • The interaction proto adds a queued status.

    2.13.0release notes

  • Adds AntigravityAgentConfig to the OpenAPI schema overlays and regenerated SDKs.

    2.12.0release notes

  • Adds CodeMenderAgentConfig to interactions.

    2.12.0release notes

  • Adds support for preserving custom headers for gaos.

    2.12.0release notes

  • Adds history config.

    2.12.0release notes

  • Adds a Triggers resource to the GoogleGenAI client.

    2.12.0release notes

  • Adds environment_id to network config.

    2.11.0release notes

  • Supports function declarations during agent creation.

    2.11.0release notes

  • Exposes labels in interactions.

    2.11.0release notes

  • Adds response_format to GenerationConfig.

    2.11.0release notes

  • Adds a retrieval result step and new fields to maps and search results.

    2.11.0release notes

  • Exposes safety_settings in interactions.

    2.11.0release notes

  • Adds Tool.exa_ai_search for the Gemini Enterprise API.

    2.11.0release notes

  • Adds Translation_config to GenerationConfig.

    2.11.0release notes

  • Adds voice consent signature types across SDK languages.

    2.11.0release notes

  • Adds disabled_safety_policies to ComputerUse in Interactions and Models.

    2.10.0release notes

  • Adds response format parameters.

    2.10.0release notes

  • Adds usage fields for steps.

    2.10.0release notes

  • Adds video generation support.

    2.10.0release notes

  • Adds adaptationPhrases to AudioTranscriptionConfig.

    2.9.0release notes

  • Adds LanguageAuto to AudioTranscriptionConfig.

    2.9.0release notes

  • Adds LanguageHints to AudioTranscriptionConfig.

    2.9.0release notes

  • Exposes Computer Use API fields.

    2.9.0release notes

  • Introduces gaos SDK libraries.

    2.9.0release notes

  • Adds interimInputTranscription to LiveServerContent.

    2.9.0release notes

  • Adds cached_content to models.proto for the interaction API.

    2.9.0release notes

  • Adds frequency_penalty to models.proto for the interaction API.

    2.9.0release notes

  • Adds presence_penalty to models.proto for the interaction API.

    2.9.0release notes

  • Adds ServiceTier to UsageMetadata.

    2.9.0release notes

  • Adds audioOffset to VoiceActivity.

    2.9.0release notes

  • Adds a transcription language code.

    2.8.0release notes

  • Adds ReinforcementTuning support and the ValidateReward API method to the GenAI SDK.

    2.8.0release notes

  • Adds TranslationConfig for live translation.

    2.8.0release notes

  • Enables the BigQuery tool in Deep Research configuration.

    2.7.0release notes

  • Adds support for the computer_use field on Vertex.

    2.7.0release notes

  • Adds Skill Registry DeleteSkill support to the SDK.

    2.7.0release notes

  • Adds Skill Registry ListSkills support to the SDK.

    2.7.0release notes

  • Adds support for Reinforcement Tuning in the GenAI SDK.

    2.7.0release notes

  • Allows text/csv as a supported document MIME type for the Interaction API.

    2.7.0release notes

  • Adds a budget_exceeded status.

    2.6.0release notes

  • Adds the gemini-3.5-flash model.

    2.5.0release notesrelease notes

  • Support for the Agent API is added.

    2.4.0release notes

  • Support for the Environment API is added.

    2.4.0release notes

  • Adds interaction.output_audio.

    2.3.0release notes

  • Adds interaction.output_image.

    2.3.0release notes

  • Adds interaction.output_text.

    2.3.0release notes

  • Adds interaction.output_video.

    2.3.0release notes

  • Adds an arguments field to the ArgumentDelta type.

    2.2.0release notes

  • Adds the missing FunctionCallResultDelta type.

    2.2.0release notes

  • Added support for blocking FunctionCall in the Live API on AgentPlatform (Vertex).

    2.1.0release notes

  • Added gemini-3.1-flash-lite to the available model options.

    2.1.0release notes

  • Added support for the Vertex-lyria lyria-3-clip-preview model.

    2.1.0release notes

  • Added support for the Vertex-lyria lyria-3-pro-preview model.

    2.1.0release notes

  • Added parameters to video response_format.

    2.1.0release notes

  • Introduced support for server-side tools deltas.

    2.1.0release notes

  • A new polymorphic field is published for interactions.

    2.0.0release notes

  • Interactions support steps.

    2.0.0release notes

Performance 1

  • Keeps the Buffer in the Node tokenizer platform for approximately 2x faster model parsing.

    2.19.0release notes

Behavior and default changes 7

  • The client automatically consumes the continuation token.

    2.29.0release notes

  • Default HTTP timeouts are raised so long-running requests are not killed client-side.

    2.29.0release notes

  • Exposes VoiceConfig.voice in the public GenAI SDKs.

    2.24.0release notes

  • Makes the deferred service tier publicly available on Vertex.

    2.17.0release notes

  • ASR fields are made public in v1main and Interactions.

    2.13.0release notes

  • Embedding responses for gemini-embedding-2 now populate prompt token counts per modality.

    2.12.0release notes

  • Async generate_content supports Agent Platform MCP.

    2.8.0release notes

Fixes and other changes 18

  • When a continuation hop returns no candidates, continuation state is cleared and prompt feedback is preserved.

    2.30.0release notes

  • Continuation streams retry dropped hops, stop on prompt_feedback, and preserve real errors in generate_content.

    2.30.0release notes

  • Types GeminiNextGen signatures with public, importable names.

    2.30.0release notes

  • Fixes grounding metadata merging during automatic continuation in generate content and generate content stream.

    2.30.0release notes

  • Concatenates output_text across multi-step model responses in a turn.

    2.29.1release notes

  • Incomplete continuation stream turns are no longer recorded in curated chat history.

    2.29.0release notes

  • The env schema now maps keys to EnvVar or string.

    2.29.0release notes

  • Streaming continuation handling fixes stale-token, AbortError, initial prompt token count, and intermediate finishReason edge cases.

    2.29.0release notes

  • Streaming generation resumes from the latest checkpoint continuation token after mid-stream errors or cutoffs.

    2.29.0release notes

  • Uses CreateAgentInteraction for Trigger.interaction and TriggerCreateParams.interaction.

    2.25.0release notes

  • Uses CreateAgentInteraction for TriggerCreateParams.interaction and Trigger.interaction.

    2.25.0release notes

  • Adds @ts-ignore before optional MCP imports in declaration files.

    2.22.0release notes

  • Repairs the node fallback manifest and completes web entries.

    2.22.0release notes

  • Redundant Content-Length is no longer set on file upload requests.

    2.20.0release notes

  • The setupComplete key in LiveClientMessage is now quoted.

    2.20.0release notes

  • Accepts both a dict and a list of dicts for transform.

    2.11.0release notes

  • Fixes output_text for turns that don't end with text.

    2.4.0release notes

  • Fixes a timeout that was not functioning.

    2.0.0release notes

@google/genai 177 changes

Breaking changes 6

  • Replaces the more ambiguous rate field with sample_rate.

    1.51.0release notes

  • The webhooks.retrieve API was renamed to webhooks.get.

    1.50.1release notes

  • The Interactions ContentDelta unions were renamed, requiring updates to code that uses them.

    1.46.0release notes

  • Interactions renamed rendered_content to search_suggestions.

    1.46.0release notes

  • TextContent annotations now use specific citation types, changing the Interactions API.

    1.46.0release notes

  • Changed the Interactions media MIME type to an enum, a breaking change for the experimental feature.

    1.43.0release notes

Security 1

  • Adds ModelArmorConfig support for prompt and response sanitization via the Model Armor service.

    1.38.0release notes

New APIs and options 59

  • Adds multimodal file search.

    1.52.0release notes

  • Adds output_info to BatchJob.

    1.51.0release notes

  • Introduces an enterprise flag.

    1.51.0release notes

  • Adds custom_metadata to FileCitation.

    1.51.0release notes

  • Adds media_id to FileCitation.

    1.51.0release notes

  • Adds page_number to FileCitation.

    1.51.0release notes

  • Adds the gemini-3.1-flash-tts-preview model to options.

    1.51.0release notes

  • Adds new Gemini Deep Research agent models.

    1.51.0release notes

  • Introduces the GOOGLE_GENAI_USE_ENTERPRISE environment variable.

    1.51.0release notes

  • Adds ImageResizeMode for GenerateVideos.

    1.51.0release notes

  • Adds a grounding tool usage breakdown to Interaction Usage.

    1.51.0release notes

  • Adds Vertex Dataset input and output options for batch jobs.

    1.51.0release notes

  • Audio support now includes the opus, alaw, and mulaw MIME types.

    1.50.0release notes

  • New fields are available on DeepResearchAgentConfig.

    1.50.0release notes

  • New fields are available for Live Avatar.

    1.50.0release notes

  • The EU service location is now supported for the Vertex AI platform.

    1.50.0release notes

  • Webhook support and webhook configuration were added to the SDK, including for batch creation and video generation.

    1.50.0release notes

  • Introduces TYPE_L16 audio content and optional fields.

    1.49.0release notes

  • Adds dedicated TextAnnotationDelta support for streaming tool responses.

    1.48.0release notes

  • Adds custom metadata to FileSearchResult.

    1.47.0release notes

  • Distillation tuning now supports hyperparameters.

    1.47.0release notes

  • Adds a labels field to Veo configs.

    1.47.0release notes

  • Adds a MIME type for Audio content.

    1.47.0release notes

  • Adds model status to GenerateContentResponse for the Gemini API.

    1.47.0release notes

  • Adds part metadata to Part for the Gemini API.

    1.47.0release notes

  • Adds rendered parts to GroundingSupport.

    1.47.0release notes

  • Adds service tier configuration for interactions.

    1.47.0release notes

  • Adds service tier configuration to GenerateContent.

    1.47.0release notes

  • Adds supported models to ModelOptions.

    1.47.0release notes

  • Adds TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO to TurnCoverage.

    1.47.0release notes

  • Interactions now supports Google Maps.

    1.46.0release notes

  • The genai API now supports include_server_side_tool_invocations.

    1.46.0release notes

  • Signature fields were added and updated for tool call and result content types.

    1.46.0release notes

  • Adds inference_generation_config to EvaluationConfig for Tuning.

    1.45.0release notes

  • Enables language code in the audio transcription config for the Live API on Vertex AI.

    1.45.0release notes

  • Adds the gemini-3.1-flash-image-preview model.

    1.44.0release notes

  • Supports signature for all Interaction tool types.

    1.44.0release notes

  • Added gemini-3.1-pro-preview to the list of models in Interactions.

    1.43.0release notes

  • Added Image Grounding support to the GoogleSearch tool.

    1.43.0release notes

  • Supports multimodal embedding for Gemini Embedding 2.0 and MaaS models in the Vertex AI API.

    1.42.0release notes

  • Tuning job creation configuration supports encryption_spec.

    1.41.0release notes

  • Interaction status now includes INCOMPLETE.

    1.41.0release notes

  • Retry options are passed to the underlying Interactions client.

    1.41.0release notes

  • Adds support for distillation tuning.

    1.39.0release notes

  • Adds the include_input query parameter to the Get Interaction endpoint.

    1.39.0release notes

  • Adds support for OSS Tuning in the GenAI SDK.

    1.39.0release notes

  • Adds registerFiles to use GCS files with mldev.

    1.39.0release notes

  • Allows custom endpoints for authentication with Vertex AI in TypeScript.

    1.38.0release notes

  • Interactions now supports 4:5 and 5:4 aspect ratios.

    1.37.0release notes

  • Adds FileSearchCallContent to Interactions.

    1.36.0release notes

  • Adds ImageConfig to GenerationConfig for image generation in Interactions.

    1.36.0release notes

  • Adds support for a JavaScript local tokenizer.

    1.36.0release notes

  • Adds voice activity support.

    1.36.0release notes

  • Adds PersonGeneration to ImageConfig for Vertex Gempix.

    1.35.0release notes

  • Defines and uses DocumentMimeType for DocumentContent.

    1.34.0release notes

  • Adds ultra high resolution as a media resolution option in Parts.

    1.34.0release notes

  • Adds multi-speaker support for Vertex AI.

    1.34.0release notes

  • Adds support for Struct in ToolResult Content.

    1.34.0release notes

  • Adds minimal and medium thinking levels.

    1.34.0release notes

Behavior and default changes 3

  • Interactions content supports more image and audio MIME types.

    1.47.0release notes

  • Enables server side MCP when configured and disables all other AFC in that case.

    1.43.0release notes

  • The SDK supports HTTP retries.

    1.41.0release notes

Fixes and other changes 8

  • Webhook types were refactored for easier use.

    1.50.1release notes

  • This release has known webhook SDK issues; developers implementing or relying on webhooks should use v1.51.0 or later.

    1.50.0release notes

  • Fixes the service_tier enums.

    1.48.0release notes

  • Fixes support for US region routing.

    1.47.0release notes

  • The functionResponses key in LiveClientMessage is now quoted.

    1.46.0release notes

  • Supports more image sizes and resolutions.

    1.43.0release notes

  • Adds metadata to the batch inlined response.

    1.39.0release notes

  • Updates data types from the discovery document.

    1.38.0release notesrelease notes