Repository navigation
Conversation
This branch has not been deployed
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
When recall context is injected, an existing typed
SystemMessageis rebuilt with only flattened text. This drops its name, ID, additional fields and structured content blocks; a downstreamfilter_messages(include_names=[...])can then omit the original named policy.Preserve the existing message with
model_copy, append one text block to list content, and keep the existing string formatting and caller input unchanged.Human Involvement
Related Issue
Fixes #6097
Type of Change
Changes Made
Testing
The eight regressions are 4 failed / 4 passed on exact main and 8 passed with the fix. The scoped LangChain suites are Linux 231 passed / 1 SQLite skip; Windows 229 passed / 1 skip / 2 existing resource-path failures. Exact main with the same regressions is Windows 225 passed / 1 skip / 6 failures, including the four new regressions. Both Windows runs have the same two resource-path failures.
Ruff check/format (44 files), mypy (15 sources), wheel/sdist build, Twine, offline target install, the package's installed smoke and four installed public controls passed. Independent public name-filter controls are 3 normal / 3 divergent before the fix and all 6 normal after it. These overlapping selections are not added together.
Checklist
Screenshots (if applicable)
Not applicable.
Additional Notes
Validation used cached dependencies and the deterministic in-memory backend. Existing LangChain deprecation warnings remain. No deployed backend, live model, authentication, full-server, minimum-version matrix, provider cache-hit or performance claim is made.
The original integration/shared recording work by ehz0ah and host-history work by krsish remain intact. System messages remain excluded from persisted memory. This does not change the package layout proposed in #6017.