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.2.920 Aug 2026
    Release notes

    Patch Changes

    • #11402 43e4396 Thanks @thushanth-bengre-langchain! - Fix ChatVertexAI/ChatGoogle content blocks: include tool_call blocks from message.tool_calls and skip spurious empty text blocks in contentBlocks.
    Open source →
  2. 1.2.814 Aug 2026
    Release notes3 sources agree

    Patch Changes

    • #11369 d6ad973 Thanks @hntrl! - fix(langchain): use unified endpoint for gateway

    • #11342 3b0e4c4 Thanks @thushanth-bengre-langchain! - feat(core): mark errors as retryable or not, and stop retrying the ones that aren't

      Retry middleware retried every failure up to maxRetries, including deterministic ones like a bad API key or an unknown model. Retries also nest, so a single such failure could cost dozens of API calls.

      @langchain/core/errors adds stampRetryable(error, retryable) and getRetryable(error). Marking an error leaves its class and shape untouched, so a provider SDK error can be classified without breaking instanceof. getRetryable returns undefined for errors nobody classified, and both are exported so tool authors can mark their own failures.

      modelRetryMiddleware and toolRetryMiddleware now respect the mark by default, and retries stop as soon as one is found rather than each layer spending its own budget. Aborted calls, context overflow, and oversized payloads are marked non-retryable out of the box. Models accept a per-call maxRetries so a surrounding retry loop can take over.

      Behavior change: errors marked non-retryable now fail on the first attempt. Unclassified errors — including any from third-party integrations or custom tools — retry exactly as before. Pass retryOn: () => true to restore the old default. A custom onFailedAttempt replaces the built-in handler and opts out of marking.

    Open source →
  3. 1.2.713 Aug 2026
    Release notes3 sources agree

    Patch Changes

    • #11366 c068bbf Thanks @hntrl! - fix(core,langchain): patch and release core, update peer dependencies
    Open source →
  4. 1.2.612 Aug 2026
    Release notes3 sources agree

    Patch Changes

    • #11344 f08e0c6 Thanks @hntrl! - fix: apply [Symbol.hasInstance] method to all comparable properties using .isInstance()

      We have some internal schemas that rely on z.instanceof(). This uses a strict instanceof check which can conflict if there are multiple versions of core installed. This overrides the Symbol.hasInstance method to use the same logic as .isInstance() to compare objects at runtime.

    Open source →
    Additional notes

    Patch Changes

    Open source →
  5. 1.2.55 Aug 2026
    Release notes3 sources agree

    Patch Changes

    Open source →
  6. 1.2.430 Jul 2026
    Release notes3 sources agree

    Patch Changes

    Open source →
  7. 1.2.314 Jul 2026
    Release notes3 sources agree

    Patch Changes

    • #11200 08e5888 Thanks @hntrl! - fix(aws): normalize and safely replay Bedrock reasoning blocks

      Emit standard reasoning blocks with preserved signatures, omit incomplete signature-only reasoning during replay, and retain compatibility with legacy and redacted Bedrock reasoning.

    Open source →
  8. 1.2.29 Jul 2026
    Release notes3 sources agree

    Patch Changes

    • #11171 82bef01 Thanks @christian-bromann! - fix(core): coerce string v1 AIMessage content to text blocks

      Prevent contentBlocks.push is not a function when constructing an AIMessage with response_metadata.output_version === "v1" and string content (common in serialized LangGraph stream payloads).

    Open source →
  9. 1.2.122 Jun 2026
    Release notes3 sources agree

    Patch Changes

    • #10674 f017708 Thanks @christian-bromann! - fix: classify provider 429s before retrying

    • #11092 7918bbd Thanks @aolsenjazz! - fix(core): only treat arrays of content blocks as ToolMessage content

      Fix tool outputs that are arrays of plain objects being forwarded as malformed message content. An array is now only treated as message content blocks when every element is an object with a type; otherwise it is JSON-stringified.

    Open source →
    Additional notes2 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 →
  10. 1.2.017 Jun 2026
    Release notes

    Minor Changes

    Open source →
    Additional notes3 sources agree

    Minor Changes

    Patch Changes

    • #11047 ac0f71d Thanks @christian-bromann! - fix(core): preserve AIMessage content blocks

      Keep existing v1 contentBlocks when constructing AIMessage instances so serialized messages do not lose block content during deserialization.

    Open source →
    Additional notes

    Minor Changes

    Open source →
  11. 1.2.0-dev-17757638038789 Apr 2026pre-release

    Nothing published for this version

  12. 1.2.0-dev-176593770526517 Dec 2025pre-release

    Nothing published for this version

  13. 1.1.50-dev-178158035742416 Jun 2026pre-release

    Nothing published for this version

  14. 1.1.4912 Jun 2026
    Release notes2 sources agree

    Patch Changes

    • #10679 1f7b495 Thanks @hnustwjj! - fix(core): make RemoveMessage type-compatible across MessageStructure variants

      Remove unnecessary TStructure generic from RemoveMessage — its content is always [], so the type parameter only caused incompatibilities when passing RemoveMessage into APIs expecting a different MessageStructure (e.g. @langchain/langgraph-sdk's Message<DefaultToolCall>). Also add { type: "remove"; id: string } to BaseMessageLike so the serialized format is accepted by TypeScript, matching the existing runtime behavior in coerceMessageLikeToMessage.

    Open source →
  15. 1.1.49-dev-17810481857309 Jun 2026pre-release

    Nothing published for this version

  16. 1.1.49-dev-17810444363129 Jun 2026pre-release

    Nothing published for this version

  17. 1.1.4821 May 2026
    Release notes3 sources agree

    Patch Changes

    • #10832 1b24369 Thanks @info-arnav! - fix(core, openrouter): make CJS default re-exports callable

    • #10666 2bb55b0 Thanks @hnustwjj! - feat(openrouter): surface reasoning content as v1 standard content blocks

      convertOpenRouterResponseToBaseMessage and convertOpenRouterDeltaToBaseMessageChunk now copy OpenRouter's reasoning (flat string) and reasoning_details (structured array) fields onto additional_kwargs.reasoning_content / additional_kwargs.reasoning_details. A new ChatOpenRouterTranslator is registered in @langchain/core under the "openrouter" provider key so AIMessage.contentBlocks emits standard {type: "reasoning"} blocks alongside text and tool calls.

      Previously, reasoning text returned by reasoning-capable models routed through OpenRouter (DeepSeek R1, Minimax M2, Claude extended thinking, o-series, etc.) was silently dropped: only the reasoning_tokens count was preserved via usage_metadata. Consumers using standard content blocks (including the frontend agent UI patterns shown in the docs) could not display the model's chain of thought.

    • #10918 3999fab Thanks @christian-bromann! - fix(openai): stream custom tool calls through Responses API chunks

    Open source →
  18. 1.1.4718 May 2026
    Release notes3 sources agree

    Patch Changes

    • #10906 f61b345 Thanks @hntrl! - feat(core): add uuid v6 utility support

      Add v6 UUID generation support to @langchain/core/utils/uuid by vendoring the upstream uuidjs v6 implementation and its v1ToV6 helper, exporting v6 from the UUID utils index, and adding tests for deterministic generation, buffer/offset behavior, validation/versioning, and ordering.

    • #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.

    • #10792 3682268 Thanks @Genmin! - fix(core): apply v1 message casting after implicit streaming aggregation

    • #10901 f26fc4a Thanks @christian-bromann! - fix(testing): share fakeModel invocation state across bindTools instances

    Open source →
  19. 1.1.4612 May 2026
    Release notes3 sources agree

    Patch Changes

    • #10847 1659e7d Thanks @hntrl! - chore(core): reduce transitive dependency exposure and tighten release hygiene

      Remove direct runtime dependencies on ansi-styles, camelcase, and decamelize by inlining equivalent logic in core internals, and enable npm provenance in the release workflow.

    • #10790 ef78bc6 Thanks @Genmin! - fix(core): keep different content block types separate when merging chunks

    Open source →
  20. 1.1.457 May 2026
    Release notes2 sources agree

    Patch Changes

    • #10833 6cf39fe Thanks @colifran! - chore(core): deprecate streamLog, streamEvents v1, RunnableWithMessageHistory and improve threat model verbiage for loads

    • #10835 0aebe50 Thanks @colifran! - fix(core): deno re-declaration in LangSmith is causing unit test failures

    Open source →
  21. 1.1.442 May 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  22. 1.1.432 May 2026
    Release notes2 sources agree

    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

    Open source →
  23. 1.1.43-dev-17776155387781 May 2026pre-release

    Nothing published for this version

  24. 1.1.4227 Apr 2026
    Release notes2 sources agree

    Patch Changes

    • #10776 20a9abe Thanks @hntrl! - fix(deps): remediate uuid vulnerability by removing direct uuid usage
    Open source →
  25. 1.1.4122 Apr 2026
    Release notes3 sources agree

    Patch Changes

    Open source →
  26. 1.1.4015 Apr 2026
    Release notes3 sources agree

    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.
    Open source →
  27. 1.1.40-dev-17776141212441 May 2026pre-release

    Nothing published for this version

  28. 1.1.40-dev-177759005141330 Apr 2026pre-release

    Nothing published for this version

  29. 1.1.40-dev-177758764945130 Apr 2026pre-release

    Nothing published for this version

  30. 1.1.40-dev-177758192934630 Apr 2026pre-release

    Nothing published for this version

  31. 1.1.40-dev-177757688034030 Apr 2026pre-release

    Nothing published for this version

  32. 1.1.40-dev-177743473630529 Apr 2026pre-release

    Nothing published for this version

  33. 1.1.40-dev-177742612474529 Apr 2026pre-release

    Nothing published for this version

  34. 1.1.40-dev-177732253899927 Apr 2026pre-release

    Nothing published for this version

  35. 1.1.40-dev-177712950039825 Apr 2026pre-release

    Nothing published for this version

  36. 1.1.40-dev-177712850608625 Apr 2026pre-release

    Nothing published for this version

  37. 1.1.40-dev-177707368872324 Apr 2026pre-release

    Nothing published for this version

  38. 1.1.393 Apr 2026
    Release notes3 sources agree

    Patch Changes

    Open source →
  39. 1.1.39-dev-17752441166343 Apr 2026pre-release

    Nothing published for this version

  40. 1.1.3831 Mar 2026
    Release notes3 sources agree

    Patch Changes

    Open source →
  41. 1.1.3730 Mar 2026
    Release notes3 sources agree

    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

    Open source →
  42. 1.1.3624 Mar 2026
    Release notes3 sources agree

    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.

    Open source →
  43. 1.1.3522 Mar 2026
    Release notes3 sources agree

    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

    Open source →
  44. 1.1.3418 Mar 2026
    Release notes3 sources agree

    Patch Changes

    Open source →
  45. 1.1.3317 Mar 2026
    Release notes3 sources agree

    Patch Changes

    Open source →
  46. 1.1.33-dev-177396263379519 Mar 2026pre-release

    Nothing published for this version

  47. 1.1.33-dev-177378658057517 Mar 2026pre-release

    Nothing published for this version

  48. 1.1.33-dev-177378515005517 Mar 2026pre-release

    Nothing published for this version

  49. 1.1.33-dev-177377607169717 Mar 2026pre-release

    Nothing published for this version

  50. 1.1.33-dev-177371209810017 Mar 2026pre-release

    Nothing published for this version

  51. 1.1.33-dev-177371062897417 Mar 2026pre-release

    Nothing published for this version

  52. 1.1.33-dev-177370999765417 Mar 2026pre-release

    Nothing published for this version

  53. 1.1.33-dev-177369844553416 Mar 2026pre-release

    Nothing published for this version

  54. 1.1.3211 Mar 2026
    Release notes3 sources agree

    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

    Open source →
  55. 1.1.32-dev-177334579764812 Mar 2026pre-release

    Nothing published for this version

  56. 1.1.315 Mar 2026
    Release notes3 sources agree

    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.

    Open source →
  57. 1.1.303 Mar 2026
    Release notes2 sources agree

    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

    Open source →
  58. 1.1.2926 Feb 2026
    Release notes2 sources agree

    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.

    Open source →
  59. 1.1.2824 Feb 2026
    Release notes2 sources agree

    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

    Open source →
  60. 1.1.2720 Feb 2026
    Release notes

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →