gs-port / node_modules /@langchain /core /CHANGELOG.md
Scribbler310's picture
feat: enhance dashboard
c2b7eb3 verified

@langchain/core

1.1.43

Patch Changes

  • #10814 dfec1b7 Thanks @hntrl! - fix(google): restore structured output parsing with includeRaw and reasoning blocks

    Ensure structured output parsers read BaseMessage text content when includeRaw: true, so responses that include reasoning/thought blocks plus JSON text continue to parse correctly.

  • #10772 1ba7131 Thanks @christian-bromann! - chore(core): new stream primitives

1.1.42

Patch Changes

  • #10776 20a9abe Thanks @hntrl! - fix(deps): remediate uuid vulnerability by removing direct uuid usage

1.1.41

Patch Changes

1.1.40

Patch Changes

  • #10694 d3e0809 Thanks @hntrl! - refactor(core): decouple tracer-only metadata defaults from runnable metadata
    • Add tracer-scoped inheritable metadata/tag options in callback manager while keeping backward-compatible aliases.
    • Move configurable-to-tracing metadata derivation into a tracer-only path and keep ensureConfig metadata mirroring limited to model.
    • Update LangChainTracer default metadata/tag handling and add regression tests for stream events metadata behavior.

1.1.39

Patch Changes

1.1.38

Patch Changes

1.1.37

Patch Changes

  • #10511 6933769 Thanks @hntrl! - cache Zod-to-JSON-Schema conversions in toJsonSchema()

  • #10541 50d5f32 Thanks @jacoblee93! - revert: Revert "feat(core): Add all chat model/llm invocation params to metadata"

  • #10509 5552999 Thanks @hntrl! - feat(openai): add support for phase parameter on Responses API messages

    • Extract phase from message output items and surface it on text content blocks
    • Support phase in streaming via response.output_item.added events
    • Round-trip phase through both raw provider and standard content paths
    • Move phase into extras dict in the core standard content translator
  • #10528 8331833 Thanks @christian-bromann! - fix(core): normalize single-block content in mergeContent

1.1.36

Patch Changes

  • #10512 bbbfea1 Thanks @hntrl! - fix(core): fix streaming chunk merge for providers without index on tool call deltas

    _mergeLists now falls back to id-based matching when items don't have an index field. Previously, providers routing through the OpenAI-compatible API without index on streaming tool call deltas (e.g. Anthropic models via ChatOpenAI) would accumulate hundreds of individual raw deltas in tool_call_chunks and additional_kwargs.tool_calls instead of merging them into a single entry per tool call. In a real trace with 3 concurrent subagents, this caused a single AI message to balloon from ~4KB to 146KB -- with 826 uncollapsed streaming fragments carrying a few bytes each.

    Also fixes SystemMessage.concat() which used ...this to spread all instance properties (including lc_kwargs) into the new constructor, causing each chained concat() call to nest one level deeper. After 7 middleware concat() calls (typical in deepagents), a 7KB system prompt would serialize to 81KB due to content being duplicated at every nesting level.

1.1.35

Patch Changes

  • #10327 5dc11b5 Thanks @hntrl! - fix(core): replace exported zod type references with structural duck-type interfaces to fix TypeScript OOM

    Replaces all exported Zod type references (z3.ZodType, z4.$ZodType, etc.) in @langchain/core's public API with minimal structural ("duck-type") interfaces. This prevents TypeScript from performing expensive deep structural comparisons (~3,400+ lines of mutually recursive generics) when downstream packages resolve a different Zod version than @langchain/core, which was causing OOM crashes and unresponsive language servers in monorepo setups.

  • #10433 7af0b65 Thanks @tanushree-sharma! - feat: Add LangSmith integration metadata to createAgent and initChatModel

1.1.34

Patch Changes

1.1.33

Patch Changes

1.1.32

