PackageTrack

npm · #4362

@langchain/core

1.2.9langchain-ai/langchainjs

Core LangChain.js abstractions and schemas

Release timeline

350 releases since 2023
202420252026

Releases

  1. 1.1.2618 Feb 2026
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    • #10085 ed6ea53 Thanks @colifran! - fix(google): tool_calls are not preserved when concatenating AIMessageChunks
    Open source →
  2. 1.1.2517 Feb 2026
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    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()
    Open source →
  3. 1.1.25-dev-177136549329817 Feb 2026pre-release

    Nothing published for this version

  4. 1.1.2412 Feb 2026
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  5. 1.1.2312 Feb 2026
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    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.

    Open source →
  6. 1.1.2211 Feb 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  7. 1.1.2111 Feb 2026
    Release notes2 sources agree

    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.

    Open source →
  8. 1.1.209 Feb 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  9. 1.1.194 Feb 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  10. 1.1.1830 Jan 2026
    Release notes2 sources agree

    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
    Open source →
  11. 1.1.1724 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  12. 1.1.1620 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  13. 1.1.1514 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  14. 1.1.1414 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  15. 1.1.1313 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  16. 1.1.128 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  17. 1.1.12-dev-17678223022527 Jan 2026pre-release

    Nothing published for this version

  18. 1.1.117 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  19. 1.1.11-dev-17677487836947 Jan 2026pre-release

    Nothing published for this version

  20. 1.1.106 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  21. 1.1.96 Jan 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  22. 1.1.822 Dec 2025
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  23. 1.1.8-dev-176677512811026 Dec 2025pre-release

    Nothing published for this version

  24. 1.1.8-dev-176672683237726 Dec 2025pre-release

    Nothing published for this version

  25. 1.1.718 Dec 2025
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  26. 1.1.616 Dec 2025
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    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

    Open source →
  27. 1.1.513 Dec 2025
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  28. 1.1.5-dev-176543379487611 Dec 2025pre-release

    Nothing published for this version

  29. 1.1.5-dev-176543286139811 Dec 2025pre-release

    Nothing published for this version

  30. 1.1.5-dev-176543181667011 Dec 2025pre-release

    Nothing published for this version

  31. 1.1.45 Dec 2025
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  32. 1.1.35 Dec 2025
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • #10872 a640079 Thanks @hntrl! - chore(deps): remove redundant @types/uuid declarations

      Remove @types/uuid from package manifests that rely on @langchain/core/utils/uuid or do not require uuid type stubs directly, and refresh the lockfile entries accordingly.

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  33. 1.1.23 Dec 2025
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  34. 1.1.12 Dec 2025
    Release notes

    Patch Changes

    • #10701 880e396 Thanks @hntrl! - fix(redis): improve RediSearch query escaping and filter validation
      • add shared query escaping and field validation helpers for Redis filter builders
      • apply escaping and type validation to buildCustomQuery tag/text/numeric paths
      • add regression tests covering escaped values, wildcard handling, and invalid filter inputs
    Open source →
    Additional notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  35. 1.1.024 Nov 2025
    Release notes

    Minor Changes

    Patch Changes

    Open source →
    Additional notes

    Minor Changes

    Open source →
    Additional notes

    Minor Changes

    Open source →
    Additional notes

    Minor Changes

    • #10873 a74d574 Thanks @baptistejamin! - chore(mistralai): upgrade to @mistralai/mistralai v2

      Also populates response_metadata.model on chat completions (was missing before).

    Open source →
    Additional notes2 sources agree

    Minor Changes

    Patch Changes

    Open source →
  36. 1.0.618 Nov 2025
    Release notes

    Patch Changes

    • #10872 a640079 Thanks @hntrl! - chore(deps): remove redundant @types/uuid declarations

      Remove @types/uuid from package manifests that rely on @langchain/core/utils/uuid or do not require uuid type stubs directly, and refresh the lockfile entries accordingly.

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  37. 1.0.514 Nov 2025
    Release notes2 sources agree

    Patch Changes

    Open source →
  38. 1.0.411 Nov 2025
    Release notes2 sources agree

    Patch Changes

    • 8319201: Export standard converter function utility
    Open source →
  39. 1.0.36 Nov 2025
    Release notes3 sources agree

    Patch Changes

    • #10872 a640079 Thanks @hntrl! - chore(deps): remove redundant @types/uuid declarations

      Remove @types/uuid from package manifests that rely on @langchain/core/utils/uuid or do not require uuid type stubs directly, and refresh the lockfile entries accordingly.

    Open source →
    Additional notes2 sources agree

    Patch Changes

    • 0a8a23b: feat(@langchain/core): support of ToolRuntime
    Open source →
  40. 1.0.227 Oct 2025
    Release notes

    Patch Changes

    • #10872 a640079 Thanks @hntrl! - chore(deps): remove redundant @types/uuid declarations

      Remove @types/uuid from package manifests that rely on @langchain/core/utils/uuid or do not require uuid type stubs directly, and refresh the lockfile entries accordingly.

    Open source →
    Additional notes2 sources agree

    Patch Changes

    • 6426eb6: fix chunks constructed with tool calls + chunks
    • 619ae64: Add BaseMessage.toFormattedString()
    Open source →
  41. 1.0.117 Oct 2025
    Release notes2 sources agree

    Patch changes

    • cacc137: remove bad import map exports
    Open source →
  42. 1.0.017 Oct 2025
    Release notes2 sources agree

    🎉 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/[email protected]
      
    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 [email protected] @langchain/[email protected]
      

    📚 Additional Resources


    Open source →
  43. 1.0.0-alpha.715 Oct 2025pre-release

    Nothing published for this version

  44. 1.0.0-alpha.626 Sept 2025pre-release

    Nothing published for this version

  45. 1.0.0-alpha.518 Sept 2025pre-release

    Nothing published for this version

  46. 1.0.0-alpha.415 Sept 2025pre-release

    Nothing published for this version

  47. 1.0.0-alpha.39 Sept 2025pre-release

    Nothing published for this version

  48. 1.0.0-alpha.22 Sept 2025pre-release

    Nothing published for this version

  49. 1.0.0-alpha.127 Aug 2025pre-release

    Nothing published for this version

  50. 0.3.8023 Dec 2025

    Nothing published for this version

  51. 0.3.7927 Oct 2025
    Release notes2 sources agree

    Patch Changes

    • 1063b43: fix chunks constructed with tool calls + chunks
    Open source →
  52. 0.3.7829 Sept 2025
    Release notes2 sources agree

    Patch Changes

    • 1519a97: update chunk concat logic to match on missing ID fields
    • 079e11d: omit tool call chunks without tool call id
    Open source →
  53. 0.3.7717 Sept 2025

    Nothing published for this version

  54. 0.3.7615 Sept 2025
    Release notes2 sources agree

    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
    Open source →
  55. 0.3.755 Sept 2025
    Release notes2 sources agree

    Patch Changes

    • d6d841f: fix(core): Fix deep nesting of runnables within traceables
    Open source →
  56. 0.3.744 Sept 2025
    Release notes2 sources agree

    Patch Changes

    • 4e53005: fix(core): Always inherit parent run id onto callback manager from context
    Open source →
  57. 0.3.732 Sept 2025
    Release notes2 sources agree

    Patch Changes

    • a5a2e10: add root export to satisfy bundler requirements
    Open source →
  58. 0.3.7219 Aug 2025

    Nothing published for this version

  59. 0.3.7115 Aug 2025

    Nothing published for this version

  60. 0.3.71-rc.015 Aug 2025pre-release

    Nothing published for this version