Skip to content

Release 0.3.29

Latest
Compare
Choose a tag to compare
@hntrl hntrl released this 20 Jun 02:22
· 1 commit to main since this release

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!

See the docs

What's Changed

New Contributors

Full Changelog: langchain==0.3.28...langchain==0.3.29