Patch Changes

  • #10330 26488b5 Thanks @hntrl! - fix(core): treat empty string tool call chunk IDs as missing during merge

    Fixed _mergeLists in message base to treat empty string "" IDs the same as null/undefined when merging tool call chunks. This fixes old completions-style streaming where follow-up chunks carry id: "" instead of undefined, which previously prevented chunks from being merged by index.

  • #10167 ca826f6 Thanks @colifran! - feat: implement type inference for tool streams

  • #10334 a602c42 Thanks @maahir30! - fix(core): add JSDoc docstrings to fakeModel builder API and export FakeBuiltModel

  • #10254 db7d017 Thanks @pawel-twardziak! - fix(core): preserve thoughtSignature in array content during streaming with thinking models

1.1.31

Patch Changes

  • #10271 7373b4c Thanks @jacoblee93! - feat(core): Use uuid7 instead of v4 for generating run ids

  • #10262 b0175a5 Thanks @maahir30! - fix: Move fakeModel from utils/testing to testing namespace move to updated namespace

  • #10185 414f6ed Thanks @maahir30! - feat: add custom Vitest matchers for LangChain message and tool call assertions

    Adds a new @langchain/core/testing/matchers export containing custom Vitest matchers (toBeHumanMessage, toBeAIMessage, toBeSystemMessage, toBeToolMessage, toHaveToolCalls, toHaveToolCallCount, toContainToolCall, toHaveToolMessages, toHaveBeenInterrupted, toHaveStructuredResponse) that external users can register via expect.extend(langchainMatchers) in their Vitest setup files. Re-exported from langchain for convenience.

1.1.30

Patch Changes

  • #10243 96c630d Thanks @hntrl! - fix: add explicit : symbol type annotations to Symbol.for() declarations for cross-version compatibility

    TypeScript infers unique symbol type when Symbol.for() is used without an explicit type annotation, causing type incompatibility when multiple versions of the same package are present in a dependency tree. By adding explicit : symbol annotations, all declarations now use the general symbol type, making them compatible across versions while maintaining identical runtime behavior.

    Changes:

    • Added : symbol to MESSAGE_SYMBOL in messages/base.ts
    • Added : symbol to MIDDLEWARE_BRAND in agents/middleware/types.ts (also changed from Symbol() to Symbol.for() for cross-realm compatibility)
  • #10256 a8b9ccc Thanks @colifran! - fix(core): standard schema type guards don't support callable schemas

  • #10204 a1f22bb Thanks @colifran! - feat(core): implement standard schema support for structured output

1.1.29

Patch Changes

  • #10106 9f30267 Thanks @hntrl! - Add package version metadata to runnable traces. Each package now stamps its version in this.metadata.versions at construction time, making version info available in LangSmith trace metadata.

  • #10154 403a99f Thanks @kanweiwei! - fix(core): add usage_metadata to AIMessage lc_aliases

  • #10169 3b1fd54 Thanks @hntrl! - fix(core, langchain): bump uuid dependency from ^10.0.0 to ^11.0.0 to fix Metro bundler error

    The uuid v10 package has ambiguous exports in its package.json which causes Metro (used by Expo/React Native) to resolve the wrong entry point, resulting in Cannot read properties of undefined (reading 'v1'). The uuid v11 package fixes its exports map to work correctly with Metro's package exports resolution.

  • #10044 77bd982 Thanks @hntrl! - fix(core): remove inherited LangChainTracer handlers when tracingEnabled is false

    When a RunTree explicitly disables tracing via tracingEnabled: false, CallbackManager._configureSync now strips any inherited LangChainTracer handlers so child runs don't produce traces.

1.1.28

Patch Changes

  • #10140 10a876c Thanks @hntrl! - Merge content blocks by string index during streaming.

  • #10102 b46d96a Thanks @colifran! - feat: implement aynchronous generator tool calling for streaming partial tool results

1.1.27

Patch Changes

1.1.26

Patch Changes

  • #10085 ed6ea53 Thanks @colifran! - fix(google): tool_calls are not preserved when concatenating AIMessageChunks

1.1.25

