github langchain-ai/langchainjs langchain@1.5.6

5 hours ago

Patch Changes

  • #11331 18765b0 Thanks @thushanth-bengre-langchain! - fix(langchain): exclude middleware-internal model calls from the message projection

    Bookkeeping model calls made by summarizationMiddleware and toolEmulatorMiddleware no longer appear in run.messages or stream({ streamMode: "messages" }), and the summary summarizationMiddleware writes back to state is no longer projected as a new message. These calls remain observable via streamEvents({ version: "v2" }), identified by lc_source.

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

Don't miss a new langchainjs release

NewReleases is sending notifications on new releases.