chore(deps): update dependency @langchain/core to v1.2.11 - #748
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.2.10→1.2.11Release Notes
langchain-ai/langchainjs (@langchain/core)
v1.2.11Compare Source
Patch Changes
#11603
fec9cd8Thanks @thushanth-bengre-langchain! - fix(core): build streamingllmOutput.tokenUsagefrom the fully-accumulated chunk instead of whichever individual chunk'susage_metadataarrived lastAffects both core streaming paths —
.stream()/.streamEvents()(_streamIterator) and.invoke()/.generate()when a streaming-preferring callback is attached (_generateWithCache'shasStreamingHandlerbranch). Previously,llmOutput.tokenUsagewas overwritten by each chunk in turn, so only the last chunk carryingusage_metadatawon — correct for providers that emit one cumulative total on a final chunk, but wrong for providers (e.g.@langchain/google,@langchain/anthropic) that emitusage_metadataas a per-chunk delta across multiple chunks, where the values must be summed.Note for provider authors: this assumes each streamed chunk's
usage_metadatais either a per-chunk delta or appears only on a single final chunk. A provider that instead repeats a cumulative total on every chunk will now see it summed (and inflated) inllmOutput.tokenUsage, matching the existing behavior of the correctly-workingmessage.usage_metadatafield.Also fixes
@langchain/google'sinvoke({streaming: true})path (no streaming-preferring callback attached), wherellmOutputwas never populated at all.#11590
ffebdc2Thanks @thushanth-bengre-langchain! - Fix OpenAI Responses API replay under Zero Data Retention when a response contains more than one reasoning item, for both v0 and v1. In v0, the default replay path now reusesresponse_metadata.outputdirectly, preserving every reasoning item'sid/encrypted_contentin original order. In v1,AIMessage.contentBlocks(outputVersion: "v1") is fixed the same way.additional_kwargs.reasoningis unchanged.Configuration
📅 Schedule: (in timezone Europe/Berlin)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.