Highlights
π Zod 4 support in LangChain is now GA!
// Use in structured outputs
import { z } from "zod/v4";
const model = new ChatOpenAI(...).withStructuredOutput(
z.object({
foo: z.string(),
bar: z.number(),
}),
);
// Use in tools
import { tool } from "@langchain/core/tools";
import { z } from "zod/v4";
const multiply = tool(
({ a, b }) => a * b
{
name: "multiply",
description: "Multiply two numbers",
schema: z.object({
a: z.number(),
b: z.number(),
}),
}
);
π΅ ChatAnthropic now supports using the built-in web search tool!
import { ChatAnthropic } from "@langchain/anthropic";
const model = new ChatAnthropic({
model: "claude-3-5-sonnet-20241022",
temperature: 0,
}).bindTools([
{
type: "web_search_20250305",
name: "web_search",
max_uses: 1,
},
]);
const result = await model.invoke([
new HumanMessage("What is Claude Shannon's birth date?"),
]);
π οΈ ChatOpenAI now supports the code interpreter, image gen, and remote MCP tools!
What's Changed
- release: zod 4 integrations releases by @hntrl in #8346
- ChatVertexAI: add prompt caching usage metadata by @keremnalbant in #8320
- fix(gemini): nullable properties in
withStructuredOutput
by @afirstenberg in #8326 - feat(google): Support TTS models by @afirstenberg in #8343
- release(google-*): 0.2.12 by @hntrl in #8359
- fix(google-*): bump downstream core dep for google packages by @hntrl in #8360
- Add Support for Anthropic's Built-in Tools by @bleafman in #8248
- Fix param in langchain-google-genai README by @MilanCancarevic in #8321
- patch(openai): upgrade sdk & defer zdr handling to openai by @hntrl in #8355
- feat: use run tree post/patch by @lc-arjun in #8350
- implement ollama streaming with tools by @karanravindra in #8307
- feat: add
ls_structured_output_format
tracing by @hntrl in #8368 - Add notIn filter support for pgvector by @yilinjuang in #8354
- chore(community): use distance_metric in turbopuffer call by @hntrl in #8371
- feat(google-genai): Add baseUrl property to embeddings by @schrothbn in #8235
- Fixed some typographical structuring issue in the RAG tutorial by @OVECJOE in #8337
- fix(core): implement proper token counting for mixed content in getNumTokens by @christian-bromann in #8341
- fix(openai): handle zdr cases with reasoning by @hntrl in #8374
- fix(core): Await default client batches when awaiting all callbacks, set default traced project from LangSmith by @jacoblee93 in #8373
- release(core): 0.3.59 by @jacoblee93 in #8376
- chore: update dependency: mongodb by @YasharF in #8280
- chore: upgrade to TypeScript 5.8 by @dqbd in #8315
- fix(docs): fix broken links across documentation by @christian-bromann in #8372
- feat: enhance VS Code workspace configuration by @christian-bromann in #8375
- fix(docs): missed formatting bug by @hntrl in #8381
- Update langchain-openai package.json to unpin specifc zod version by @tobymac-siro in #8380
- fix(tests): correct typos and formatting in standard tests README.md by @mdrxy in #8382
- fix(core): use input param for schema serialization by @hntrl in #8370
- minor(google): Upgrade Upgrade google-auth-library to latest major version (v10) by @afirstenberg in #8383
- minor(google-gauth): Upgrade google-auth-library to latest major version (v10) by @lbennett-stacki in #8365
- fix(google): Gemini 2 5 by @afirstenberg in #8384
- openai[minor]: upgrade sdk and support new built-in tools by @hntrl in #8324
- feat(google): Gemini thinking updates by @afirstenberg in #8363
- chore: upgrade turbo (Turborepo) by @YasharF in #8281
- release(google-*): 0.2.13 by @hntrl in #8391
- fix(ci): bump lockfile by @hntrl in #8392
- feat: add typed model IDs for chat and embedding models across providers by @christian-bromann in #8323
- fix(core): add custom key encoder and deprecate insecureHash by @manekinekko in #8379
- re-introduce openai's zodFunction function helper as it will ensure t⦠by @infiton in #8389
- fix(hf): Upgrade @huggingface dependencies by @YasharF in #8237
- refactor: update Ollama import and add fetch option to models by @Sergeant61 in #8396
- Fix(community): perplexity reasoning json parser error by @marvikomo in #8395
New Contributors
- @lnhsingh made their first contribution in #8352
- @bleafman made their first contribution in #8248
- @MilanCancarevic made their first contribution in #8321
- @lc-arjun made their first contribution in #8350
- @karanravindra made their first contribution in #8307
- @yilinjuang made their first contribution in #8354
- @schrothbn made their first contribution in #8235
- @OVECJOE made their first contribution in #8337
- @christian-bromann made their first contribution in #8341
- @YasharF made their first contribution in #8280
- @tobymac-siro made their first contribution in #8380
- @mdrxy made their first contribution in #8382
- @lbennett-stacki made their first contribution in #8365
- @manekinekko made their first contribution in #8379
- @infiton made their first contribution in #8389
- @Sergeant61 made their first contribution in #8396
- @marvikomo made their first contribution in #8395
Full Changelog: langchain==0.3.28...langchain==0.3.29