Patch Changes

  • #10002 27186c5 Thanks @aditya-gg04! - fix(core): support reasoning/thinking blocks in StringOutputParser

  • #10077 05396f7 Thanks @christian-bromann! - feat(core): add ContextOverflowError, raise in anthropic and openai

  • #10081 5a6f26b Thanks @hntrl! - feat(core): add namespace-based symbol branding for error class hierarchies

    Introduces createNamespace utility for hierarchical symbol-based branding of class hierarchies. All LangChain error classes now use this pattern, replacing hand-rolled duck-type isInstance checks with reliable cross-realm Symbol.for-based identity.

    • New LangChainError base class that all LangChain errors extend
    • New createNamespace / Namespace API in @langchain/core/utils/namespace
    • Refactored ModelAbortError, ContextOverflowError to use namespace branding
    • Added ContextOverflowError.fromError() static factory method
    • Deprecated addLangChainErrorFields in favor of LangChainError subclasses
    • Migrated Google provider errors (GoogleError, ConfigurationError, etc.) to namespace branding
    • Updated Anthropic and OpenAI providers to use ContextOverflowError.fromError()

1.1.24

Patch Changes

1.1.23

Patch Changes

  • #10000 71d08c0 Thanks @hntrl! - feat(google): add @langchain/google -- unified Google/Gemini integration

    New package that replaces the fragmented @langchain/google-genai / @langchain/google-common / Vertex AI package stack with a single integration.

    Published as 0.1.0 (early release). Existing Google packages will continue to receive maintenance updates.

1.1.22

Patch Changes

1.1.21

Patch Changes

  • #9990 d5e3db0 Thanks @hntrl! - feat(core): Add SSRF protection module (@langchain/core/utils/ssrf) with utilities for validating URLs against private IPs, cloud metadata endpoints, and localhost.

    fix(community): Harden RecursiveUrlLoader against SSRF attacks by integrating validateSafeUrl and replacing string-based URL comparison with origin-based isSameOrigin from the shared SSRF module.

1.1.20

Patch Changes

1.1.19

Patch Changes

1.1.18

Patch Changes

  • #9900 a9b5059 Thanks @hntrl! - fix(core): update method signatures to use Partial<CallOptions> for options parameters

    Updated invoke, stream, generate, and generatePrompt method signatures across Runnable, BaseChatModel, and BaseLLM to correctly accept Partial<CallOptions> instead of full CallOptions. This aligns the implementation with the RunnableInterface specification and allows users to pass partial options (e.g., { signal: abortedSignal }) without TypeScript errors.

  • #9900 a9b5059 Thanks @hntrl! - Improved abort signal handling for chat models:

    • Added ModelAbortError class in @langchain/core/errors that contains partial output when a model invocation is aborted mid-stream
    • invoke() now throws ModelAbortError with accumulated partialOutput when aborted during streaming (when using streaming callback handlers)
    • stream() throws a regular AbortError when aborted (since chunks are already yielded to the caller)
    • All provider implementations now properly check and propagate abort signals in both _generate() and _streamResponseChunks() methods
    • Added standard tests for abort signal behavior

1.1.17

Patch Changes

1.1.16

Patch Changes

1.1.15

Patch Changes

1.1.14

Patch Changes

1.1.13

Patch Changes

1.1.12

Patch Changes

1.1.11

Patch Changes

1.1.10

Patch Changes

1.1.9

Patch Changes

1.1.8

Patch Changes

1.1.7

Patch Changes

1.1.6

Patch Changes

  • #9668 a7b2a7d Thanks @bracesproul! - fix: Cannot merge two undefined objects error

  • #9657 a496c5f Thanks @dqbd! - fix(core): avoid writing to TransformStream in EventStreamCallbackHandler when underlying ReadableStream is closed

  • #9658 1da1325 Thanks @dqbd! - fix(core): ensure streaming test chat models respect AbortSignal

1.1.5

Patch Changes

1.1.4

Patch Changes

1.1.3

Patch Changes

1.1.2

