Repository navigation
fix(langchain): preserve recall inputs and context metadata - #6338
Merged
Merged
Conversation
(cherry picked from commit faede6a) Signed-off-by: Hao Zhe <[email protected]>
(cherry picked from commit d8d0237) Signed-off-by: Hao Zhe <[email protected]>
(cherry picked from commit 2b3ed8f) Signed-off-by: Hao Zhe <[email protected]>
(cherry picked from commit 37a8462) Signed-off-by: Hao Zhe <[email protected]>
…le paths Keep SDK option coverage in the existing adapter suite. Extend public sync and async contracts for configured metadata through recording, tuple and dictionary policy inputs, and completed streams without mutating caller messages. Signed-off-by: Hao Zhe <[email protected]>
Prefer the configured current-message string over unrelated prompt fields, independent of dictionary order. Extend the public sync, async and streaming host-history contract to expose the original failure. Signed-off-by: Hao Zhe <[email protected]>
t0saki
approved these changes
Oct 20, 2026
This was referenced Oct 20, 2026
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.
Description
Preserve the caller's inputs, system messages and source references through LangChain recall and recording:
session_idmade the default stateless retriever fail SDK option validation. Forward it only to session-awaresearch, in both sync and async retrieval.SystemMessageobjects from flattened text. Copy the message instead, preserving its ID, name, additional fields and structured content blocks while appending recalled context. Caller inputs are not mutated.Human Involvement
Related Issue
Fixes #6172
Fixes #5856
Fixes #6097
Fixes #6035
Consolidates #6174, #5858, #6098 and #6036.
Type of Change
Changes Made
Testing
d568563f8. All 80 pass here. Four string-input cases also reproduced after the original cherry-picks, before the additional configured-input correction.Skips are the optional SQLite checkpointer and, on Python 3.10,
asyncio.timeout. Framework deprecation warnings remain. This validates controlled SDK/HTTP and framework behavior, not a deployed backend, external model or authorization policy.Checklist
Screenshots (if applicable)
Not applicable.
Additional Notes
Original @ktz03 commits were cherry-picked with
-x, preserving authorship:faede6a29.d8d0237ad.2b3ed8ffc.37a846207.Test consolidation, broader lifecycle coverage and the configured-string-input correction are separate signed-off commits by Hao Zhe. The source PRs remain open until this combined fix lands.