# What changed in @langchain/google-genai

> 29 changes in @langchain/google-genai 0.3 to 2 from its official release notes, upgrade guides and advisories: 3 breaking, 1 security, 7 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/@langchain/google-genai/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @langchain/google-genai 2

### Breaking changes

- Non-streaming calls throw a typed, catchable error when a Gemini candidate has no content, rather than silently returning empty content or an empty generations array. (2.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.3.0)
- invoke() throws ModelAbortError with accumulated partialOutput when aborted during streaming with streaming callback handlers. (2.1.14) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.14)
- When includeThoughts is enabled, thinking and text content are returned in separate blocks. (2.1.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.8)

### New APIs and options

- Adds the outputDimensionality parameter to GoogleGenerativeAIEmbeddings, allowing developers to specify the output dimensionality. (2.3.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.3.2)
- ChatGoogleGenerativeAI accepts GEMINI_API_KEY as a fallback environment variable. (2.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.3.0)
- Structured output now supports standard schemas. (2.1.24) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.24)
- Custom headers can now be added when using ChatGoogleGenerativeAI. (2.1.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.0)
- createAgent now supports custom agent names. (2.1.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.0)

### Performance

- Stream chunk aggregation is optimized and redundant sorting is removed, improving performance. (2.1.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.11)

### Behavior and default changes

- When LANGSMITH_GATEWAY is set, supported Gemini chat models route requests through the gateway's Gemini path, unless explicit baseUrl/endpoint, apiKey, or Vertex AI configuration suppresses routing. (2.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.3.0)
- Adds native event conversion for streamEvents. (2.2.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.2.0)
- Runnable traces now include package version metadata, making version information available in LangSmith trace metadata. (2.1.21) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.21)
- Model profiles were updated, which may affect decisions based on profile information. (2.1.19) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.19)

### Fixes and other changes

- The streaming path safely skips a contentless chunk instead of throwing a raw TypeError. (2.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.3.0)
- Google providers now support ContentBlock.Multimodal types. (2.1.26) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.26)
- Thinking content blocks now round-trip in multi-turn conversations. (2.1.26) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.26)
- Fixes optional chaining for candidateContent in reduce. (2.1.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.25)
- Empty strings in enum values are validated to provide clear errors instead of cryptic runtime errors from the Gemini API. (2.1.14) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.14)
- Abort signals are checked and propagated for invoke and streaming operations, enabling cancellation and allowing fallback chains to proceed when a runnable is aborted. (2.1.14) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.14)
- stream() throws a regular AbortError when aborted, because chunks have already been yielded to the caller. (2.1.14) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.14)
- ChatGoogleGenerativeAI with outputVersion: "v1" now handles tool_call content blocks, avoiding an "Unknown content type tool_call" error with standard LangChain tool call blocks. (2.1.12) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.12)
- Reasoning tokens are now properly elevated. (2.1.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.8)
- Access around custom content parts is now safe. (2.1.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%402.1.0)

## @langchain/google-genai 1

### New APIs and options

- ChatGoogleGenerativeAI now supports thinkingConfig. (1.0.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%401.0.3)
- Usage metadata now includes cached token counts. (1.0.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%401.0.3)

### Behavior and default changes

- Usage metadata now includes tier-based token counts. (1.0.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%401.0.3)
- Adds thought signature support for function calling. (1.0.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%401.0.2)

### Fixes and other changes

- Fixes a bug with thought signatures during streaming. (1.0.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/google-genai%401.0.3)

## @langchain/google-genai 0.3

### Security

- Fixes CVE 2025 12735. (0.3.58) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/0.3.58)