Patch Changes

1.1.1

Patch Changes

1.1.0

Minor Changes

Patch Changes

1.0.6

Patch Changes

1.0.5

Patch Changes

1.0.4

Patch Changes

  • 8319201: Export standard converter function utility

1.0.3

Patch Changes

  • 0a8a23b: feat(@langchain/core): support of ToolRuntime

1.0.2

Patch Changes

  • 6426eb6: fix chunks constructed with tool calls + chunks
  • 619ae64: Add BaseMessage.toFormattedString()

1.0.1

Patch changes

  • cacc137: remove bad import map exports

1.0.0

πŸŽ‰ LangChain v1.0 is here! This release provides a focused, production-ready foundation for building agents with significant improvements to the core abstractions and APIs. See the release notes for more details.

✨ Major Features

Standard content blocks

A new unified API for accessing modern LLM features across all providers:

  • New contentBlocks property: Provides provider-agnostic access to reasoning traces, citations, built-in tools (web search, code interpreters, etc.), and other advanced LLM features
  • Type-safe: Full TypeScript support with type hints for all content block types
  • Backward compatible: Content blocks can be loaded lazily with no breaking changes to existing code

Example:

const response = await model.invoke([
  { role: "user", content: "What is the weather in Tokyo?" },
]);

// Access structured content blocks
for (const block of response.contentBlocks) {
  if (block.type === "thinking") {
    console.log("Model reasoning:", block.thinking);
  } else if (block.type === "text") {
    console.log("Response:", block.text);
  }
}

For more information, see our guide on content blocks.

Enhanced Message API

Improvements to the core message types:

  • Structured content: Better support for multimodal content with the new content blocks API
  • Provider compatibility: Consistent message format across all LLM providers
  • Rich metadata: Enhanced metadata support for tracking message provenance and transformations

πŸ”§ Improvements

  • Better structured output generation: Core abstractions for generating structured outputs in the main agent loop
  • Improved type safety: Enhanced TypeScript definitions across all core abstractions
  • Performance optimizations: Reduced overhead in message processing and runnable composition
  • Better error handling: More informative error messages and better error recovery

πŸ“¦ Package Changes

The @langchain/core package remains focused on essential abstractions:

  • Core message types and content blocks
  • Base runnable abstractions
  • Tool definitions and schemas
  • Middleware infrastructure
  • Callback system
  • Output parsers
  • Prompt templates

πŸ”„ Migration Notes

Backward Compatibility: This release maintains backward compatibility with existing code. Content blocks are loaded lazily, so no changes are required to existing applications.

New Features: To take advantage of new features like content blocks and middleware:

  1. Update to @langchain/core@next:

    npm install @langchain/core@1.0.0
    
  2. Use the new contentBlocks property to access rich content:

    const response = await model.invoke(messages);
    console.log(response.contentBlocks); // New API
    console.log(response.content); // Legacy API still works
    
  3. For middleware and createAgent, install langchain@next:

    npm install langchain@1.0.0 @langchain/core@1.0.0
    

πŸ“š Additional Resources


0.3.79

Patch Changes

  • 1063b43: fix chunks constructed with tool calls + chunks

0.3.78

Patch Changes

  • 1519a97: update chunk concat logic to match on missing ID fields
  • 079e11d: omit tool call chunks without tool call id

0.3.76

Patch Changes

  • 41bd944: support base64 embeddings format
  • e90bc0a: fix(core): prevent tool call chunks from merging incorrectly in AIMes…
  • 3a99a40: Fix deserialization of RemoveMessage if represented as a plain object
  • 58e9522: make mustache prompt with nested object working correctly
  • e44dc1b: handle backticks in structured output

0.3.75

Patch Changes

  • d6d841f: fix(core): Fix deep nesting of runnables within traceables

0.3.74

Patch Changes

  • 4e53005: fix(core): Always inherit parent run id onto callback manager from context

0.3.73

Patch Changes

  • a5a2e10: add root export to satisfy bundler requirements