Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@langchain/google-genai

Package Overview
Dependencies
Maintainers
12
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@langchain/google-genai - npm Package Compare versions

Comparing version
2.1.11
to
2.1.12
+8
-0
CHANGELOG.md
# @langchain/google-genai
## 2.1.12
### Patch Changes
- [#9788](https://github.com/langchain-ai/langchainjs/pull/9788) [`82080b5`](https://github.com/langchain-ai/langchainjs/commit/82080b5e6131e791113b262525ee1e9aa21298db) Thanks [@SkrOYC](https://github.com/SkrOYC)! - fix: handle "tool_call" content blocks in ChatGoogleGenerativeAI with outputVersion: "v1"
Previously, using `outputVersion: "v1"` with `ChatGoogleGenerativeAI` would throw an "Unknown content type tool_call" error when processing tool calls generated by LangChain's `AIMessage`. This fix adds a handler for the `tool_call` block type in the conversion utility, ensuring compatibility with standard LangChain tool call blocks.
## 2.1.11

@@ -4,0 +12,0 @@

+4
-0

@@ -145,2 +145,6 @@ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');

} };
else if (content.type === "tool_call") return { functionCall: {
name: content.name,
args: content.args
} };
else if (content.type?.includes("/") && content.type.split("/").length === 2 && "data" in content && typeof content.data === "string") return { inlineData: {

@@ -147,0 +151,0 @@ mimeType: content.type,

@@ -144,2 +144,6 @@ import { jsonSchemaToGeminiParameters, schemaToGenerativeAIParameters } from "./zod_to_genai_parameters.js";

} };
else if (content.type === "tool_call") return { functionCall: {
name: content.name,
args: content.args
} };
else if (content.type?.includes("/") && content.type.split("/").length === 2 && "data" in content && typeof content.data === "string") return { inlineData: {

@@ -146,0 +150,0 @@ mimeType: content.type,

+1
-1
{
"name": "@langchain/google-genai",
"version": "2.1.11",
"version": "2.1.12",
"description": "Google Generative AI integration for LangChain.js",

@@ -5,0 +5,0 @@ "author": "LangChain",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet