Patch Changes
-
#11331
18765b0Thanks @thushanth-bengre-langchain! - fix(langchain): exclude middleware-internal model calls from the message projectionBookkeeping model calls made by
summarizationMiddlewareandtoolEmulatorMiddlewareno longer appear inrun.messagesorstream({ streamMode: "messages" }), and the summarysummarizationMiddlewarewrites back to state is no longer projected as a new message. These calls remain observable viastreamEvents({ version: "v2" }), identified bylc_source. -
#11344
f08e0c6Thanks @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 strictinstanceofcheck 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.